[PATCH v1 8/8] selftests: kho: add read-only KHO test to vmtest.sh
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Oct 18 19:19:02 PDT 2026
> Extend tools/testing/selftests/kho/vmtest.sh and init.c to run a second
> QEMU test verifying read-only KHO ('kho_ro=<fdt_phys>') after the
> standard KHO test on both x86_64 and aarch64:
>
> - Build a second kernel configured with CONFIG_KEXEC_HANDOVER_READONLY=y
> (and CONFIG_KEXEC_HANDOVER=n).
> - Pass KHO_RO_CMDLINE ('nokaslr kho_bootmem=64M,64M,64M' on x86_64,
> 'cma=116M at 0x40c00000' on aarch64) to the first kernel in the read-only
> test run so KHO allocations are placed in predictable physical ranges.
> - When booted with 'kho_ro_test', read /debugfs/kho/out/fdt_phys in
> init.c and kexec into the read-only kernel with 'kho_ro=<fdt_phys>'
> and architecture-specific memory parameters
> ('memmap=792M$16M memmap=24M$1000M' on x86_64,
> 'mem=128M cma=12M at 0x40000000' on aarch64) so the preserved pages are
> excluded from the boot memory map and mapped via kho_ro_map_folio().
> - Verify 'KHO restore succeeded' from test_kho in read-only mode.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261019021111.990394-1-pasha.tatashin@soleen.com?part=8
More information about the kexec
mailing list