Re: [PATCH v2] x86/kernel: skip ROM range scans and validation for SEV-SNP guests

From: Kevin Loughlin
Date: Fri Mar 08 2024 - 15:52:34 EST


On Fri, Mar 8, 2024 at 6:01 AM Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Fri, Mar 08, 2024 at 11:30:50AM +0100, Ard Biesheuvel wrote:
> > Agree with the analysis and the conclusion. However, this will need to
> > be split into generic and x86 specific changes, given that the DMI
> > code is shared between all architectures, and explicitly checking for
> > SEV-SNP support in generic code is not appropriate.
> >
> > So what we will need is:
>
> I was actually thinking of:
>
> x86_init.resources.probe_roms = snp_probe_roms;
>
> and snp_probe_roms() is an empty stub.
>
> Problem solved without ugly sprinkling of checks everywhere.

Agreed, this is nicer; we can just add dmi_setup to x86_init as well
to implement the same concept for all checks we need.