All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>,
	Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v2 2/4] x86/cpuid: Factor common parsing out of parse_xen_cpuid()
Date: Thu, 16 Dec 2021 17:41:30 +0100	[thread overview]
Message-ID: <49a6035e-9291-7a67-ad78-be6ebde79def@suse.com> (raw)
In-Reply-To: <20211215222115.6829-3-andrew.cooper3@citrix.com>

On 15.12.2021 23:21, Andrew Cooper wrote:
> dom0-cpuid= is going to want to reuse the common parsing loop, so factor it
> out into parse_cpuid().
> 
> Irritatingly, despite being static const, the features[] array gets duplicated
> each time parse_cpuid() is inlined.  As it is a large (and ever growing with
> new CPU features) datastructure, move it to being file scope so all inlines
> use the same single object.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

> We probably want to be wary of fallout from this pattern elsewhere.  I only
> noticed it by chance.

While that sounds at least close to a bug, there might by some subtle reason
for why they have to do it that way.

Jan



  reply	other threads:[~2021-12-16 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 22:21 [PATCH v2 0/4] x86/cpuid: Introduce dom0-cpuid= Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 1/4] x86/cpuid: Split dom0 handling out of init_domain_cpuid_policy() Andrew Cooper
2021-12-16 16:38   ` Jan Beulich
2021-12-16 16:41     ` Andrew Cooper
2021-12-16 16:51       ` Jan Beulich
2021-12-16 16:54         ` Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 2/4] x86/cpuid: Factor common parsing out of parse_xen_cpuid() Andrew Cooper
2021-12-16 16:41   ` Jan Beulich [this message]
2021-12-16 16:47     ` Andrew Cooper
2021-12-15 22:21 ` [PATCH v2 3/4] x86/cpuid: Introduce dom0-cpuid command line option Andrew Cooper
2021-12-16 11:56   ` Andrew Cooper
2021-12-16 16:46     ` Jan Beulich
2021-12-16 16:45   ` Jan Beulich
2021-12-15 22:21 ` [PATCH v2 4/4] x86/cpuid: Advertise SERIALIZE by default to guests Andrew Cooper
2021-12-16 16:48   ` Jan Beulich

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=49a6035e-9291-7a67-ad78-be6ebde79def@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.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.