aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/platform.c
diff options
context:
space:
mode:
authorArd Biesheuvel <[email protected]>2025-04-17 20:21:21 +0000
committerIngo Molnar <[email protected]>2025-04-18 12:30:30 +0000
commitd54d610243a4508183978871e5faff5502786cd4 (patch)
treebd2c01908c3fabe5282e6eeb406ba103d0372917 /rust/helpers/platform.c
parentx86/cpu/amd: Fix workaround for erratum 1054 (diff)
downloadkernel-d54d610243a4508183978871e5faff5502786cd4.tar.gz
kernel-d54d610243a4508183978871e5faff5502786cd4.zip
x86/boot/sev: Avoid shared GHCB page for early memory acceptance
Communicating with the hypervisor using the shared GHCB page requires clearing the C bit in the mapping of that page. When executing in the context of the EFI boot services, the page tables are owned by the firmware, and this manipulation is not possible. So switch to a different API for accepting memory in SEV-SNP guests, one which is actually supported at the point during boot where the EFI stub may need to accept memory, but the SEV-SNP init code has not executed yet. For simplicity, also switch the memory acceptance carried out by the decompressor when not booting via EFI - this only involves the allocation for the decompressed kernel, and is generally only called after kexec, as normal boot will jump straight into the kernel from the EFI stub. Fixes: 6c3211796326 ("x86/sev: Add SNP-specific unaccepted memory support") Tested-by: Tom Lendacky <[email protected]> Co-developed-by: Tom Lendacky <[email protected]> Signed-off-by: Tom Lendacky <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: <[email protected]> Cc: Dionna Amalie Glaze <[email protected]> Cc: Kevin Loughlin <[email protected]> Cc: Kirill A. Shutemov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] # discussion thread #1 Link: https://lore.kernel.org/r/[email protected] # discussion thread #2 Link: https://lore.kernel.org/r/[email protected] # final submission
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions