mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/3] x86: Capability bits fix and required bits sanity check
@ 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
                   ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Maciej Wieczor-Retman @ 2026-02-12 15:33 UTC (permalink / raw)
  To: brgerst, bp, ebiggers, jackmanb, peterz, pawan.kumar.gupta,
	maciej.wieczor-retman, mingo, dave.hansen, babu.moger,
	sohil.mehta, elena.reshetova, hpa, ubizjak, chang.seok.bae,
	darwi, ak, tglx, nik.borisov, xin
  Cc: linux-kernel, x86, m.wieczorretman, pawel.chmielewski

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.

Previous patchset versions:
v4: https://lore.kernel.org/all/20250724125346.2792543-1-maciej.wieczor-retman@intel.com/
v3: https://lore.kernel.org/all/20250724094554.2153919-1-maciej.wieczor-retman@intel.com/
v2: https://lore.kernel.org/all/20250723092250.3411923-1-maciej.wieczor-retman@intel.com/
v1: https://lore.kernel.org/all/20250722074439.4069992-1-maciej.wieczor-retman@intel.com/

Maciej Wieczor-Retman (3):
  x86/cpu: Clear feature bits disabled at compile-time
  x86/cpu: Check if feature string is non-zero
  x86/cpu: Required feature bits sanity check

 arch/x86/kernel/cpu/common.c       | 60 +++++++++++++++++++++++++++---
 arch/x86/kernel/cpu/cpuid-deps.c   | 21 ++---------
 arch/x86/tools/cpufeaturemasks.awk |  6 +++
 include/linux/cpu.h                |  2 +
 4 files changed, 65 insertions(+), 24 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2026-02-13 20:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-12 15:33 [PATCH v5 0/3] x86: Capability bits fix and required bits sanity check 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 ` [PATCH v5 0/3] x86: Capability bits fix and required " H. Peter Anvin

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®