Re: [PATCH v7 01/22] x86/sev: Separate MSR and GHCB based snp_cpuid() via a callback

Borislav Petkov
2025-09-09T22:31:08Z

On Tue, Sep 09, 2025 at 04:44:07PM -0500, Tom Lendacky wrote:
> It only uses the MSR protocol for particular CPUID values in
> snp_cpuid_postprocess(). If the CPUID leaf isn't in the CPUID table,
> then it will set the CPUID values to all 0 and then call the
> post-processing routine which may or may not call the HV.
>
> The second call to __sev_cpuid_hv_msr() only happens if there is no
> CPUID table - which will be the case for SEV-ES. So you can't remove the
> second call.

This needs to be turned into a proper comment, at least, and stuck above it as
the situation there is clear as mud. Especially after the dropping of the GHCB
protocol call, which makes the confusion even more probable...

I'll do it tomorrow if you don't beat me to it today. :)

--
Regards/Gruss,
Boris.