Skip to contentSkip to conversation

kho-add-test-for-kexec-handover.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Aug 2, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kho: add test for kexec handover
has been removed from the -mm tree. Its filename was
kho-add-test-for-kexec-handover.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Mike Rapoport (Microsoft)" <[email protected]>
Subject: kho: add test for kexec handover
Date: Sun, 27 Jul 2025 11:37:33 +0300

Testing kexec handover requires a kernel driver that will generate some data and preserve it with KHO on the first boot and then restore that data and verify it was preserved properly after kexec.

To facilitate such test, along with the kernel driver responsible for data generation, preservation and restoration add a script that runs a kernel in a VM with a minimal /init. The /init enables KHO, loads a kernel image for kexec and runs kexec reboot. After the boot of the kexeced kernel, the driver verifies that the data was properly preserved.

---

 MAINTAINERS                            |    1 
 lib/Kconfig.debug                      |   21 +
 lib/Makefile                           |    1 
 lib/test_kho.c                         |  305 +++++++++++++++++++++++
 tools/testing/selftests/kho/arm64.conf |    9 
 tools/testing/selftests/kho/init.c     |  100 +++++++
 tools/testing/selftests/kho/vmtest.sh  |  183 +++++++++++++
 tools/testing/selftests/kho/x86.conf   |    7 
 8 files changed, 627 insertions(+)
lib/Kconfig.debug renamed from lib/Kconfig.debug~kho-add-test-for-kexec-handover +21 -0
@@ -3225,6 +3225,27 @@ config TEST_OBJPOOL
 
 	  If unsure, say N.
 
+config TEST_KEXEC_HANDOVER
+	bool "Test for Kexec HandOver"
+	default n
+	depends on KEXEC_HANDOVER
+	help
+	  This option enables test for Kexec HandOver (KHO).
+	  The test consists of two parts: saving kernel data before kexec and
+	  restoring the data after kexec and verifying that it was properly
+	  handed over. This test module creates and saves data on the boot of
+	  the first kernel and restores and verifies the data on the boot of
+	  kexec'ed kernel.
+
+	  For detailed documentation about KHO, see Documentation/core-api/kho.
+
+	  To run the test run:
+
+	  tools/testing/selftests/kho/vmtest.sh -h
+
+	  If unsure, say N.
+
+
 config INT_POW_KUNIT_TEST
 	tristate "Integer exponentiation (int_pow) test" if !KUNIT_ALL_TESTS
 	depends on KUNIT
lib/Makefile renamed from lib/Makefile~kho-add-test-for-kexec-handover +1 -0
@@ -102,6 +102,7 @@ obj-$(CONFIG_TEST_HMM) += test_hmm.o
 obj-$(CONFIG_TEST_FREE_PAGES) += test_free_pages.o
 obj-$(CONFIG_TEST_REF_TRACKER) += test_ref_tracker.o
 obj-$(CONFIG_TEST_OBJPOOL) += test_objpool.o
+obj-$(CONFIG_TEST_KEXEC_HANDOVER) += test_kho.o
 
 obj-$(CONFIG_TEST_FPU) += test_fpu.o
 test_fpu-y := test_fpu_glue.o test_fpu_impl.o
lib/test_kho.c new file +305 -0

305 lines not on this page · raw message

MAINTAINERS renamed from MAINTAINERS~kho-add-test-for-kexec-handover +1 -0
@@ -13353,6 +13353,7 @@ F:	Documentation/admin-guide/mm/kho.rst
 F:	Documentation/core-api/kho/*
 F:	include/linux/kexec_handover.h
 F:	kernel/kexec_handover.c
+F:	tools/testing/selftests/kho/
 
 KEYS-ENCRYPTED
 M:	Mimi Zohar <[email protected]>
tools/testing/selftests/kho/arm64.conf new file +9 -0
new file mode 100644
@@ -0,0 +1,9 @@
+QEMU_CMD="qemu-system-aarch64 -M virt -cpu max"
+QEMU_KCONFIG="
+CONFIG_SERIAL_AMBA_PL010=y
+CONFIG_SERIAL_AMBA_PL010_CONSOLE=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+"
+KERNEL_IMAGE="Image"
+KERNEL_CMDLINE="console=ttyAMA0"
tools/testing/selftests/kho/init.c new file +100 -0

100 lines not on this page · raw message

tools/testing/selftests/kho/vmtest.sh new file +183 -0

183 lines not on this page · raw message

tools/testing/selftests/kho/x86.conf new file +7 -0
new file mode 100644
@@ -0,0 +1,7 @@
+QEMU_CMD=qemu-system-x86_64
+QEMU_KCONFIG="
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+"
+KERNEL_IMAGE="bzImage"
+KERNEL_CMDLINE="console=ttyS0"

_

Patches currently in -mm which might be from [email protected] are