diff options
author | Wanpeng Li <wanpeng.li@hotmail.com> | 2017-05-11 05:58:56 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-05-15 10:08:57 -0400 |
commit | fce6ac4c0508b985d497e3d9c8eff28ec8a43182 (patch) | |
tree | 268b52fb044caf3ae535aac3f6ce780ca17a1aa4 | |
parent | a575813bfe4bc15aba511a5e91e61d242bff8b9d (diff) |
KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled
We can observe eptad kvm_intel module parameter is still Y
even if ept is disabled which is weird. This patch will
not enable EPT A/D feature if EPT feature is disabled.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 7698e8f321bf..72f78396bc09 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -6504,7 +6504,7 @@ static __init int hardware_setup(void) | |||
6504 | enable_ept_ad_bits = 0; | 6504 | enable_ept_ad_bits = 0; |
6505 | } | 6505 | } |
6506 | 6506 | ||
6507 | if (!cpu_has_vmx_ept_ad_bits()) | 6507 | if (!cpu_has_vmx_ept_ad_bits() || !enable_ept) |
6508 | enable_ept_ad_bits = 0; | 6508 | enable_ept_ad_bits = 0; |
6509 | 6509 | ||
6510 | if (!cpu_has_vmx_unrestricted_guest()) | 6510 | if (!cpu_has_vmx_unrestricted_guest()) |