diff options
author | Wanpeng Li <wanpeng.li@hotmail.com> | 2017-05-11 11:58:56 +0200 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-05-15 16:08:57 +0200 |
commit | fce6ac4c0508b985d497e3d9c8eff28ec8a43182 (patch) | |
tree | 268b52fb044caf3ae535aac3f6ce780ca17a1aa4 /arch | |
parent | KVM: x86: Fix load damaged SSEx MXCSR register (diff) | |
download | linux-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.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) 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()) |