kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Remove unused bits checking for EPT logic.
@ 2012-12-04 17:55 Xiantao Zhang
  2012-12-04 17:55 ` [PATCH 1/2] kvm: remove unnecessary bit checking for ept violation Xiantao Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Xiantao Zhang @ 2012-12-04 17:55 UTC (permalink / raw)
  To: kvm; +Cc: gleb, mtosatti

From: Zhang Xiantao <xiantao.zhang@intel.com>

This two bits{bit 6 in exit_qualification, and bit 24 in VMX_EPT_VPID_CAP_MSR} 
are not available in SDM, remove them for consistence.

Zhang Xiantao (2):
  kvm: remove unnecessary bit checking for ept violation
  kvm: don't use bit24 for detecting address-specific invalidation
    capability

 arch/x86/include/asm/vmx.h |    3 +--
 arch/x86/kvm/vmx.c         |   21 ---------------------
 2 files changed, 1 insertions(+), 23 deletions(-)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] kvm: remove unnecessary bit checking for ept violation
  2012-12-04 17:55 [PATCH 0/2] Remove unused bits checking for EPT logic Xiantao Zhang
@ 2012-12-04 17:55 ` Xiantao Zhang
  2012-12-04 17:55 ` [PATCH 2/2] kvm: don't use bit24 for detecting address-specific invalidation capability Xiantao Zhang
  2012-12-05 14:36 ` [PATCH 0/2] Remove unused bits checking for EPT logic Gleb Natapov
  2 siblings, 0 replies; 4+ messages in thread
From: Xiantao Zhang @ 2012-12-04 17:55 UTC (permalink / raw)
  To: kvm; +Cc: gleb, mtosatti

From: Zhang Xiantao <xiantao.zhang@intel.com>

Bit 6 in EPT vmexit's exit qualification is not defined in SDM, so remove it.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 arch/x86/kvm/vmx.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index ad6b1dd..d077996 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -4827,11 +4827,6 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu)
 
 	exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
 
-	if (exit_qualification & (1 << 6)) {
-		printk(KERN_ERR "EPT: GPA exceeds GAW!\n");
-		return -EINVAL;
-	}
-
 	gla_validity = (exit_qualification >> 7) & 0x3;
 	if (gla_validity != 0x3 && gla_validity != 0x1 && gla_validity != 0) {
 		printk(KERN_ERR "EPT: Handling EPT violation failed!\n");
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] kvm: don't use bit24 for detecting address-specific invalidation capability
  2012-12-04 17:55 [PATCH 0/2] Remove unused bits checking for EPT logic Xiantao Zhang
  2012-12-04 17:55 ` [PATCH 1/2] kvm: remove unnecessary bit checking for ept violation Xiantao Zhang
@ 2012-12-04 17:55 ` Xiantao Zhang
  2012-12-05 14:36 ` [PATCH 0/2] Remove unused bits checking for EPT logic Gleb Natapov
  2 siblings, 0 replies; 4+ messages in thread
From: Xiantao Zhang @ 2012-12-04 17:55 UTC (permalink / raw)
  To: kvm; +Cc: gleb, mtosatti

From: Zhang Xiantao <xiantao.zhang@intel.com>

Bit24 in VMX_EPT_VPID_CAP_MASI is  not used for address-specific invalidation capability
reporting, so remove it from KVM to avoid conflicts in future.

Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
---
 arch/x86/include/asm/vmx.h |    3 +--
 arch/x86/kvm/vmx.c         |   16 ----------------
 2 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h
index 36ec21c..c2d56b3 100644
--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -445,8 +445,7 @@ enum vmcs_field {
 #define VMX_EPTP_WB_BIT				(1ull << 14)
 #define VMX_EPT_2MB_PAGE_BIT			(1ull << 16)
 #define VMX_EPT_1GB_PAGE_BIT			(1ull << 17)
-#define VMX_EPT_AD_BIT					(1ull << 21)
-#define VMX_EPT_EXTENT_INDIVIDUAL_BIT		(1ull << 24)
+#define VMX_EPT_AD_BIT				    (1ull << 21)
 #define VMX_EPT_EXTENT_CONTEXT_BIT		(1ull << 25)
 #define VMX_EPT_EXTENT_GLOBAL_BIT		(1ull << 26)
 
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d077996..81b1aa6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -802,11 +802,6 @@ static inline bool cpu_has_vmx_ept_ad_bits(void)
 	return vmx_capability.ept & VMX_EPT_AD_BIT;
 }
 
-static inline bool cpu_has_vmx_invept_individual_addr(void)
-{
-	return vmx_capability.ept & VMX_EPT_EXTENT_INDIVIDUAL_BIT;
-}
-
 static inline bool cpu_has_vmx_invept_context(void)
 {
 	return vmx_capability.ept & VMX_EPT_EXTENT_CONTEXT_BIT;
@@ -1051,17 +1046,6 @@ static inline void ept_sync_context(u64 eptp)
 	}
 }
 
-static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa)
-{
-	if (enable_ept) {
-		if (cpu_has_vmx_invept_individual_addr())
-			__invept(VMX_EPT_EXTENT_INDIVIDUAL_ADDR,
-					eptp, gpa);
-		else
-			ept_sync_context(eptp);
-	}
-}
-
 static __always_inline unsigned long vmcs_readl(unsigned long field)
 {
 	unsigned long value;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Remove unused bits checking for EPT logic.
  2012-12-04 17:55 [PATCH 0/2] Remove unused bits checking for EPT logic Xiantao Zhang
  2012-12-04 17:55 ` [PATCH 1/2] kvm: remove unnecessary bit checking for ept violation Xiantao Zhang
  2012-12-04 17:55 ` [PATCH 2/2] kvm: don't use bit24 for detecting address-specific invalidation capability Xiantao Zhang
@ 2012-12-05 14:36 ` Gleb Natapov
  2 siblings, 0 replies; 4+ messages in thread
From: Gleb Natapov @ 2012-12-05 14:36 UTC (permalink / raw)
  To: Xiantao Zhang; +Cc: kvm, mtosatti

On Wed, Dec 05, 2012 at 01:55:13AM +0800, Xiantao Zhang wrote:
> From: Zhang Xiantao <xiantao.zhang@intel.com>
> 
> This two bits{bit 6 in exit_qualification, and bit 24 in VMX_EPT_VPID_CAP_MSR} 
> are not available in SDM, remove them for consistence.
> 
> Zhang Xiantao (2):
>   kvm: remove unnecessary bit checking for ept violation
>   kvm: don't use bit24 for detecting address-specific invalidation
>     capability
> 
>  arch/x86/include/asm/vmx.h |    3 +--
>  arch/x86/kvm/vmx.c         |   21 ---------------------
>  2 files changed, 1 insertions(+), 23 deletions(-)

Applied to queue. Thanks.

--
			Gleb.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-05 14:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 17:55 [PATCH 0/2] Remove unused bits checking for EPT logic Xiantao Zhang
2012-12-04 17:55 ` [PATCH 1/2] kvm: remove unnecessary bit checking for ept violation Xiantao Zhang
2012-12-04 17:55 ` [PATCH 2/2] kvm: don't use bit24 for detecting address-specific invalidation capability Xiantao Zhang
2012-12-05 14:36 ` [PATCH 0/2] Remove unused bits checking for EPT logic Gleb Natapov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).