aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/randomize_layout_plugin.c
diff options
context:
space:
mode:
authorAshish Kalra <[email protected]>2025-04-28 21:41:51 +0000
committerBorislav Petkov (AMD) <[email protected]>2025-05-13 17:40:44 +0000
commitd2062cc1b1c367d5d019f595ef860159e1301351 (patch)
tree3e7298082f006c19fca717889aec88bd27282a22 /scripts/gcc-plugins/randomize_layout_plugin.c
parentMAINTAINERS: Update Alexey Makhalov's email address (diff)
downloadkernel-d2062cc1b1c367d5d019f595ef860159e1301351.tar.gz
kernel-d2062cc1b1c367d5d019f595ef860159e1301351.zip
x86/sev: Do not touch VMSA pages during SNP guest memory kdump
When kdump is running makedumpfile to generate vmcore and dump SNP guest memory it touches the VMSA page of the vCPU executing kdump. It then results in unrecoverable #NPF/RMP faults as the VMSA page is marked busy/in-use when the vCPU is running and subsequently a causes guest softlockup/hang. Additionally, other APs may be halted in guest mode and their VMSA pages are marked busy and touching these VMSA pages during guest memory dump will also cause #NPF. Issue AP_DESTROY GHCB calls on other APs to ensure they are kicked out of guest mode and then clear the VMSA bit on their VMSA pages. If the vCPU running kdump is an AP, mark it's VMSA page as offline to ensure that makedumpfile excludes that page while dumping guest memory. Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec") Signed-off-by: Ashish Kalra <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Pankaj Gupta <[email protected]> Reviewed-by: Tom Lendacky <[email protected]> Tested-by: Srikanth Aithal <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions