Re: [PATCH v3 3/8] x86/sev: Require the RMPREAD instruction after Fam19h

From: Dave Hansen
Date: Mon Sep 30 2024 - 13:06:16 EST


On 9/30/24 08:22, Tom Lendacky wrote:
> if (!cpu_has(c, X86_FEATURE_HYPERVISOR) &&
> - c->x86 >= 0x19 && snp_probe_rmptable_info()) {
> + (c->x86 == 0x19 || cpu_feature_enabled(X86_FEATURE_RMPREAD)) &&
> + snp_probe_rmptable_info()) {

One humble suggestion (and not a NAK of the series): Could we please
start using #define'd names for these family numbers? We started doing
it for Intel models and I think it's been really successful. We used to
do greps like:

grep -r 'x86_model == 0x0f' arch/x86/

But that misses things like '>=' or macros that build the x86_model
comparison. But now we can do things like:

grep -r INTEL_CORE2_MEROM arch/x86

which does a much better job of finding references.