Re: [PATCH v2 01/29] x86: treewide: Introduce x86_vendor_amd_or_hygon()

"Ahmed S. Darwish" <[email protected]>
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <Z9vyJLXNL2-CTIIG@lx-t490>
On Wed, 19 Mar 2025, H. Peter Anvin wrote:
>
> On March 18, "Ahmed S. Darwish" wrote:
> >
> > Then I found that there are 28 other cases in the x86 tree where the
> > AMD/Hygon CPU vendor check is also combined.  So I did that macro and
> > it also made a number the affected sites more succinct; e.g.:
> >
> > ...
>
> I would agree that abstracting this into something higher level makes
> sense, but have you considered whether or not it is actually necessary
> to do this in the first place? In the case of level 0x8000001d for
> example, that should be handled by the end bracket from leaf
> 0x80000000.
>
> In general, VFMS checks are not a good thing.
>

Great point, I'll consider that when I (soon) touch these areas again.

In the next PQ, wherea cached CPUID table built on early boot, "CPUID
truth" is centralized.  This way, the VMFS checks can indeed be reduced.

Thanks!

--
Ahmed S. Darwish
Linutronix GmbH
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.