[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMj1kXFtFMp7xTgtGAy9o4s5OrVBLRax2y0N-OSmP8-bzorcKw@mail.gmail.com>
Date: Sat, 13 Sep 2025 00:22:47 +0200
From: Ard Biesheuvel <ardb@...nel.org>
To: Ashish Kalra <Ashish.Kalra@....com>
Cc: ardb+git@...gle.com, 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
On Fri, 12 Sept 2025 at 22:36, Ashish Kalra <Ashish.Kalra@....com> wrote:
>
> 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 ?
>
EFI maps all memory 1:1 so none of this is needed.
Powered by blists - more mailing lists