xref: /linux/kernel/liveupdate/Kconfig (revision c17ee635fd3a482b2ad2bf5e269755c2eae5f25e)
148a1b232SPasha Tatashin# SPDX-License-Identifier: GPL-2.0-only
248a1b232SPasha Tatashin
348a1b232SPasha Tatashinmenu "Live Update and Kexec HandOver"
448a1b232SPasha Tatashin	depends on !DEFERRED_STRUCT_PAGE_INIT
548a1b232SPasha Tatashin
648a1b232SPasha Tatashinconfig KEXEC_HANDOVER
748a1b232SPasha Tatashin	bool "kexec handover"
848a1b232SPasha Tatashin	depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE
948a1b232SPasha Tatashin	depends on !DEFERRED_STRUCT_PAGE_INIT
1048a1b232SPasha Tatashin	select MEMBLOCK_KHO_SCRATCH
1148a1b232SPasha Tatashin	select KEXEC_FILE
1248a1b232SPasha Tatashin	select LIBFDT
1348a1b232SPasha Tatashin	select CMA
1448a1b232SPasha Tatashin	help
1548a1b232SPasha Tatashin	  Allow kexec to hand over state across kernels by generating and
1648a1b232SPasha Tatashin	  passing additional metadata to the target kernel. This is useful
1748a1b232SPasha Tatashin	  to keep data or state alive across the kexec. For this to work,
1848a1b232SPasha Tatashin	  both source and target kernels need to have this option enabled.
1948a1b232SPasha Tatashin
2048a1b232SPasha Tatashinconfig KEXEC_HANDOVER_DEBUG
2148a1b232SPasha Tatashin	bool "Enable Kexec Handover debug checks"
2248a1b232SPasha Tatashin	depends on KEXEC_HANDOVER
2348a1b232SPasha Tatashin	help
2448a1b232SPasha Tatashin	  This option enables extra sanity checks for the Kexec Handover
2548a1b232SPasha Tatashin	  subsystem. Since, KHO performance is crucial in live update
2648a1b232SPasha Tatashin	  scenarios and the extra code might be adding overhead it is
2748a1b232SPasha Tatashin	  only optionally enabled.
2848a1b232SPasha Tatashin
2948a1b232SPasha Tatashinconfig KEXEC_HANDOVER_DEBUGFS
3048a1b232SPasha Tatashin	bool "kexec handover debugfs interface"
3148a1b232SPasha Tatashin	default KEXEC_HANDOVER
3248a1b232SPasha Tatashin	depends on KEXEC_HANDOVER
3348a1b232SPasha Tatashin	select DEBUG_FS
3448a1b232SPasha Tatashin	help
3548a1b232SPasha Tatashin	  Allow to control kexec handover device tree via debugfs
3648a1b232SPasha Tatashin	  interface, i.e. finalize the state or aborting the finalization.
3748a1b232SPasha Tatashin	  Also, enables inspecting the KHO fdt trees with the debugfs binary
3848a1b232SPasha Tatashin	  blobs.
3948a1b232SPasha Tatashin
407bd3643fSPasha Tatashinconfig KEXEC_HANDOVER_ENABLE_DEFAULT
417bd3643fSPasha Tatashin	bool "Enable kexec handover by default"
427bd3643fSPasha Tatashin	depends on KEXEC_HANDOVER
437bd3643fSPasha Tatashin	help
447bd3643fSPasha Tatashin	  Enable Kexec Handover by default. This avoids the need to
457bd3643fSPasha Tatashin	  explicitly pass 'kho=on' on the kernel command line.
467bd3643fSPasha Tatashin
477bd3643fSPasha Tatashin	  This is useful for systems where KHO is a prerequisite for other
487bd3643fSPasha Tatashin	  features, such as Live Update, ensuring the mechanism is always
497bd3643fSPasha Tatashin	  active.
507bd3643fSPasha Tatashin
517bd3643fSPasha Tatashin	  The default behavior can still be overridden at boot time by
527bd3643fSPasha Tatashin	  passing 'kho=off'.
537bd3643fSPasha Tatashin
549e2fd062SPasha Tatashinconfig LIVEUPDATE
559e2fd062SPasha Tatashin	bool "Live Update Orchestrator"
569e2fd062SPasha Tatashin	depends on KEXEC_HANDOVER
579e2fd062SPasha Tatashin	help
589e2fd062SPasha Tatashin	  Enable the Live Update Orchestrator. Live Update is a mechanism,
599e2fd062SPasha Tatashin	  typically based on kexec, that allows the kernel to be updated
609e2fd062SPasha Tatashin	  while keeping selected devices operational across the transition.
619e2fd062SPasha Tatashin	  These devices are intended to be reclaimed by the new kernel and
629e2fd062SPasha Tatashin	  re-attached to their original workload without requiring a device
639e2fd062SPasha Tatashin	  reset.
649e2fd062SPasha Tatashin
659e2fd062SPasha Tatashin	  Ability to handover a device from current to the next kernel depends
669e2fd062SPasha Tatashin	  on specific support within device drivers and related kernel
679e2fd062SPasha Tatashin	  subsystems.
689e2fd062SPasha Tatashin
699e2fd062SPasha Tatashin	  This feature primarily targets virtual machine hosts to quickly update
709e2fd062SPasha Tatashin	  the kernel hypervisor with minimal disruption to the running virtual
719e2fd062SPasha Tatashin	  machines.
729e2fd062SPasha Tatashin
739e2fd062SPasha Tatashin	  If unsure, say N.
749e2fd062SPasha Tatashin
75*998be0a4SPasha Tatashinconfig LIVEUPDATE_MEMFD
76*998be0a4SPasha Tatashin	bool "Live update support for memfd"
77*998be0a4SPasha Tatashin	depends on LIVEUPDATE
78*998be0a4SPasha Tatashin	depends on MEMFD_CREATE
79*998be0a4SPasha Tatashin	depends on SHMEM
80*998be0a4SPasha Tatashin	default LIVEUPDATE
81*998be0a4SPasha Tatashin	help
82*998be0a4SPasha Tatashin	  Enable live update support for memfd regions. This allows preserving
83*998be0a4SPasha Tatashin	  memfd-backed memory across kernel live updates.
84*998be0a4SPasha Tatashin
85*998be0a4SPasha Tatashin	  This can be used to back VM memory with memfds, allowing the guest
86*998be0a4SPasha Tatashin	  memory to persist, or for other user workloads needing to preserve
87*998be0a4SPasha Tatashin	  pages.
88*998be0a4SPasha Tatashin
89*998be0a4SPasha Tatashin	  If unsure, say N.
90*998be0a4SPasha Tatashin
9148a1b232SPasha Tatashinendmenu
92