On 4/28/25 16:41, Ashish Kalra wrote: > From: Ashish Kalra <[email protected]> > > When kdump is running makedumpfile to generate vmcore and dumping SNP > guest memory it touches the VMSA page of the vCPU executing kdump which > then results in unrecoverable #NPF/RMP faults as the VMSA page is > marked busy/in-use when the vCPU is running and subsequently 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. > > Cc: [email protected] > Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on > kexec") > Signed-off-by: Ashish Kalra <[email protected]>
Reviewed-by: Tom Lendacky <[email protected]> > --- > arch/x86/coco/sev/core.c | 241 +++++++++++++++++++++++++-------------- > 1 file changed, 155 insertions(+), 86 deletions(-) >
