From: Shradha Gupta <shradhagupta@linux.microsoft.com>
To: Michael Kelley <mhklinux@outlook.com>,
Wei Liu <wei.liu@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Baoquan He <baoquan.he@linux.dev>
Cc: Shradha Gupta <shradhagupta@linux.microsoft.com>,
Will Deacon <will@kernel.org>,
"K . Y . Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Dexuan Cui <decui@microsoft.com>, Long Li <longli@microsoft.com>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Pratyush Yadav <pratyush@kernel.org>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Arnd Bergmann <arnd@arndb.de>,
linux-hyperv@vger.kernel.org, kexec@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: [PATCH v3 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown
Date: Thu, 1 Oct 2026 06:21:25 -0700 [thread overview]
Message-ID: <20261001132128.1703511-1-shradhagupta@linux.microsoft.com> (raw)
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. The kexec kernel consequently starts with
the previous kernel's VMBus state still active.
The previous version added an ARM64-specific syscore shutdown
implementation. This version follows Michael Kelley's review and moves
the cleanup into the existing architecture-independent VMBus syscore
operations. This removes the separate x86 handler dispatch and gives
x86 and ARM64 the same ordering:
device_shutdown()
syscore_shutdown()
VMBus UNLOAD and SynIC CPU hotplug teardown
machine_shutdown()
On x86, VMBus teardown now runs before hv_stimer_global_cleanup().
This ordering is safe after commit be0cfab740e5 ("clocksource: hyper-v:
Remove support for stimer interrupts in message mode") removed the
VMBus dependency from synthetic timer handling.
Patch 1 adds a read-only helper that reports whether a kexec reboot is
in progress. The helper is exported because HYPERV_VMBUS is tristate
and the common syscore callback must also link when VMBus is a module.
Patch 2 moves the cleanup into the common callback and removes the
obsolete architecture-specific setup/remove interface.
For stable kernels that still support message-mode stimers, an
ARM64-specific backport will be needed to preserve the existing x86
ordering.
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
arch/x86/kernel/cpu/mshyperv.c | 17 +----------------
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 +++++++
6 files changed, 24 insertions(+), 36 deletions(-)
base-commit: be0cfab740e58b70047ef6e7e3d578f00ed5d258
--
2.43.0
next reply other threads:[~2026-10-01 13:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 13:21 Shradha Gupta [this message]
2026-10-01 13:21 ` [PATCH v3 1/2] kexec: Add helper to report an active kexec reboot Shradha Gupta
2026-10-01 13:28 ` sashiko-bot
2026-10-01 13:22 ` [PATCH v3 2/2] Drivers: hv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
2026-10-01 16:14 ` [PATCH v3 0/2] hyperv: " Michael Kelley
2026-10-01 16:52 ` Bradley Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261001132128.1703511-1-shradhagupta@linux.microsoft.com \
--to=shradhagupta@linux.microsoft.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=baoquan.he@linux.dev \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=dave.hansen@linux.intel.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kexec@lists.infradead.org \
--cc=kys@microsoft.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
--cc=mingo@redhat.com \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=rppt@kernel.org \
--cc=tglx@kernel.org \
--cc=wei.liu@kernel.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®