Re: [PATCH 11/11] x86/cpu: Make all all CPUID leaf names consistent
From: Borislav Petkov
Date: Thu Oct 31 2024 - 06:19:05 EST
On Wed, Oct 30, 2024 at 02:33:29PM -0700, Dave Hansen wrote:
> diff -puN arch/x86/include/asm/cpuid.h~xsave-leaf-checks-3 arch/x86/include/asm/cpuid.h
> --- a/arch/x86/include/asm/cpuid.h~xsave-leaf-checks-3 2024-10-30 12:26:59.222216332 -0700
> +++ b/arch/x86/include/asm/cpuid.h 2024-10-30 12:26:59.238216364 -0700
> @@ -19,12 +19,12 @@ enum cpuid_regs_idx {
> CPUID_EDX,
> };
>
> -#define CPUID_MWAIT_LEAF 0x5
> -#define CPUID_DCA_LEAF 0x9
> -#define XSTATE_CPUID 0x0d
> -#define CPUID_TSC_LEAF 0x15
> -#define CPUID_FREQ_LEAF 0x16
> -#define TILE_CPUID 0x1d
> +#define CPUID_LEAF_MWAIT 0x5
> +#define CPUID_LEAF_DCA 0x9
> +#define CPUID_LEAF_XSTATE 0x0d
> +#define CPUID_LEAF_TSC 0x15
> +#define CPUID_LEAF_FREQ 0x16
> +#define CPUID_LEAF_TILE 0x1d
... and just to confuse things even more, there's enum cpuid_leafs too which
start with the "CPUID_" prefix too.
Pfff.
I'd like to unify them and I *think* kvm_cpu_cap_mask() should be able to
stomach that (or fixed if not)...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette