Re: [PATCH v3 1/2] kexec: Add helper to report an active kexec reboot
From: sashiko-bot
Date: Thu Oct 01 2026 - 10:08:22 EST
> A shutdown callback in a loadable module may need to distinguish a
> kexec reboot from a normal restart, halt, or poweroff. The Hyper-V
> VMBus driver needs this distinction when moving its kexec cleanup into
> a common syscore shutdown callback.
>
> Add kexec_is_in_progress() and export it to GPL modules so the callback
> can remain guarded when VMBus is built as a module. Provide a false
> inline implementation when CONFIG_KEXEC_CORE is disabled.
>
> The helper reports only the normal kexec reboot path. Crash kexec and
> preserve-context kexec do not set this state.
>
> Signed-off-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261001132128.1703511-1-shradhagupta@xxxxxxxxxxxxxxxxxxx?part=1