All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xenproject.org>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR
Date: Tue, 10 Sep 2019 11:26:30 +0100	[thread overview]
Message-ID: <ef4b2f5c-fe07-215e-638f-bd21bf9ec064@citrix.com> (raw)
In-Reply-To: <ba415d32-3b4e-1ac5-2968-ab01d526de00@suse.com>

On 10/09/2019 11:24, Jan Beulich wrote:
> On 09.09.2019 17:51, Andrew Cooper wrote:
>> --- a/xen/arch/x86/domctl.c
>> +++ b/xen/arch/x86/domctl.c
>> @@ -218,11 +218,16 @@ static int update_domain_cpuid_info(struct domain *d,
>>          if ( is_pv_domain(d) && ((levelling_caps & LCAP_7ab0) == LCAP_7ab0) )
>>          {
>>              uint64_t mask = cpuidmask_defaults._7ab0;
>> -            uint32_t eax = ctl->eax;
>> -            uint32_t ebx = p->feat._7b0;
>>  
>> -            if ( boot_cpu_data.x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
>> -                mask &= ((uint64_t)eax << 32) | ebx;
>> +            /*
>> +             * Leaf 7[0].eax is max_subleaf, not a feature mask.  Take it
>> +             * wholesale from the policy, but clamp the features in 7[0].ebx
>> +             * per usual.
>> +             */
>> +            if ( boot_cpu_data.x86_vendor &
>> +                 (X86_VENDOR_AMD | X86_VENDOR_HYGON) )
>> +                mask = (((uint64_t)p->feat.max_subleaf << 32) |
>> +                        ((uint32_t)mask | p->feat._7b0));
> Assuming you mean & instead of | here, with it fixed

Oops - I do.

> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Thanks,

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

      reply	other threads:[~2019-09-10 10:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 15:51 [Xen-devel] [PATCH] x86/cpuid: Fix handling of the CPUID.7[0].eax levelling MSR Andrew Cooper
2019-09-10  9:29 ` Roger Pau Monné
2019-09-10  9:35   ` Andrew Cooper
2019-09-10  9:57     ` Roger Pau Monné
2019-09-10 10:25       ` Andrew Cooper
2019-09-10 10:24 ` Jan Beulich
2019-09-10 10:26   ` Andrew Cooper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ef4b2f5c-fe07-215e-638f-bd21bf9ec064@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.