summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2010-03-19 15:47:38 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 07:41:21 -0700
commit926fd42e594095f1967b6df75f3db82a1988c58d (patch)
treec9c7ffa660d762fd053fd778dcd545cfe0bf6b3b /arch
parente075e2caebf932a85786e6d5eb544ee4b0e1441e (diff)
downloadlwn-926fd42e594095f1967b6df75f3db82a1988c58d.tar.gz
lwn-926fd42e594095f1967b6df75f3db82a1988c58d.zip
KVM: VMX: Disable unrestricted guest when EPT disabled
commit 046d87103addc117f0d397196e85189722d4d7de upstream Otherwise would cause VMEntry failure when using ept=0 on unrestricted guest supported processors. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6ee492762377..6bb366651813 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2302,8 +2302,10 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx)
~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES;
if (vmx->vpid == 0)
exec_control &= ~SECONDARY_EXEC_ENABLE_VPID;
- if (!enable_ept)
+ if (!enable_ept) {
exec_control &= ~SECONDARY_EXEC_ENABLE_EPT;
+ enable_unrestricted_guest = 0;
+ }
if (!enable_unrestricted_guest)
exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST;
vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_control);