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

Re: [PATCH] x86/cpuid: Fix APIC bit clearing


  • To: <fam@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 29 Jul 2020 19:04:52 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: famzheng@xxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 29 Jul 2020 18:05:09 +0000
  • Ironport-sdr: qsmU7kjoJyvZ0VhlRx6UHpYF/AIwuLltpHQ0hQhIP9cV3OfCPgWLSxfW9T5FXrNkUeS4vkFK9n kAUVOFh/1CBT5GhLfVXkuF5KpIKPZy2nbjfsMXYbdVPHfIMvH8Jj/15FkocEOioXKhFzQLcSNo GaUtVqEq1Zwv4eKQhx0xZFhaH9gcO/55JFbSZlK6MVq4VHjqffaMxaeGXUqQTm26v76DK6nbEx GeNil7uVgnB2iq0TqYrdzkfrGXTuNQw38yzvXHEc0h6BA879PFXirx9ppXar933PAfOTCZ52KK Nas=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29/07/2020 17:33, fam@xxxxxxxxxx wrote:
> 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

Oops.  Good spot.

However, the Fixes you identify was just code movement.  The bug was
actually introduced in b648feff8ea2c9bff250b4b262704fb100b1f9cf two
years earlier.

I've tweaked the Fixes line and committed.

~Andrew



 


Rackspace

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