[PATCH v2] x86/sev: Fix making shared pages private during kdump

Tom Lendacky thomas.lendacky at amd.com
Tue Apr 29 11:44:36 PDT 2025


On 4/28/25 14:26, Ashish Kalra wrote:
> From: Ashish Kalra <ashish.kalra at amd.com>
> 
> When the shared pages are being made private during kdump preparation
> there are additional checks to handle shared GHCB pages.
> 
> These additional checks include handling the case of GHCB page being
> contained within a huge page.
> 
> There is a bug in this additional check for GHCB page contained
> within a huge page which causes any shared page just below the
> per-cpu GHCB getting skipped from being transitioned back to private
> before kdump preparation which subsequently causes a 0x404 #VC
> exception when this shared page is accessed later while dumping guest
> memory during vmcore generation via kdump.
> 
> Correct the detection and handling of GHCB pages contained within
> a huge page.
> 
> 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 | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 



More information about the kexec mailing list