From: Sohil Mehta <sohil.mehta@intel.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Sean Christopherson <seanjc@google.com>, x86-ML <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Luck, Tony" <tony.luck@intel.com>
Subject: Re: [RFC PATCH] x86/cpu: Change AMD uarch detection
Date: Fri, 30 Oct 2026 22:08:34 -0700 [thread overview]
Message-ID: <c9984c6e-9829-4e47-a1d1-50886ad9a83d@intel.com> (raw)
In-Reply-To: <20261031015500.GGauVKdGNWuqeo0MG_@fat_crate.local>
On 10/30/2026 6:55 PM, Borislav Petkov wrote:
> So, we're going back to the initial method because that's what this is
> - x86_uarch is the microarchitecture number I am giving it and not x86_vfm
> - a family/model/stepping tuple.
>
Yes, that makes sense. Though, I am wondering if it would be better to
define x86_uarch outside the x86_vfm union?
With your initial patch,
union {
struct {
__u8 x86_model;
__u8 x86;
__u8 x86_vendor;
__u8 x86_uarch;
};
__u32 x86_vfm;
};
x86_vfm is calculated as:
uarch << 24 | vendor << 16 | family << 8 | model
However, VFM_MAKE() is defined as
#define VFM_MAKE(_vendor, _family, _model) ( \
((_model) << VFM_MODEL_BIT) | \
((_family) << VFM_FAMILY_BIT) | \
((_vendor) << VFM_VENDOR_BIT) \
)
Is the thinking that we could make x86_uarch work with all the VFM
macros? Because, if they can't be used together, then placing x86_uarch
in the union x86_vfm is confusing and likely to cause mistakes.
For example, I initially thought that amd_tsa_microcode comparison might
fail, because it uses VFM_MAKE(). But, it doesn't do a direct x86_vfm
comparison so it is safe.
next prev parent reply other threads:[~2026-10-31 5:10 UTC|newest]
Thread overview: 11+ 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
2026-10-28 15:34 ` Borislav Petkov
2026-10-29 17:56 ` Borislav Petkov
2026-10-30 19:13 ` Sean Christopherson
2026-10-30 21:29 ` Sohil Mehta
2026-10-31 1:55 ` Borislav Petkov
2026-10-31 5:08 ` Sohil Mehta [this message]
2026-10-31 5:32 ` 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=c9984c6e-9829-4e47-a1d1-50886ad9a83d@intel.com \
--to=sohil.mehta@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.com \
--cc=tony.luck@intel.com \
--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®