mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Borislav Petkov <bp@alien8.de>
Cc: x86-ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] x86/cpu: Change AMD uarch detection
Date: Wed, 28 Oct 2026 07:05:58 -0700	[thread overview]
Message-ID: <auIBRhu4Zs3UgsQ7@google.com> (raw)
In-Reply-To: <20261028044653.GBauF-PdTS6gsOOozC@fat_crate.local>

On Tue, Oct 27, 2026, Borislav Petkov wrote:
> 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.

I don't particularly care what the interface is, but as a "downstream" user, it
would be helpful if Intel and AMD used the same scheme(s).

And FWIW, providing the human-friendly codenames is very helpful even if they're
almost never used in code.  E.g. effectively documenting that Turin is Zen5, Genoa
is Zen4, Milan is Zen3, and so on is helpful, because even with search+AI, it's
hard to find information you don't realize you're missing.  Though that's probably
orthogonal to the interface.

  reply	other threads:[~2026-10-28 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22  4:00 Borislav Petkov
2026-10-27 15:20 ` Sean Christopherson
2026-10-28  4:46   ` Borislav Petkov
2026-10-28 14:05     ` Sean Christopherson [this message]
2026-10-28 15:34       ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auIBRhu4Zs3UgsQ7@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®