mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-12 12:06:44 +07:00
KVM: nVMX: Fix EPT switching advertising
I can use vmxcap tool to observe "EPTP Switching yes" even if EPT is not exposed to L1. EPT switching is advertised unconditionally since it is emulated, however, it can be treated as an extended feature for EPT and it should not be advertised if EPT itself is not exposed. This patch fixes it. Reviewed-by: David Hildenbrand <david@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Jim Mattson <jmattson@google.com> Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
This commit is contained in:
parent
cc3d967f7e
commit
575b3a2cb4
@ -2842,8 +2842,9 @@ static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx)
|
||||
* Advertise EPTP switching unconditionally
|
||||
* since we emulate it
|
||||
*/
|
||||
vmx->nested.nested_vmx_vmfunc_controls =
|
||||
VMX_VMFUNC_EPTP_SWITCHING;
|
||||
if (enable_ept)
|
||||
vmx->nested.nested_vmx_vmfunc_controls =
|
||||
VMX_VMFUNC_EPTP_SWITCHING;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user