Re: [PATCH v4 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown

From: Wei Liu

Date: Wed Oct 21 2026 - 03:28:13 EST


On Fri, Oct 09, 2026 at 03:22:11AM -0700, Shradha Gupta wrote:
> Kexec reboot fails on ARM64 Hyper-V guests because the VMBus connection
> and SynIC CPU hotplug state are not torn down before the secondary CPUs
> are stopped. Move this cleanup into the VMBus syscore shutdown callback,
> which runs after device shutdown and before architecture-specific machine
> shutdown.
>
> Patch 1 adds an exported helper for checking whether a normal kexec reboot
> is in progress. Patch 2 runs the VMBus cleanup from the common syscore
> shutdown path on x86 and ARM64, removes the old x86 handler interface, and
> documents the shutdown ordering.
>
> On x86, VMBus teardown now precedes hv_stimer_global_cleanup(). This relies
> on commit be0cfab740e5 ("clocksource: hyper-v: Remove support for stimer
> interrupts in message mode"). Older kernels that retain message-mode
> stimer interrupts need an ARM64-specific backport to preserve the existing
> x86 ordering.
>
> Changes in v4:
> - Document the VMBus kexec cleanup path in the Hyper-V overview.
> - Combine adjacent kexec_in_progress checks in the x86 shutdown path.
>
> Changes in v3:
> - Use the existing common VMBus syscore operations on all
> architectures, as suggested by Michael.
> - Remove the x86 handler pointer and the weak setup/remove interface.
> - Add an exported read-only helper for modular VMBus builds.
> - Correct the Fixes tag to the commit that enabled Hyper-V on ARM64.
>
> Changes in v2:
> - Use syscore shutdown instead of an ARM64 machine_shutdown() hook, as
> suggested by Catalin.
>
> Shradha Gupta (2):
> kexec: Add helper to report an active kexec reboot
> Drivers: hv: Run VMBus kexec cleanup from syscore shutdown
>
> Documentation/virt/hyperv/overview.rst | 12 +++++++-----
> arch/x86/kernel/cpu/mshyperv.c | 27 ++++++---------------------
> drivers/hv/hv_common.c | 10 ----------
> drivers/hv/vmbus_drv.c | 22 ++++++++++++++--------
> include/asm-generic/mshyperv.h | 2 --
> include/linux/kexec.h | 2 ++
> kernel/kexec_core.c | 7 +++++++
> 7 files changed, 36 insertions(+), 46 deletions(-)

Applied. Thanks.

Wei