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

Configure Feed

Select the types of activity you want to include in your feed.

liveupdate: kho: move to kernel/liveupdate

Move KHO to kernel/liveupdate/ in preparation of placing all Live Update
core kernel related files to the same place.

[pasha.tatashin@soleen.com: disable the menu when DEFERRED_STRUCT_PAGE_INIT]
Link: https://lkml.kernel.org/r/CA+CK2bAvh9Oa2SLfsbJ8zztpEjrgr_hr-uGgF1coy8yoibT39A@mail.gmail.com
Link: https://lkml.kernel.org/r/20251101142325.1326536-8-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Changyuan Lyu <changyuanl@google.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Simon Horman <horms@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Zhu Yanjun <yanjun.zhu@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Pasha Tatashin and committed by
Andrew Morton
48a1b232 99cd2ffa

+52 -41
+1 -1
Documentation/core-api/kho/concepts.rst
··· 70 70 71 71 Public API 72 72 ========== 73 - .. kernel-doc:: kernel/kexec_handover.c 73 + .. kernel-doc:: kernel/liveupdate/kexec_handover.c 74 74 :export:
+1 -1
MAINTAINERS
··· 13799 13799 F: Documentation/admin-guide/mm/kho.rst 13800 13800 F: Documentation/core-api/kho/* 13801 13801 F: include/linux/kexec_handover.h 13802 - F: kernel/kexec_handover* 13802 + F: kernel/liveupdate/kexec_handover* 13803 13803 F: lib/test_kho.c 13804 13804 F: tools/testing/selftests/kho/ 13805 13805
+2
init/Kconfig
··· 2156 2156 2157 2157 source "kernel/Kconfig.kexec" 2158 2158 2159 + source "kernel/liveupdate/Kconfig" 2160 + 2159 2161 endmenu # General setup 2160 2162 2161 2163 source "arch/Kconfig"
-34
kernel/Kconfig.kexec
··· 94 94 Jump between original kernel and kexeced kernel and invoke 95 95 code in physical address mode via KEXEC 96 96 97 - config KEXEC_HANDOVER 98 - bool "kexec handover" 99 - depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE 100 - depends on !DEFERRED_STRUCT_PAGE_INIT 101 - select MEMBLOCK_KHO_SCRATCH 102 - select KEXEC_FILE 103 - select LIBFDT 104 - select CMA 105 - help 106 - Allow kexec to hand over state across kernels by generating and 107 - passing additional metadata to the target kernel. This is useful 108 - to keep data or state alive across the kexec. For this to work, 109 - both source and target kernels need to have this option enabled. 110 - 111 - config KEXEC_HANDOVER_DEBUG 112 - bool "Enable Kexec Handover debug checks" 113 - depends on KEXEC_HANDOVER 114 - help 115 - This option enables extra sanity checks for the Kexec Handover 116 - subsystem. Since, KHO performance is crucial in live update 117 - scenarios and the extra code might be adding overhead it is 118 - only optionally enabled. 119 - 120 - config KEXEC_HANDOVER_DEBUGFS 121 - bool "kexec handover debugfs interface" 122 - default KEXEC_HANDOVER 123 - depends on KEXEC_HANDOVER 124 - select DEBUG_FS 125 - help 126 - Allow to control kexec handover device tree via debugfs 127 - interface, i.e. finalize the state or aborting the finalization. 128 - Also, enables inspecting the KHO fdt trees with the debugfs binary 129 - blobs. 130 - 131 97 config CRASH_DUMP 132 98 bool "kernel crash dumps" 133 99 default ARCH_DEFAULT_CRASH_DUMP
+1 -3
kernel/Makefile
··· 52 52 obj-y += irq/ 53 53 obj-y += rcu/ 54 54 obj-y += livepatch/ 55 + obj-y += liveupdate/ 55 56 obj-y += dma/ 56 57 obj-y += entry/ 57 58 obj-y += unwind/ ··· 83 82 obj-$(CONFIG_KEXEC) += kexec.o 84 83 obj-$(CONFIG_KEXEC_FILE) += kexec_file.o 85 84 obj-$(CONFIG_KEXEC_ELF) += kexec_elf.o 86 - obj-$(CONFIG_KEXEC_HANDOVER) += kexec_handover.o 87 - obj-$(CONFIG_KEXEC_HANDOVER_DEBUG) += kexec_handover_debug.o 88 - obj-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kexec_handover_debugfs.o 89 85 obj-$(CONFIG_BACKTRACE_SELF_TEST) += backtracetest.o 90 86 obj-$(CONFIG_COMPAT) += compat.o 91 87 obj-$(CONFIG_CGROUPS) += cgroup/
+2 -2
kernel/kexec_handover.c kernel/liveupdate/kexec_handover.c
··· 26 26 * KHO is tightly coupled with mm init and needs access to some of mm 27 27 * internal APIs. 28 28 */ 29 - #include "../mm/internal.h" 30 - #include "kexec_internal.h" 29 + #include "../../mm/internal.h" 30 + #include "../kexec_internal.h" 31 31 #include "kexec_handover_internal.h" 32 32 33 33 #define KHO_FDT_COMPATIBLE "kho-v1"
kernel/kexec_handover_debug.c kernel/liveupdate/kexec_handover_debug.c
kernel/kexec_handover_debugfs.c kernel/liveupdate/kexec_handover_debugfs.c
kernel/kexec_handover_internal.h kernel/liveupdate/kexec_handover_internal.h
+40
kernel/liveupdate/Kconfig
··· 1 + # SPDX-License-Identifier: GPL-2.0-only 2 + 3 + menu "Live Update and Kexec HandOver" 4 + depends on !DEFERRED_STRUCT_PAGE_INIT 5 + 6 + config KEXEC_HANDOVER 7 + bool "kexec handover" 8 + depends on ARCH_SUPPORTS_KEXEC_HANDOVER && ARCH_SUPPORTS_KEXEC_FILE 9 + depends on !DEFERRED_STRUCT_PAGE_INIT 10 + select MEMBLOCK_KHO_SCRATCH 11 + select KEXEC_FILE 12 + select LIBFDT 13 + select CMA 14 + help 15 + Allow kexec to hand over state across kernels by generating and 16 + passing additional metadata to the target kernel. This is useful 17 + to keep data or state alive across the kexec. For this to work, 18 + both source and target kernels need to have this option enabled. 19 + 20 + config KEXEC_HANDOVER_DEBUG 21 + bool "Enable Kexec Handover debug checks" 22 + depends on KEXEC_HANDOVER 23 + help 24 + This option enables extra sanity checks for the Kexec Handover 25 + subsystem. Since, KHO performance is crucial in live update 26 + scenarios and the extra code might be adding overhead it is 27 + only optionally enabled. 28 + 29 + config KEXEC_HANDOVER_DEBUGFS 30 + bool "kexec handover debugfs interface" 31 + default KEXEC_HANDOVER 32 + depends on KEXEC_HANDOVER 33 + select DEBUG_FS 34 + help 35 + Allow to control kexec handover device tree via debugfs 36 + interface, i.e. finalize the state or aborting the finalization. 37 + Also, enables inspecting the KHO fdt trees with the debugfs binary 38 + blobs. 39 + 40 + endmenu
+5
kernel/liveupdate/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + obj-$(CONFIG_KEXEC_HANDOVER) += kexec_handover.o 4 + obj-$(CONFIG_KEXEC_HANDOVER_DEBUG) += kexec_handover_debug.o 5 + obj-$(CONFIG_KEXEC_HANDOVER_DEBUGFS) += kexec_handover_debugfs.o