mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Kelley <mhklinux@outlook.com>
To: Shradha Gupta <shradhagupta@linux.microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Baoquan He <baoquan.he@linux.dev>
Cc: Will Deacon <will@kernel.org>,
	"K . Y . Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Dexuan Cui <decui@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" <x86@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>
Subject: RE: [PATCH v3 0/2] hyperv: Run VMBus kexec cleanup from syscore shutdown
Date: Thu, 1 Oct 2026 16:14:22 +0000	[thread overview]
Message-ID: <SN6PR02MB41578FDB019EE76576C612A8D48A2@SN6PR02MB4157.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20261001132128.1703511-1-shradhagupta@linux.microsoft.com>

From: Shradha Gupta <shradhagupta@linux.microsoft.com> Sent: Thursday, October 1, 2026 6:21 AM
> 
> 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

Nice! Net impact is to remove 12 lines of code, instead of
adding 40, which is great. And nothing under arch/arm64 is
modified.

One minor point: In hv_machine_shutdown(), we have two
sequential tests of kexec_in_progress. Given that you are
removing some code under the first test, I think it would be
fair game to do a very minor refactoring of existing code and
combine the two tests. It just looks a little funny to have the
same test twice in a row.

But regardless of whether you include that change, for
the series,

Reviewed-by: Michael Kelley <mhklinux@outlook.com>

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

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 13:21 Shradha Gupta
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-08  7:50   ` Mike Rapoport
2026-10-01 13:22 ` [PATCH v3 2/2] Drivers: hv: Run VMBus kexec cleanup from syscore shutdown Shradha Gupta
2026-10-08  7:53   ` Mike Rapoport
2026-10-09  6:49     ` Shradha Gupta
2026-10-01 16:14 ` Michael Kelley [this message]
2026-10-06  9:26   ` [PATCH v3 0/2] hyperv: " Shradha Gupta
2026-10-01 16:52 ` Bradley Morgan
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=SN6PR02MB41578FDB019EE76576C612A8D48A2@SN6PR02MB4157.namprd02.prod.outlook.com \
    --to=mhklinux@outlook.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=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

all inboxes | Powered by JetHome®