Re: [RFC PATCH] x86/cpu: Change AMD uarch detection

From: Borislav Petkov

Date: Wed Oct 28 2026 - 00:47:10 EST


On Tue, Oct 27, 2026 at 08:20:49AM -0700, Sean Christopherson wrote:
> This is better than X86_FEATURE_ZENx, as I always found the lack of inclusivity,
> e.g. ZEN4 not lighting up ZEN3, to be confusing/surprising.

Yeah, I didn't think of this simple scheme back then.

> But why invent another scheme? What stops AMD from implementing precise macros
> as arch/x86/include/asm/intel-family.h does? Providing range-based checks would
> "just" require more macros, no?

That's exactly the reason - moar macros. I wanna keep it simple and instead of
having at least 5 OR_LATER macros, I wanna simply do:

if x86_uarch >= AMD_UARCH...

And who knows, if in the future the scheme becomes even simpler, like it was
before, we won't need those either.

But I might keep the uarch checks even then because this is a lot more telling
- we want the microarchitecture version, not some family, model or stepping.

And mapping f/m/s to uarch we already do.

Thx.

--
Regards/Gruss,
Boris.

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