On Mon, May 22, 2023 at 03:07:12PM +0200, Ard Biesheuvel wrote: > So IIUC, we could just read sev_status much earlier just to perform > the SNP feature check, and fail the boot gracefully on a mismatch. And > the sev_enable() call needs to move after ExitBootServices(), right? Right, sev_enable() negotiates the GHCB protocol version, which needs the GHCB MSR, so that has to stay after ExitBootServices(). The SEV feature check on the other side only needs to read the sev-status MSR, which is no problem before ExitBootServices() (as long as it is only read on SEV platforms). > That would result in only very minor duplication, afaict. I'll have a > stab at implementing this for v4. Thanks, -- Jörg Rödel jroedel@xxxxxxx SUSE Software Solutions Germany GmbH Frankenstraße 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman