Re: [PATCH 11/11] x86/cpu: Make all all CPUID leaf names consistent
From: Borislav Petkov
Date: Tue Dec 10 2024 - 06:20:25 EST
On Thu, Oct 31, 2024 at 10:19:37AM -0700, Dave Hansen wrote:
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index a5f221ea5688..b44dbb952d8c 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -1001,8 +1001,8 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
> }
>
> /* Extended state features: level 0x0000000d */
> - if (c->cpuid_level >= 0x0000000d) {
> - cpuid_count(0x0000000d, 1, &eax, &ebx, &ecx, &edx);
> + if (c->cpuid_level >= CPUID_LEAF_XSTATE) {
> + cpuid_count(CPUID_LEAF_XSTATE, 1, &eax, &ebx, &ecx, &edx);
>
> c->x86_capability[CPUID_D_1_EAX] = eax;
Yah, I'll take whatever I can get. You should add this hunk to your set.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette