xref: /linux/kernel/liveupdate/Kconfig (revision c6073743d0c7f011461bc542c9112180471affad)
1# SPDX-License-Identifier: GPL-2.0-only
2
3menu "Live Update and Kexec HandOver"
4
5config KEXEC_HANDOVER
6	bool "kexec handover"
7	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
8	select MEMBLOCK_KHO_SCRATCH
9	select KEXEC_FILE
10	select LIBFDT
11	select CMA
12	help
13	  Allow kexec to hand over state across kernels by generating and
14	  passing additional metadata to the target kernel. This is useful
15	  to keep data or state alive across the kexec. For this to work,
16	  both source and target kernels need to have this option enabled.
17
18config KEXEC_HANDOVER_DEBUG
19	bool "Enable Kexec Handover debug checks"
20	depends on KEXEC_HANDOVER
21	help
22	  This option enables extra sanity checks for the Kexec Handover
23	  subsystem. Since, KHO performance is crucial in live update
24	  scenarios and the extra code might be adding overhead it is
25	  only optionally enabled.
26
27config KEXEC_HANDOVER_DEBUGFS
28	bool "kexec handover debugfs interface"
29	default KEXEC_HANDOVER
30	depends on KEXEC_HANDOVER
31	select DEBUG_FS
32	help
33	  Allow to control kexec handover device tree via debugfs
34	  interface, i.e. finalize the state or aborting the finalization.
35	  Also, enables inspecting the KHO fdt trees with the debugfs binary
36	  blobs.
37
38config KEXEC_HANDOVER_ENABLE_DEFAULT
39	bool "Enable kexec handover by default"
40	depends on KEXEC_HANDOVER
41	help
42	  Enable Kexec Handover by default. This avoids the need to
43	  explicitly pass 'kho=on' on the kernel command line.
44
45	  This is useful for systems where KHO is a prerequisite for other
46	  features, such as Live Update, ensuring the mechanism is always
47	  active.
48
49	  The default behavior can still be overridden at boot time by
50	  passing 'kho=off'.
51
52config LIVEUPDATE
53	bool "Live Update Orchestrator"
54	depends on KEXEC_HANDOVER
55	help
56	  Enable the Live Update Orchestrator. Live Update is a mechanism,
57	  typically based on kexec, that allows the kernel to be updated
58	  while keeping selected devices operational across the transition.
59	  These devices are intended to be reclaimed by the new kernel and
60	  re-attached to their original workload without requiring a device
61	  reset.
62
63	  Ability to handover a device from current to the next kernel depends
64	  on specific support within device drivers and related kernel
65	  subsystems.
66
67	  This feature primarily targets virtual machine hosts to quickly update
68	  the kernel hypervisor with minimal disruption to the running virtual
69	  machines.
70
71	  If unsure, say N.
72
73config LIVEUPDATE_MEMFD
74	bool "Live update support for memfd"
75	depends on LIVEUPDATE
76	depends on MEMFD_CREATE
77	depends on SHMEM
78	default LIVEUPDATE
79	help
80	  Enable live update support for memfd regions. This allows preserving
81	  memfd-backed memory across kernel live updates.
82
83	  This can be used to back VM memory with memfds, allowing the guest
84	  memory to persist, or for other user workloads needing to preserve
85	  pages.
86
87	  If unsure, say N.
88
89endmenu
90