From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86: Check INVPCID feature bit in EBX of leaf 7 Date: Tue, 04 Sep 2012 14:58:38 +0300 Message-ID: <5045ECEE.60506@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "'kvm@vger.kernel.org'" To: "Mao, Junjie" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11536 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756773Ab2IDL6l (ORCPT ); Tue, 4 Sep 2012 07:58:41 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/01/2012 11:12 AM, Mao, Junjie wrote: > Checks and operations on the INVPCID feature bit should use EBX of CPUID leaf 7 > instead of ECX. > > Signed-off-by: Junjie Mao > --- > 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 c00f03d..002b4a5 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -6575,7 +6575,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, > @@ -6585,7 +6585,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); > } > } > Patch is whitespace damaged, please fix. -- error compiling committee.c: too many arguments to function