]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
x86/cpuid: Fix APIC bit clearing
authorFam Zheng <famzheng@amazon.com>
Wed, 29 Jul 2020 17:51:45 +0000 (18:51 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 29 Jul 2020 18:03:41 +0000 (19:03 +0100)
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>
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