aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-08-06 04:39:56 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-08-07 09:57:47 -0400
commit574353496081bce251fdd82fbfb67ca9fd6e0fcf (patch)
treedc02dfadaccba3d7d06371590358c327da8e5596 /arch/x86/kvm/vmx.c
parentca72d970ff9aaf6f7e321ead9d4775c5aa0cdb0b (diff)
KVM: nVMX: Fix up VM_ENTRY_IA32E_MODE control feature reporting
Do not report that we can enter the guest in 64-bit mode if the host is 32-bit only. This is not supported by KVM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c041023f5d8b..d9d0a94eb509 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2212,9 +2212,13 @@ static __init void nested_vmx_setup_ctls_msrs(void)
2212 /* If bit 55 of VMX_BASIC is off, bits 0-8 and 12 must be 1. */ 2212 /* If bit 55 of VMX_BASIC is off, bits 0-8 and 12 must be 1. */
2213 nested_vmx_entry_ctls_low = VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR; 2213 nested_vmx_entry_ctls_low = VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR;
2214 nested_vmx_entry_ctls_high &= 2214 nested_vmx_entry_ctls_high &=
2215 VM_ENTRY_LOAD_IA32_PAT | VM_ENTRY_IA32E_MODE; 2215#ifdef CONFIG_X86_64
2216 VM_ENTRY_IA32E_MODE |
2217#endif
2218 VM_ENTRY_LOAD_IA32_PAT;
2216 nested_vmx_entry_ctls_high |= (VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR | 2219 nested_vmx_entry_ctls_high |= (VM_ENTRY_ALWAYSON_WITHOUT_TRUE_MSR |
2217 VM_ENTRY_LOAD_IA32_EFER); 2220 VM_ENTRY_LOAD_IA32_EFER);
2221
2218 /* cpu-based controls */ 2222 /* cpu-based controls */
2219 rdmsr(MSR_IA32_VMX_PROCBASED_CTLS, 2223 rdmsr(MSR_IA32_VMX_PROCBASED_CTLS,
2220 nested_vmx_procbased_ctls_low, nested_vmx_procbased_ctls_high); 2224 nested_vmx_procbased_ctls_low, nested_vmx_procbased_ctls_high);