Linux-HyperV List
 help / color / mirror / Atom feed
From: Bradley Morgan <brads@mainlining.org>
To: shradhagupta@linux.microsoft.com
Cc: akpm@linux-foundation.org, arnd@arndb.de, baoquan.he@linux.dev,
	bp@alien8.de, catalin.marinas@arm.com,
	dave.hansen@linux.intel.com, decui@microsoft.com,
	haiyangz@microsoft.com, kexec@lists.infradead.org,
	kys@microsoft.com, linux-arch@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
	longli@microsoft.com, mhklinux@outlook.com, mingo@redhat.com,
	pasha.tatashin@soleen.com, pratyush@kernel.org, rppt@kernel.org,
	tglx@kernel.org, wei.liu@kernel.org, will@kernel.org,
	x86@kernel.org
Subject: Re: [PATCH v3 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown
Date: Thu, 01 Oct 2026 17:52:58 +0100	[thread overview]
Message-ID: <C8205996-C913-487A-BB8A-E3DD018AF747@mainlining.org> (raw)
In-Reply-To: <20261001132128.1703511-1-shradhagupta@linux.microsoft.com>

On 1 October 2026 14:21:25 BST, Shradha Gupta
<shradhagupta@linux.microsoft.com> 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. 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
>

Wow! Great!!!

Whole series:

Reviewed-by: Bradley Morgan <brads@mainlining.org>

--- Thanks!
"I'm not a very positive person" - Linus torvalds

  parent reply	other threads:[~2026-10-01 16:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 13:21 [PATCH v3 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
2026-10-01 13:22 ` [PATCH v3 2/2] Drivers: hv: " Shradha Gupta
2026-10-08  7:53   ` Mike Rapoport
2026-10-09  6:49     ` Shradha Gupta
2026-10-01 16:14 ` [PATCH v3 0/2] hyperv: " Michael Kelley
2026-10-06  9:26   ` Shradha Gupta
2026-10-01 16:52 ` Bradley Morgan [this message]
2026-10-06 10:08 ` Naman Jain

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=C8205996-C913-487A-BB8A-E3DD018AF747@mainlining.org \
    --to=brads@mainlining.org \
    --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=shradhagupta@linux.microsoft.com \
    --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