Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639276

[PATCH v2 2/2] KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled

From Wanpeng Li <kernellwp@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 2/2] KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled
Date 2017-05-11 12:00 +0200
Message-ID <tFT33-4G6-3@gated-at.bofh.it> (permalink)
References <tFT33-4G6-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Wanpeng Li <wanpeng.li@hotmail.com>

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>
---
 arch/x86/kvm/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c6f4ad4..04c16ea 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())
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2 2/2] KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled Wanpeng Li <kernellwp@gmail.com> - 2017-05-11 12:00 +0200

csiph-web