[PATCH v3 1/2] kexec: Add helper to report an active kexec reboot

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 1 06:28:06 PDT 2026


> 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 at linux.microsoft.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261001132128.1703511-1-shradhagupta@linux.microsoft.com?part=1




More information about the kexec mailing list