Re: [PATCH v11 3/4] x86/cpu: Do a sanity check on required feature bits

From: Borislav Petkov

Date: Mon Mar 23 2026 - 13:02:22 EST


On Fri, Mar 20, 2026 at 12:50:25PM +0000, Maciej Wieczor-Retman wrote:
> From: Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>
>
> After CPU identification concludes, do a sanity check by comparing the
> final x86_capability bitmask with the pre-defined required feature bits.

The use being?

AFAICT, the required features are:

$ cat arch/x86/include/generated/asm/cpufeaturemasks.h

...

/*
* REQUIRED features:
*
* FPU MSR PAE CX8 CMOV FXSR XMM XMM2 LM NOPL ALWAYS CPUID
*/

AFAICT, if *any* of those features are not set, the machine will crash'n'burn
anyway.

So the required features will be "enforced" pretty early :-)

Otherwise they're not really required.

And besides, what's

arch/x86/kernel/verify_cpu.S

for if not for that?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette