linux/arch/x86/kvm
Tang Chen 38b9917350 kvm: vmx: Implement set_apic_access_page_addr
Currently, the APIC access page is pinned by KVM for the entire life
of the guest.  We want to make it migratable in order to make memory
hot-unplug available for machines that run KVM.

This patch prepares to handle this for the case where there is no nested
virtualization, or where the nested guest does not have an APIC page of
its own.  All accesses to kvm->arch.apic_access_page are changed to go
through kvm_vcpu_reload_apic_access_page.

If the APIC access page is invalidated when the host is running, we update
the VMCS in the next guest entry.

If it is invalidated when the guest is running, the MMU notifier will force
an exit, after which we will handle everything as in the previous case.

If it is invalidated when a nested guest is running, the request will update
either the VMCS01 or the VMCS02.  Updating the VMCS01 is done at the
next L2->L1 exit, while updating the VMCS02 is done in prepare_vmcs02.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-09-24 14:08:01 +02:00
..
cpuid.c KVM: nested VMX: disable perf cpuid reporting 2014-09-24 14:07:50 +02:00
cpuid.h KVM: x86: Warn if guest virtual address space is not 48-bits 2014-09-24 14:07:48 +02:00
emulate.c KVM: x86: emulating descriptor load misses long-mode case 2014-09-24 14:07:52 +02:00
i8254.c KVM: x86: limit PIT timer frequency 2014-01-15 12:43:54 +01:00
i8254.h KVM: fold kvm_pit_timer into kvm_kpit_state 2012-08-01 00:21:07 -03:00
i8259.c KVM: inject ExtINT interrupt before APIC interrupts 2012-12-13 23:05:21 -02:00
irq.c KVM: nVMX: fix "acknowledge interrupt on exit" when APICv is in use 2014-08-05 15:00:24 +02:00
irq.h KVM: switch to symbolic name for irq_states size 2012-07-20 16:12:16 -03:00
Kconfig KVM: Give IRQFD its own separate enabling Kconfig option 2014-08-05 14:26:28 +02:00
kvm_cache_regs.h KVM: MMU: Do not unconditionally read PDPTE from guest memory 2011-09-25 19:18:01 +03:00
lapic.c KVM: x86: make apic_accept_irq tracepoint more generic 2014-09-11 11:51:02 +02:00
lapic.h KVM: x86: Validate guest writes to MSR_IA32_APICBASE 2014-01-27 14:39:44 +01:00
Makefile kvm: Add VFIO device 2013-10-30 19:02:03 +01:00
mmu_audit.c arch/x86: replace strict_strto calls 2014-08-08 15:57:28 -07:00
mmu.c kvm: Fix page ageing bugs 2014-09-24 14:07:58 +02:00
mmu.h KVM: mmio: cleanup kvm_set_mmio_spte_mask 2014-09-03 10:04:10 +02:00
mmutrace.h x86/kvm: Resolve shadow warnings in macro expansion 2014-07-31 16:33:29 +02:00
paging_tmpl.h KVM: x86: Remove debug assertion of non-PAE reserved bits 2014-09-24 14:07:55 +02:00
pmu.c KVM: x86: Clarify PMU related features bit manipulation 2014-08-20 13:01:25 +02:00
svm.c kvm: Use APIC_DEFAULT_PHYS_BASE macro as the apic access page address. 2014-09-11 11:10:22 +02:00
trace.h KVM: x86: make apic_accept_irq tracepoint more generic 2014-09-11 11:51:02 +02:00
tss.h KVM: x86: hardware task switching support 2008-04-27 12:00:39 +03:00
vmx.c kvm: vmx: Implement set_apic_access_page_addr 2014-09-24 14:08:01 +02:00
x86.c kvm: x86: Add request bit to reload APIC access page address 2014-09-24 14:08:00 +02:00
x86.h KVM: vmx: Inject #GP on invalid PAT CR 2014-09-24 14:07:52 +02:00