From: Tom Lendacky <thomas.lendacky@amd.com>
To: Kevin Hui <kevinhui@meta.com>,
linux-coco@lists.linux.dev, Ard Biesheuvel <ardb@kernel.org>
Cc: youngjaelee@meta.com, hvolkmer@meta.com, chrisboltz@meta.com,
tzn@google.com, andrisaar@google.com, grobler@google.com
Subject: Re: 6.18 CVM guest kernel boot issues with non-UEFI bootloader
Date: Fri, 30 Jan 2026 12:49:43 -0600 [thread overview]
Message-ID: <6bb2c25f-e51b-4d90-a67e-100bff1af838@amd.com> (raw)
In-Reply-To: <8d47d224-0ce0-417f-8c12-3ab9d6da8a59@meta.com>
Adding Ard
On 1/28/26 21:57, Kevin Hui wrote:
> Hello,
>
> We’ve been using a non-UEFI bootloader to launch SEV-SNP CVMs and noticed that
> there’s an issue with booting the newest 6.18 guest kernel with
> the stage0 bootloader (https://github.com/project-oak/oak/tree/main/stage0_bin).
> The guest kernel boots successfully with 6.17 and below, but fails with 6.18. We
> were able to reproduce this with host kernels 6.13.2 and 6.18.3 on Milan/Genoa
> hosts.
>
> We traced the commit that started causing boot issues to
> 68a501d7fd82454525797971c6a0005ceeb93153 and noticed that for some reason the
> variable snp_vmpl was non-zero, even though our stack doesn’t run SVSM. This
> triggers the sev_es_terminate() call and subsequently crashes the CVM. We
> noticed that the commit removes a supposedly redundant rmpadjust() check, but
> from our observations it seems that the failed rmpadjust() short-circuited the
> check and avoided the underlying issue.
>
> I was chatting with Tom about this, and taking a deeper look at the issue, we
> suspect that the BSS is cleared after the sev_enable() call in
> arch/x86/boot/compressed/head_64.S, and that because of this snp_vmpl contains
> random junk and is not zeroed. When coming through UEFI, it seems that the BSS
> is cleared via drivers/firmware/efi/libstub/x86-stub.c, but in a non-UEFI
> bootloader there is no call to startup_64 and so this path is never invoked,
> leaving whatever random data was in bss to remain.
>
> Perhaps the proper fix for this is to put the variables that are set as part of
> sev_enable() into .data so that both non-UEFI and UEFI bootloaders will have the
> same treatment from the kernel, but I would love to hear everyone’s thoughts on
> this.
>
> Thanks,
> Kevin
next prev parent reply other threads:[~2026-01-30 18:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 3:57 6.18 CVM guest kernel boot issues with non-UEFI bootloader Kevin Hui
2026-01-30 18:49 ` Tom Lendacky [this message]
2026-01-30 20:49 ` Ard Biesheuvel
2026-01-30 22:05 ` Tom Lendacky
2026-01-30 22:12 ` 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=6bb2c25f-e51b-4d90-a67e-100bff1af838@amd.com \
--to=thomas.lendacky@amd.com \
--cc=andrisaar@google.com \
--cc=ardb@kernel.org \
--cc=chrisboltz@meta.com \
--cc=grobler@google.com \
--cc=hvolkmer@meta.com \
--cc=kevinhui@meta.com \
--cc=linux-coco@lists.linux.dev \
--cc=tzn@google.com \
--cc=youngjaelee@meta.com \
/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