From: Tom Lendacky <thomas.lendacky@amd.com>
To: Ashish Kalra <Ashish.Kalra@amd.com>,
tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org, bp@alien8.de,
hpa@zytor.com
Cc: kees@kernel.org, michael.roth@amd.com, nikunj@amd.com,
seanjc@google.com, ardb@kernel.org, gustavoars@kernel.org,
sgarzare@redhat.com, stable@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
kexec@lists.infradead.org, linux-coco@lists.linux.dev
Subject: Re: [PATCH v3] x86/sev: Do not touch VMSA pages during kdump of SNP guest memory
Date: Tue, 29 Apr 2025 13:38:38 -0500 [thread overview]
Message-ID: <07a171bf-27b0-f273-b3cd-9c77f68d865f@amd.com> (raw)
In-Reply-To: <20250428214151.155464-1-Ashish.Kalra@amd.com>
On 4/28/25 16:41, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra@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@vger.kernel.org
> Fixes: 3074152e56c9 ("x86/sev: Convert shared memory back to private on kexec")
> Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> ---
> arch/x86/coco/sev/core.c | 241 +++++++++++++++++++++++++--------------
> 1 file changed, 155 insertions(+), 86 deletions(-)
>
next prev parent reply other threads:[~2025-04-29 18:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 21:41 Ashish Kalra
2025-04-29 18:38 ` Tom Lendacky [this message]
2025-04-30 9:21 ` Gupta, Pankaj
2025-04-30 12:47 ` Borislav Petkov
2025-05-13 18:07 ` [tip: x86/urgent] x86/sev: Do not touch VMSA pages during SNP guest memory kdump tip-bot2 for Ashish Kalra
2025-05-14 7:20 ` Ingo Molnar
2025-05-14 8:11 ` Borislav Petkov
2025-05-14 9:15 ` Ingo Molnar
2025-05-14 9:30 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07a171bf-27b0-f273-b3cd-9c77f68d865f@amd.com \
--to=thomas.lendacky@amd.com \
--cc=Ashish.Kalra@amd.com \
--cc=ardb@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=gustavoars@kernel.org \
--cc=hpa@zytor.com \
--cc=kees@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=seanjc@google.com \
--cc=sgarzare@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®