]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/sev: Use MSR protocol only for early SVSM PVALIDATE call
authorArd Biesheuvel <ardb@kernel.org>
Thu, 28 Aug 2025 10:22:06 +0000 (12:22 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sun, 31 Aug 2025 10:40:55 +0000 (12:40 +0200)
commit7cb7b6de9cb90311a917d65c0228b6aa223dc456
tree5c891ee8926e0c2ca5eac0498e57421698f1fd67
parentc15a4705d59caeb44f4c373cf04e89041309e568
x86/sev: Use MSR protocol only for early SVSM PVALIDATE call

The early page state change API performs an SVSM call to PVALIDATE each page
when running under a SVSM, and this involves either a GHCB page based call or
a call based on the MSR protocol.

The GHCB page based variant involves VA to PA translation of the GHCB address,
and this is best avoided in the startup code, where virtual addresses are
ambiguous (1:1 or kernel virtual).

As this is the last remaining occurrence of svsm_perform_call_protocol() in
the startup code, switch to the MSR protocol exclusively in this particular
case, so that the GHCB based plumbing can be moved out of the startup code
entirely in a subsequent patch.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/20250828102202.1849035-27-ardb+git@google.com
arch/x86/boot/compressed/sev.c
arch/x86/boot/startup/sev-shared.c