From: "H. Peter Anvin" <hpa@zytor.com>
To: Maciej Wieczor-Retman <m.wieczorretman@pm.me>,
brgerst@gmail.com, bp@alien8.de, ebiggers@google.com,
jackmanb@google.com, peterz@infradead.org,
pawan.kumar.gupta@linux.intel.com,
maciej.wieczor-retman@intel.com, mingo@redhat.com,
dave.hansen@linux.intel.com, babu.moger@amd.com,
sohil.mehta@intel.com, elena.reshetova@intel.com,
ubizjak@gmail.com, chang.seok.bae@intel.com, darwi@linutronix.de,
ak@linux.intel.com, tglx@kernel.org, nik.borisov@suse.com,
xin@zytor.com
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
pawel.chmielewski@linux.intel.com
Subject: Re: [PATCH v5 0/3] x86: Capability bits fix and required bits sanity check
Date: Fri, 13 Feb 2026 12:23:44 -0800 [thread overview]
Message-ID: <a4b4225f-7977-4af8-ab6d-d9645d1090f6@zytor.com> (raw)
In-Reply-To: <cover.1770908783.git.m.wieczorretman@pm.me>
On 2026-02-12 07:33, Maciej Wieczor-Retman wrote:
> Series aims to fix the inconsistency between the cpuinfo behavior and
> the documentation. Specifically the features that are not compiled are
> still present in the cpuinfo bitmasks as enabled. This is not in line
> with the documentation which specifies that not-compiled features are
> not present in /proc/cpuinfo.
>
> Along adding the disabled feature bitmask initializer array, the
> complementary required bitmask initializer is also added. It can be used
> to provide a sanity check, after the cpu identification is finished, to
> make sure every required bit is set in the final bitmask. A warning with
> the cpu number and all required bits that were not set is emitted in
> case of the sanity check failure.
>
> Before adding the sanity check a small cleanup can be done. Three places
> open code an operation that retrieves either a feature string or, if the
> string is not present, the feature number in word:bit format. One of
> these places also doesn't check whether the string is actually there or
> not. The cleanup patch fixes that and simplifies the other two
> instances.
I am explicitly NOT suggesting this for this patchset, but in the future, I
would also like to see even the CPUID flags NOT included in /proc/cpuinfo to
be in the table, for the purpose of displaying kernel messages. I fully agree
that including them in /proc/cpuinfo is an unnecessary burden, but it would
still be good to be able to print them in messages in cleartext, *especially*
for when bits get reassigned or recycled.
I would also like to see the module ID strings for CPU features change from
using the numeric representation to the string representation for the same
reasons.
However, let me also say this: I don't think it makes any sense whatsoever to
aggressively compact those CPUID leaves that are likely to grow more bits in
the future (which aren't everyone, of course). It isn't like these words are
particularly expensive.
-hpa
prev parent reply other threads:[~2026-02-13 20:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 15:33 Maciej Wieczor-Retman
2026-02-12 15:34 ` [PATCH v5 1/3] x86/cpu: Clear feature bits disabled at compile-time Maciej Wieczor-Retman
2026-02-12 15:58 ` Borislav Petkov
2026-02-12 16:23 ` Maciej Wieczor-Retman
2026-02-12 21:34 ` H. Peter Anvin
2026-02-12 21:51 ` Borislav Petkov
2026-02-12 23:04 ` Sohil Mehta
2026-02-12 23:47 ` Borislav Petkov
2026-02-13 0:14 ` Sohil Mehta
2026-02-13 0:36 ` Sohil Mehta
2026-02-13 0:58 ` Borislav Petkov
2026-02-13 20:11 ` H. Peter Anvin
2026-02-12 15:35 ` [PATCH v5 2/3] x86/cpu: Check if feature string is non-zero Maciej Wieczor-Retman
2026-02-13 0:28 ` Sohil Mehta
2026-02-13 10:02 ` Maciej Wieczor-Retman
2026-02-13 18:22 ` Sohil Mehta
2026-02-13 19:10 ` Maciej Wieczor-Retman
2026-02-13 20:00 ` Sohil Mehta
2026-02-13 20:26 ` Maciej Wieczor-Retman
2026-02-13 20:15 ` H. Peter Anvin
2026-02-13 20:24 ` Maciej Wieczor-Retman
2026-02-12 15:35 ` [PATCH v5 3/3] x86/cpu: Required feature bits sanity check Maciej Wieczor-Retman
2026-02-13 20:17 ` H. Peter Anvin
2026-02-13 20:23 ` H. Peter Anvin [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=a4b4225f-7977-4af8-ab6d-d9645d1090f6@zytor.com \
--to=hpa@zytor.com \
--cc=ak@linux.intel.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=chang.seok.bae@intel.com \
--cc=darwi@linutronix.de \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=elena.reshetova@intel.com \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.wieczorretman@pm.me \
--cc=maciej.wieczor-retman@intel.com \
--cc=mingo@redhat.com \
--cc=nik.borisov@suse.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=pawel.chmielewski@linux.intel.com \
--cc=peterz@infradead.org \
--cc=sohil.mehta@intel.com \
--cc=tglx@kernel.org \
--cc=ubizjak@gmail.com \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®