mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
KVM: VMX: Disable unrestricted guest when EPT disabled
commit 046d87103a 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e075e2caeb
commit
926fd42e59
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user