[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250912203443.16159-1-Ashish.Kalra@amd.com>
Date: Fri, 12 Sep 2025 20:34:43 +0000
From: Ashish Kalra <Ashish.Kalra@....com>
To: <ardb+git@...gle.com>
CC: <ardb@...nel.org>, <bp@...en8.de>, <linux-efi@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <thomas.lendacky@....com>, <x86@...nel.org>
Subject: Re: [PATCH v4 3/3] x86/efistub: Don't bother enabling SEV in the EFI stub
From: Ard Biesheuvel <ardb@...nel.org>
>One of the last things the EFI stub does before handing over to the core
>kernel when booting as a SEV guest is enabling SEV, even though this is
>mostly redundant: one of the first things the core kernel does is
>calling sme_enable(), after setting up the early GDT and IDT but before
>even setting up the kernel page tables. sme_enable() performs the same
>SEV-SNP initialization that the decompressor performs in sev_enable().
>So let's just drop this call to sev_enable(), and rely on the core
>kernel to initiaize SEV correctly.
If the EFI stub no longer boots the core kernel via the traditional
decompressor and jumps straight to it, there are some specific things
which i see are being setup by the decompressed kernel before passing
control to the uncompressed kernel such as calling sev_prep_identity_maps()
as part of setting up the identity map:
>From sev_prep_identity_maps():
The Confidential Computing blob is used very early in uncompressed
kernel to find the in-memory CPUID table to handle CPUID
instructions. Make sure an identity-mapping exists so it can be
accessed after switchover.
Won't this setup in identity mapping be needed to find the
in-memory CPUID table as this won't exist if the EFI stub boots
directly boots the core kernel skipping the decompressor ?
Thanks,
Ashish
Powered by blists - more mailing lists