]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/sev: Run RMPADJUST on SVSM calling area page to test VMPL
authorArd Biesheuvel <ardb@kernel.org>
Thu, 28 Aug 2025 10:22:07 +0000 (12:22 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sun, 31 Aug 2025 10:40:56 +0000 (12:40 +0200)
commite349241b97a8b1169a4e90375159df4d22061f9a
tree0880ed0ddbf3357d077c757b74c5d130e7baeb4d
parent7cb7b6de9cb90311a917d65c0228b6aa223dc456
x86/sev: Run RMPADJUST on SVSM calling area page to test VMPL

Determining the VMPL at which the kernel runs involves performing a RMPADJUST
operation on an arbitrary page of memory, and observing whether it succeeds.

The use of boot_ghcb_page in the core kernel in this case is completely
arbitrary, but results in the need to provide a PIC alias for it. So use
boot_svsm_ca_page instead, which already needs this alias for other reasons.

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-28-ardb+git@google.com
arch/x86/boot/compressed/sev.c
arch/x86/boot/startup/sev-shared.c
arch/x86/boot/startup/sev-startup.c