[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/cpuid: Fix APIC bit clearing


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: fam@xxxxxxxxxx
  • Date: Wed, 29 Jul 2020 17:33:41 +0100
  • Arc-authentication-results: i=1; mx.zoho.com.cn; dkim=pass header.i=euphon.net; spf=pass smtp.mailfrom=fam@xxxxxxxxxx; dmarc=pass header.from=<fam@xxxxxxxxxx> header.from=<fam@xxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1596040431; h=Cc:Date:From:Message-ID:Subject:To; bh=qf+v61LzDCqXASCfRuZXnlqCP79J34yOy7yE9dChAZs=; b=NuvtotFev6VztUSwIBAF0o4NuXR+80lBwaIoF0LOTDVzE2roLqxtxXIvgc5deQcare8x0nrMnQSb54gJwtQotsPkczw6V5nviKlZo5kSBqo8L49a6Xx1A5O5k9Ozco7pb1uwFHdxfQf6e8h3VmzExsWmwOYZ5Hknn7yEqJOh+fU=
  • Arc-seal: i=1; a=rsa-sha256; t=1596040431; cv=none; d=zoho.com.cn; s=zohoarc; b=RAIS9PAY2Jt1iDjYHPgQ/6xupBEovUgXf1YflQUBodAexRxpbpob94u2bKHyOi5rG3H2EiVB7SdGqn7rm2rv3m6b1hrH97egxH428Ju7e9SFuX60Vti6/eee6SPmOt1nQX63m3xviOiTRNbr3Pjo92NuBKDc8ZrcQv5WMu1qXrg=
  • Cc: fam@xxxxxxxxxx, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, famzheng@xxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 30 Jul 2020 04:09:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Fam Zheng <famzheng@xxxxxxxxxx>

The bug is obvious here, other places in this function used
"cpufeat_mask" correctly.

Signed-off-by: Fam Zheng <famzheng@xxxxxxxxxx>
Fixes: 46df8a65 ("x86/cpuid: Effectively remove pv_cpuid() and hvm_cpuid()")
---
 xen/arch/x86/cpuid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 6a4a787b68..63a03ef1e5 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -1057,7 +1057,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
         {
             /* Fast-forward MSR_APIC_BASE.EN. */
             if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
-                res->d &= ~cpufeat_bit(X86_FEATURE_APIC);
+                res->d &= ~cpufeat_mask(X86_FEATURE_APIC);
 
             /*
              * PSE36 is not supported in shadow mode.  This bit should be
-- 
2.17.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.