]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/hyperv: Add kexec/kdump support on Azure CVMs
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 28 Aug 2025 09:16:18 +0000 (12:16 +0300)
committerWei Liu <wei.liu@kernel.org>
Tue, 30 Sep 2025 22:49:24 +0000 (22:49 +0000)
commit7ad8c34f2435137e2a0dfd0a5dd000e219c642ce
treece9b378fe412f042f7519f55a91c5623b76cadd8
parent2d0ddbb65cef99aab241378b0f4ff2d6ea8c3a5a
x86/hyperv: Add kexec/kdump support on Azure CVMs

Azure CVM instance types featuring a paravisor hang upon kdump. The
investigation shows that makedumpfile causes a hang when it steps on a page
which was previously share with the host
(HVCALL_MODIFY_SPARSE_GPA_PAGE_HOST_VISIBILITY). The new kernel has no
knowledge of these 'special' regions (which are Vmbus connection pages,
GPADL buffers, ...). There are several ways to approach the issue:
- Convey the knowledge about these regions to the new kernel somehow.
- Unshare these regions before accessing in the new kernel (it is unclear
if there's a way to query the status for a given GPA range).
- Unshare these regions before jumping to the new kernel (which this patch
implements).

To make the procedure as robust as possible, store PFN ranges of shared
regions in a linked list instead of storing GVAs and re-using
hv_vtom_set_host_visibility(). This also allows to avoid memory allocation
on the kdump/kexec path.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Reviewed-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
arch/x86/hyperv/ivm.c