mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown
@ 2026-10-09 10:22 Shradha Gupta
  2026-10-09 10:22 ` [PATCH v4 1/2] kexec: Add helper to report an active kexec reboot Shradha Gupta
  2026-10-09 10:22 ` [PATCH v4 2/2] Drivers: hv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
  0 siblings, 2 replies; 5+ messages in thread
From: Shradha Gupta @ 2026-10-09 10:22 UTC (permalink / raw)
  To: mhklinux, wei.liu, catalin.marinas, baoquan.he
  Cc: Shradha Gupta, will, kys, haiyangz, decui, longli, akpm, rppt,
	pasha.tatashin, pratyush, tglx, mingo, bp, dave.hansen, x86,
	arnd, hpa, maz, mark.rutland, linux-hyperv, kexec,
	linux-arm-kernel, linux-kernel, linux-arch, broonie, kees, brads,
	namjain

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
-- 
2.43.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-09 10:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 10:22 [PATCH v4 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
2026-10-09 10:22 ` [PATCH v4 1/2] kexec: Add helper to report an active kexec reboot Shradha Gupta
2026-10-09 10:28   ` sashiko-bot
2026-10-09 10:22 ` [PATCH v4 2/2] Drivers: hv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
2026-10-09 10:38   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®