From: Ashish Kalra <Ashish.Kalra@amd.com>
To: <ardb+git@google.com>
Cc: <ardb@kernel.org>, <bp@alien8.de>, <linux-efi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <thomas.lendacky@amd.com>,
<x86@kernel.org>
Subject: Re: [PATCH v4 3/3] x86/efistub: Don't bother enabling SEV in the EFI stub
Date: Fri, 12 Sep 2025 20:34:43 +0000 [thread overview]
Message-ID: <20250912203443.16159-1-Ashish.Kalra@amd.com> (raw)
In-Reply-To: <20250909080631.2867579-5-ardb+git@google.com>
From: Ard Biesheuvel <ardb@kernel.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
next prev parent reply other threads:[~2025-09-12 20:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-09 8:06 [PATCH v4 0/3] efi: Don't initalize SEV-SNP from the EFI stub Ard Biesheuvel
2025-09-09 8:06 ` [PATCH v4 1/3] x86/boot: Drop unused sev_enable() fallback Ard Biesheuvel
2025-09-11 21:35 ` Tom Lendacky
2025-11-20 20:26 ` [tip: x86/sev] " tip-bot2 for Ard Biesheuvel
2025-09-09 8:06 ` [PATCH v4 2/3] x86/efistub: Obtain SEV CC blob address from the stub Ard Biesheuvel
2025-09-11 21:27 ` Tom Lendacky
2025-09-11 21:49 ` Ard Biesheuvel
2025-09-09 8:06 ` [PATCH v4 3/3] x86/efistub: Don't bother enabling SEV in the EFI stub Ard Biesheuvel
2025-09-11 21:53 ` Tom Lendacky
2025-09-12 7:29 ` Ard Biesheuvel
2025-09-12 8:26 ` Ard Biesheuvel
2025-09-12 13:32 ` Tom Lendacky
2025-09-15 16:08 ` Borislav Petkov
2025-09-12 20:34 ` Ashish Kalra [this message]
2025-09-12 22:22 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250912203443.16159-1-Ashish.Kalra@amd.com \
--to=ashish.kalra@amd.com \
--cc=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox