Re: [PATCH v7 025/120] x86/cpuid: Parse CPUID(0x2)
From: Borislav Petkov
Date: Fri Jul 10 2026 - 01:01:57 EST
On Thu, May 28, 2026 at 05:37:47PM +0200, Ahmed S. Darwish wrote:
> Parse CPUID(0x2).
>
> Query it only for Intel, Centaur, and Zhaoxin, given that
"... because that information is only used in init_intel_cacheinfo() on those
vendors."
That's it. Short and human-readable.
>
> kernel/cpu/cacheinfo.c :: init_intel_cacheinfo()
>
> is called by:
>
> kernel/cpu/intel.c cpu_dev.c_x86_vendor = X86_VENDOR_INTEL
> kernel/cpu/centaur.c cpu_dev.c_x86_vendor = X86_VENDOR_CENTAUR
> kernel/cpu/zhaoxin.c cpu_dev.c_x86_vendor = X86_VENDOR_ZHAOXIN
>
> At the CPUID tables, keep CPUID(0x2) marked as invalid if the whole leaf,
> or all of its output registers separately, were malformed.
Please, do not talk about *what* the patch is doing in the commit message
- that should be obvious from the diff itself. Rather, concentrate on the
*why* it needs to be done and why your patch exists.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette