x86/cpufeatures: Add {REQUIRED,DISABLED} feature configs
authorH. Peter Anvin (Intel) <hpa@zytor.com>
Fri, 28 Feb 2025 08:23:35 +0000 (00:23 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 19 Mar 2025 10:15:11 +0000 (11:15 +0100)
commit3d37d9396eb37a62ba75bf8f3bd934500cf64bf0
tree71368a4af52285db7ff89367d9078b274bf8256e
parentf666c92090a41ac5524dade63ff96b3adcf8c2ab
x86/cpufeatures: Add {REQUIRED,DISABLED} feature configs

Required and disabled feature masks completely rely on build configs,
i.e., once a build config is fixed, so are the feature masks.

To prepare for auto-generating the <asm/cpufeaturemasks.h> header
with required and disabled feature masks based on a build config,
add feature Kconfig items:

  - X86_REQUIRED_FEATURE_x
  - X86_DISABLED_FEATURE_x

each of which may be set to "y" if and only if its preconditions from
current build config are met.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Signed-off-by: Xin Li (Intel) <xin@zytor.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250228082338.73859-3-xin@zytor.com
arch/x86/Kconfig
arch/x86/Kconfig.cpufeatures [new file with mode: 0644]