]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/sev: Add new dump_rmp parameter to snp_leak_pages() API
authorAshish Kalra <ashish.kalra@amd.com>
Tue, 16 Sep 2025 21:29:04 +0000 (21:29 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Wed, 17 Sep 2025 10:04:04 +0000 (12:04 +0200)
commite4c00c4ce2aafe61dc7436e763a78d6d112d9e2f
tree5a322c77d7033162fd00f812620da41c799fe013
parent85df1cd15ff5d775e88e23b9fc2a9f429fa5b504
x86/sev: Add new dump_rmp parameter to snp_leak_pages() API

When leaking certain page types, such as Hypervisor Fixed (HV_FIXED)
pages, it does not make sense to dump RMP contents for the 2MB range of
the page(s) being leaked. In the case of HV_FIXED pages, this is not an
error situation where the surrounding 2MB page RMP entries can provide
debug information.

Add new __snp_leak_pages() API with dump_rmp bool parameter to support
continue adding pages to the snp_leaked_pages_list but not issue
dump_rmpentry().

Make snp_leak_pages() a wrapper for the common case which also allows
existing users to continue to dump RMP entries.

Suggested-by: Thomas Lendacky <Thomas.Lendacky@amd.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Ashish Kalra <ashish.kalra@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/cover.1758057691.git.ashish.kalra@amd.com
arch/x86/include/asm/sev.h
arch/x86/virt/svm/sev.c