RE: [PATCH 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86

From: Luck, Tony
Date: Thu Mar 28 2024 - 12:57:11 EST


>> __u8 x86_stepping;
>
> Why are you leaving out stepping?

There are only a handful of places where stepping is significant in CPU model
specific checks (mostly errata and side-channel security stuff). I didn't want to
have to invent new #define names for each stepping. E.g. there are about
three separate steppings of INTEL_SKYLAKE_X out in the wild. It would
be messy to have three #defines and add them in all the stepping independent
code paths.

> And since we want to simplify all this, why aren't we replacing all
> f/m/s checks by using the whole CPUID(1).EAX u32 instead?
>
> Then the macros need to build that CPUID leaf simply.

I could make the raw format of the #define values be CPUID(1).EAX
with the stepping masked out. But then I'd need to add a new field to
the structure instead of overlaying with the vendor/family/model
fields.

-Tony