Re: [PATCH v2 01/29] x86: treewide: Introduce x86_vendor_amd_or_hygon()
From: Ahmed S. Darwish
Date: Thu Mar 20 2025 - 06:47:12 EST
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