All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation
Date: Wed, 27 Jun 2018 10:11:32 -0600	[thread overview]
Message-ID: <5B33B73402000078001CE812@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <5936b8d9-033f-9568-db23-5f8b45b8d710@citrix.com>

>>> On 27.06.18 at 17:58, <andrew.cooper3@citrix.com> wrote:
> On 27/06/18 15:58, Jan Beulich wrote:
>>>>> On 27.06.18 at 15:55, <andrew.cooper3@citrix.com> wrote:
>>> @@ -316,6 +319,33 @@ static void __init calculate_raw_policy(void)
>>>              cpuid_count_leaf(7, i, &p->feat.raw[i]);
>>>      }
>>>  
>>> +    if ( p->basic.max_leaf >= 0xb )
>>> +    {
>>> +        union {
>>> +            struct cpuid_leaf l;
>>> +            struct cpuid_topo_leaf t;
>>> +        } u;
>>> +
>>> +        for ( i = 0; i < ARRAY_SIZE(p->topo.raw); ++i )
>>> +        {
>>> +            cpuid_count_leaf(0xb, i, &u.l);
>>> +
>>> +            if ( u.t.type == 0 )
>>> +                break;
>>> +
>>> +            p->topo.subleaf[i] = u.t;
>>> +        }
>>> +
>>> +        /*
>>> +         * The choice of CPUID_GUEST_NR_TOPO is per the manual.  It may need
>>> +         * to grow for future harware.
>> Missing d.
> 
> Where?  I'm afraid that after repeated re-reads, I can't spot any issue.

hardware

>>> @@ -108,7 +109,11 @@ struct cpuid_policy
>>>              uint64_t :64, :64; /* Leaf 0x9 - DCA */
>>>  
>>>              /* Leaf 0xa - Intel PMU. */
>>> -            uint8_t pmu_version;
>>> +            uint8_t pmu_version, _pmu[15];
>>> +
>>> +            uint64_t :64, :64; /* Leaf 0xb - Topology. */
>>> +            uint64_t :64, :64; /* Leaf 0xc - rsvd */
>>> +            uint64_t :64, :64; /* Leaf 0xd - XSTATE. */
>> I don't understand why you add the latter two lines, neither in general
>> nor in the particular context of this patch.
> 
> This is part of reducing the effort for people extending the CPUID
> leaves, by keeping the .basic union in line with max_leaf.
> 
> There are further non-subleaf leaves beyond this point (0x15/0x16) and
> I've noticed several mistakes with newer submitted series.  I'd much
> rather do this myself once now, than attempt to explain it to others
> during code review.

Ah, I see. If you make the commit message say so,
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan



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

  parent reply	other threads:[~2018-06-27 16:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27 13:55 [PATCH 0/2] x86/cpuid: Trivial fixes Andrew Cooper
2018-06-27 13:55 ` [PATCH 1/2] x86/cpuid: Fix up stale comments Andrew Cooper
2018-06-27 14:53   ` Jan Beulich
2018-06-28  8:21   ` Roger Pau Monné
2018-06-27 13:55 ` [PATCH 2/2] x86/cpuid: Alter the policy logic for leaf 0xb to be multi-invocation Andrew Cooper
2018-06-27 14:58   ` Jan Beulich
2018-06-27 15:58     ` Andrew Cooper
2018-06-27 16:00       ` Wei Liu
2018-06-27 16:01         ` Andrew Cooper
2018-06-27 16:11       ` Jan Beulich [this message]
2018-06-27 17:11   ` [PATCH v2 " Andrew Cooper
2018-06-28  9:00     ` Roger Pau Monné
2018-06-28 10:14     ` Wei Liu

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=5B33B73402000078001CE812@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.