RE: [PATCH v3] x86/cpu: Fix x86_match_cpu() to match just X86_VENDOR_INTEL

From: Thomas Gleixner
Date: Fri May 17 2024 - 16:53:27 EST


On Fri, May 17 2024 at 18:13, Luck, Tony wrote:
>>> for (m = match; m->flags & X86_CPU_ID_FLAG_ENTRY_VALID; m++) {
>>
>> Yeah, makes sense at a first glance.
>>
>> This'll keep the terminators "{}" unchanged so that we don't have to
>> touch all those gazillion places and it'll explicitly state that an
>> entry is valid or not.
>
>> But the devil's in the detail, as always...
>
> Yes. One detail is that there are places not using the X86_MATCH
> macros.

Groan.

> E.g. in arch/x86/crypto/aesni-intel_glue.c there is:
>
> static const struct x86_cpu_id zmm_exclusion_list[] = {
> { .vendor = X86_VENDOR_INTEL, .family = 6, .model = INTEL_FAM6_SKYLAKE_X },
> ...
> };
>
> This one (and likely most/all others) will be fixed by the remaining
> patches in my new families[1] series.

AFAICT, that's the only one.

# git grep -C5 'struct x86_cpu_id' | grep '\.vendor' | awk '{ print $1; }' | uniq
arch/x86/crypto/aesni-intel_glue.c-