]> git.ipfire.org Git - thirdparty/linux.git/commit
kho: add test for kexec handover
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 27 Jul 2025 08:37:33 +0000 (11:37 +0300)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 2 Aug 2025 19:01:41 +0000 (12:01 -0700)
commitb753522bed0b7e388a643f58d91bd81d8849ba43
treefa771664945a3ce15715139e57fb2a97bd454fc1
parentd92dccd05a20b7a9c2836d4e46e22128f5b73367
kho: add test for kexec handover

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.

[rppt@kernel.org: fix section mismatch]
Link: https://lkml.kernel.org/r/aIiRC8fXiOXKbPM_@kernel.org
Link: https://lkml.kernel.org/r/20250727083733.2590139-1-rppt@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Alexander Graf <graf@amazon.com>
Cc: Changyuan Lyu <changyuanl@google.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: Pratyush Yadav <pratyush@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
MAINTAINERS
lib/Kconfig.debug
lib/Makefile
lib/test_kho.c [new file with mode: 0644]
tools/testing/selftests/kho/arm64.conf [new file with mode: 0644]
tools/testing/selftests/kho/init.c [new file with mode: 0644]
tools/testing/selftests/kho/vmtest.sh [new file with mode: 0755]
tools/testing/selftests/kho/x86.conf [new file with mode: 0644]