public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] KVM: x86: Check INVPCID feature bit in EBX of leaf 7
@ 2012-09-07  7:36 Ren, Yongjie
  2012-09-09 14:34 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Ren, Yongjie @ 2012-09-07  7:36 UTC (permalink / raw)
  To: 'kvm@vger.kernel.org'; +Cc: Avi Kivity

Checks and operations on the INVPCID feature bit should use EBX of CPUID leaf 7 instead of ECX.

Changes from v1:
	- fixed patch format issue.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Yongjie Ren <yongjien.ren@intel.com>
---
 arch/x86/kvm/vmx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 248c2b4..40eacea 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -6552,7 +6552,7 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
 	/* Exposing INVPCID only when PCID is exposed */
 	best = kvm_find_cpuid_entry(vcpu, 0x7, 0);
 	if (vmx_invpcid_supported() &&
-	    best && (best->ecx & bit(X86_FEATURE_INVPCID)) &&
+	    best && (best->ebx & bit(X86_FEATURE_INVPCID)) &&
 	    guest_cpuid_has_pcid(vcpu)) {
 		exec_control |= SECONDARY_EXEC_ENABLE_INVPCID;
 		vmcs_write32(SECONDARY_VM_EXEC_CONTROL,
@@ -6562,7 +6562,7 @@ static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
 		vmcs_write32(SECONDARY_VM_EXEC_CONTROL,
 			     exec_control);
 		if (best)
-			best->ecx &= ~bit(X86_FEATURE_INVPCID);
+			best->ebx &= ~bit(X86_FEATURE_INVPCID);
 	}
 }
 
-- 
1.7.1


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

* Re: [PATCH v2] KVM: x86: Check INVPCID feature bit in EBX of leaf 7
  2012-09-07  7:36 [PATCH v2] KVM: x86: Check INVPCID feature bit in EBX of leaf 7 Ren, Yongjie
@ 2012-09-09 14:34 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-09-09 14:34 UTC (permalink / raw)
  To: Ren, Yongjie; +Cc: 'kvm@vger.kernel.org'

On 09/07/2012 10:36 AM, Ren, Yongjie wrote:
> Checks and operations on the INVPCID feature bit should use EBX of CPUID leaf 7 instead of ECX.
> 
> Changes from v1:
> 	- fixed patch format issue.
> 

Thanks, applied to master for 3.6.


-- 
error compiling committee.c: too many arguments to function

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

end of thread, other threads:[~2012-09-09 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07  7:36 [PATCH v2] KVM: x86: Check INVPCID feature bit in EBX of leaf 7 Ren, Yongjie
2012-09-09 14:34 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox