[PATCH v3] x86/sev: Do not touch VMSA pages during kdump of SNP guest memory
Tom Lendacky
thomas.lendacky at amd.com
Tue Apr 29 11:38:38 PDT 2025
On 4/28/25 16:41, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra at amd.com>
>
> 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: stable at vger.kernel.org
> Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec")
> Signed-off-by: Ashish Kalra <ashish.kalra at amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky at amd.com>
> ---
> arch/x86/coco/sev/core.c | 241 +++++++++++++++++++++++++--------------
> 1 file changed, 155 insertions(+), 86 deletions(-)
>
More information about the kexec
mailing list