Skip to content

x86: Capability bits fix and required bits sanity check

Maciej Wieczor-Retman lkml 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest4 patches 24 repliesIn review
  2. v114 patches 44 repliesSuperseded
  3. v103 patches 7 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v93 patches7 repliesSuperseded
v83 patches13 repliesSuperseded
v73 patches2 repliesSuperseded
v63 patches1 replySuperseded
v53 patches20 repliesSuperseded

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/cpu: Clear feature bits disabled at compile-timearch/x86/kernel/cpu/common.c arch/x86/tools/cpufeaturemasks.awk+8 -10 replies
2/4x86/cpu: Check if feature string is non-zeroarch/x86/kernel/cpu/common.c arch/x86/kernel/cpu/cpu.h arch/x86/kernel/cpu/cpuid-deps.c+32 -2110 replies
3/4x86/cpu: Do a sanity check on required feature bitsarch/x86/kernel/cpu/common.c+28 -02 replies
4/4x86/cpu: Clear feature bits whose dependencies were clearedarch/x86/include/asm/cpufeature.h arch/x86/kernel/cpu/common.c arch/x86/kernel/cpu/cpuid-deps.c+17 -06 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchSohil Mehta
1/4R-b
2/4R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v12 thread

Cover letter [PATCH v12 0/4] x86: Capability bits fix and required bits sanity check

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. While currently not a problem (all the features in the checked list have corresponding strings) it may cause a failure if more entries are added. The cleanup patch fixes that and simplifies the other two instances.

Patches are based on v7.0-rc5

Previous patchset versions:

v11: https://lore.kernel.org/all/[email protected]/
v10: https://lore.kernel.org/all/[email protected]/
v9:  https://lore.kernel.org/all/[email protected]/
v8:  https://lore.kernel.org/all/[email protected]/
v7:  https://lore.kernel.org/all/[email protected]/
v6:  https://lore.kernel.org/all/[email protected]/
v5:  https://lore.kernel.org/all/[email protected]/
v4:  https://lore.kernel.org/all/[email protected]/
v3:  https://lore.kernel.org/all/[email protected]/
v2:  https://lore.kernel.org/all/[email protected]/
v1:  https://lore.kernel.org/all/[email protected]/

Maciej Wieczor-Retman (4):
x86/cpu: Clear feature bits disabled at compile-time x86/cpu: Check if feature string is non-zero x86/cpu: Do a sanity check on required feature bits x86/cpu: Clear feature bits whose dependencies were cleared

 arch/x86/include/asm/cpufeature.h  |  1 +
 arch/x86/kernel/cpu/common.c       | 63 +++++++++++++++++++++++++++---
 arch/x86/kernel/cpu/cpu.h          |  4 ++
 arch/x86/kernel/cpu/cpuid-deps.c   | 21 +++++-----
 arch/x86/tools/cpufeaturemasks.awk |  6 +++
 5 files changed, 79 insertions(+), 16 deletions(-)
Signature · 1 line
2.53.0