From: Fam Zheng Date: Wed, 29 Jul 2020 17:51:45 +0000 (+0100) Subject: x86/cpuid: Fix APIC bit clearing X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1813 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=64219fa179c3e48adad12bfce3f6b3f1596cccbf;p=xen.git x86/cpuid: Fix APIC bit clearing 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 Reviewed-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- 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