Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kho: add Kconfig option to enable KHO by default

Currently, Kexec Handover must be explicitly enabled via the kernel
command line parameter `kho=on`.

For workloads that rely on KHO as a foundational requirement (such as the
upcoming Live Update Orchestrator), requiring an explicit boot parameter
adds redundant configuration steps.

Introduce CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT. When selected, KHO
defaults to enabled. This is equivalent to passing kho=on at boot. The
behavior can still be disabled at runtime by passing kho=off.

Link: https://lkml.kernel.org/r/20251114190002.3311679-14-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Baoquan He <bhe@redhat.com>
Cc: Coiby Xu <coxu@redhat.com>
Cc: Dave Vasilevsky <dave@vasilevsky.ca>
Cc: Eric Biggers <ebiggers@google.com>
Cc: Kees Cook <kees@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Pasha Tatashin and committed by
Andrew Morton
7bd3643f de51999e

+15 -1
+14
kernel/liveupdate/Kconfig
··· 37 37 Also, enables inspecting the KHO fdt trees with the debugfs binary 38 38 blobs. 39 39 40 + config KEXEC_HANDOVER_ENABLE_DEFAULT 41 + bool "Enable kexec handover by default" 42 + depends on KEXEC_HANDOVER 43 + help 44 + Enable Kexec Handover by default. This avoids the need to 45 + explicitly pass 'kho=on' on the kernel command line. 46 + 47 + This is useful for systems where KHO is a prerequisite for other 48 + features, such as Live Update, ensuring the mechanism is always 49 + active. 50 + 51 + The default behavior can still be overridden at boot time by 52 + passing 'kho=off'. 53 + 40 54 endmenu
+1 -1
kernel/liveupdate/kexec_handover.c
··· 52 52 53 53 static_assert(sizeof(union kho_page_info) == sizeof(((struct page *)0)->private)); 54 54 55 - static bool kho_enable __ro_after_init; 55 + static bool kho_enable __ro_after_init = IS_ENABLED(CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT); 56 56 57 57 bool kho_is_enabled(void) 58 58 {