summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorWanpeng Li <wanpeng.li@hotmail.com>2017-05-11 11:58:56 +0200
committerRadim Krčmář <rkrcmar@redhat.com>2017-05-15 16:08:57 +0200
commitfce6ac4c0508b985d497e3d9c8eff28ec8a43182 (patch)
tree268b52fb044caf3ae535aac3f6ce780ca17a1aa4 /arch
parentKVM: x86: Fix load damaged SSEx MXCSR register (diff)
downloadlinux-fce6ac4c0508b985d497e3d9c8eff28ec8a43182.tar.xz
linux-fce6ac4c0508b985d497e3d9c8eff28ec8a43182.zip
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx.c2
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)
enable_ept_ad_bits = 0;
}
- if (!cpu_has_vmx_ept_ad_bits())
+ if (!cpu_has_vmx_ept_ad_bits() || !enable_ept)
enable_ept_ad_bits = 0;
if (!cpu_has_vmx_unrestricted_guest())