kernel-ark/arch/x86/kvm
Nadav Har'El 8049d651e8 nEPT: Support LOAD_IA32_EFER entry/exit controls for L1
Recent KVM, since http://kerneltrap.org/mailarchive/linux-kvm/2010/5/2/6261577
switch the EFER MSR when EPT is used and the host and guest have different
NX bits. So if we add support for nested EPT (L1 guest using EPT to run L2)
and want to be able to run recent KVM as L1, we need to allow L1 to use this
EFER switching feature.

To do this EFER switching, KVM uses VM_ENTRY/EXIT_LOAD_IA32_EFER if available,
and if it isn't, it uses the generic VM_ENTRY/EXIT_MSR_LOAD. This patch adds
support for the former (the latter is still unsupported).

Nested entry and exit emulation (prepare_vmcs_02 and load_vmcs12_host_state,
respectively) already handled VM_ENTRY/EXIT_LOAD_IA32_EFER correctly. So all
that's left to do in this patch is to properly advertise this feature to L1.

Note that vmcs12's VM_ENTRY/EXIT_LOAD_IA32_EFER are emulated by L0, by using
vmx_set_efer (which itself sets one of several vmcs02 fields), so we always
support this feature, regardless of whether the host supports it.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Nadav Har'El <nyh@il.ibm.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Xinhao Xu <xinhao.xu@intel.com>
Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-08-07 15:57:34 +02:00
..
cpuid.c KVM: x86: Make register state after reset conform to specification 2012-12-05 18:00:07 +02:00
cpuid.h Merge tag 'kvm-3.8-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm 2012-12-13 15:31:08 -08:00
emulate.c KVM fixes for 3.11 2013-07-03 13:21:40 -07:00
i8254.c KVM: Let ioapic know the irq line status 2013-04-15 23:20:34 -03: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 x86, apicv: add virtual interrupt delivery support 2013-01-29 10:48:19 +02:00
irq.h KVM: switch to symbolic name for irq_states size 2012-07-20 16:12:16 -03:00
Kconfig kvm: Allow build-time configuration of KVM device assignment 2013-04-28 12:58:56 +03: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: Drop some unused functions from lapic 2013-07-25 13:42:38 +03:00
lapic.h KVM: Fix RTC interrupt coalescing tracking 2013-06-27 14:20:53 +03:00
Makefile KVM: get rid of $(addprefix ../../../virt/kvm/, ...) in Makefiles 2013-05-19 15:14:00 +03:00
mmu_audit.c KVM: do not release the error pfn 2012-08-06 16:04:57 +03:00
mmu.c KVM: x86: rename EMULATE_DO_MMIO 2013-07-29 09:01:14 +02:00
mmu.h KVM: MMU: fast invalidate all mmio sptes 2013-06-27 14:20:36 +03:00
mmutrace.h KVM: MMU: add tracepoint for check_mmio_spte 2013-06-27 14:20:37 +03:00
paging_tmpl.h KVM: MMU: fix check the reserved bits on the gpte of L2 2013-08-07 15:57:33 +02:00
pmu.c perf, kvm: Support the in_tx/in_tx_cp modifiers in KVM arch perfmon emulation v5 2013-07-19 18:24:45 +02:00
svm.c kvm: Add a tracepoint write_tsc_offset 2013-06-27 14:20:51 +03:00
trace.h kvm: Add a tracepoint write_tsc_offset 2013-06-27 14:20:51 +03:00
tss.h
vmx.c nEPT: Support LOAD_IA32_EFER entry/exit controls for L1 2013-08-07 15:57:34 +02:00
x86.c KVM: x86: handle singlestep during emulation 2013-07-29 09:01:14 +02:00
x86.h KVM: x86: Add code to track call origin for msr assignment 2012-11-30 18:26:12 -02:00