Re: [PATCH 01/13] x86/CPU/AMD: Add ZenX generations flags

From: Tom Lendacky
Date: Thu Nov 30 2023 - 13:17:12 EST


On 11/30/23 11:13, Borislav Petkov wrote:
On Thu, Nov 30, 2023 at 11:05:14AM -0600, Tom Lendacky wrote:
Previously just being family 17h or 19h would get X86_FEATURE_ZEN set. With
this, if the model check doesn't match, you won't get any X86_FEATURE_ZEN*
set. Should you do set X86_FEATURE_ZEN here, e.g. lowest common denominator
for the family?

My assumption/expectation is that those WARNs should never happen
because they will be caught early enough in enablement and I will get
patches.

Besides, X86_FEATURE_ZEN means only Zen1 now.

There are references to X86_FEATURE_ZEN in arch/x86/kernel/process.c and drivers/acpi/resource.c that should probably be vetted.

Maybe having X86_FEATURE_ZEN mean all ZEN (and set for anything family 17h or higher) and a separate per generation, e.g. X86_FEATURE_ZEN1, when you need to be specific, would work.

Thanks,
Tom