Skip to content

hyperv: Run VMBus kexec cleanup from syscore shutdown

Shradha Gupta kexec linux-arch linux-arm-kernel linux-hyperv lkml 2 versions – Applied

Status from this message: Applied. Thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 4 repliesApplied
  2. v32 patches 7 repliesSuperseded

Changes in v4 from the cover letter

- Document the VMBus kexec cleanup path in the Hyper-V overview.
- Combine adjacent kexec_in_progress checks in the x86 shutdown path.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/2kexec: Add helper to report an active kexec rebootinclude/linux/kexec.h kernel/kexec_core.c+9 -01 reply
2/2Drivers: hv: Run VMBus kexec cleanup from syscore shutdownDocumentation/virt/hyperv/overview.rst arch/x86/kernel/cpu/mshyperv.c drivers/hv/hv_common.c +2 more+27 -462 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMike Rapoport (Microsoft)Michael KelleyBradley MorganNaman Jain
1/2A-b R-b R-b R-b
2/2R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v4 thread

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

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(-)

base-commit: be0cfab740e58b70047ef6e7e3d578f00ed5d258

Signature · 1 line
2.43.0