aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorSheng Yang <sheng@linux.intel.com>2009-11-27 16:46:26 +0800
committerAvi Kivity <avi@redhat.com>2009-12-03 09:32:25 +0200
commit046d87103addc117f0d397196e85189722d4d7de (patch)
tree08896ae75f4842f1ae709f0683cec20d5a3e25cb /arch/x86/kvm
parenteb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb (diff)
downloadkernel_goldelico_gta04-046d87103addc117f0d397196e85189722d4d7de.zip
kernel_goldelico_gta04-046d87103addc117f0d397196e85189722d4d7de.tar.gz
kernel_goldelico_gta04-046d87103addc117f0d397196e85189722d4d7de.tar.bz2
KVM: VMX: Disable unrestricted guest when EPT disabled
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>
Diffstat (limited to 'arch/x86/kvm')
-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 778f059..ed97c6c 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2309,8 +2309,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;
if (!ple_gap)