x86/cpuid: Fix APIC bit clearing
authorFam Zheng <famzheng@amazon.com>
Fri, 7 Aug 2020 15:09:51 +0000 (17:09 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Aug 2020 15:09:51 +0000 (17:09 +0200)
The bug is obvious here, other places in this function used
"cpufeat_mask" correctly.

Fixed: b648feff8ea2 ("xen/x86: Improvements to in-hypervisor cpuid sanity checks")
Signed-off-by: Fam Zheng <famzheng@amazon.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 64219fa179c3e48adad12bfce3f6b3f1596cccbf
master date: 2020-07-29 19:03:41 +0100

xen/arch/x86/cpuid.c

index 6a4a787b68033bd86a0e6827cb589639d5deec66..63a03ef1e5e66bfe82fcdec947cc27eddf592271 100644 (file)
@@ -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