Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2026-05-29 14:32 George Guo
  2026-05-29 14:32 ` [PATCH v2 1/4] LoongArch: kexec: add KHO support for FDT-based systems George Guo
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: George Guo @ 2026-05-29 14:32 UTC (permalink / raw)
  To: Huacai Chen, Mike Rapoport, Pasha Tatashin, Pratyush Yadav,
	Shuah Khan
  Cc: WANG Xuerui, Alexander Graf, loongarch, linux-kernel, kexec,
	linux-mm, linux-kselftest, George Guo

From: George Guo <guodongtai@kylinos.cn>

WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#26: 
containing only /chosen with the two KHO properties.  Since DEVICE_TREE_GUID

ERROR: Invalid commit separator - some tools may have problems applying this
#34: 
-------------------------------

total: 2 errors, 1 warnings, 0 lines checked
>
Date: Fri, 29 May 2026 21:54:01 +0800
Subject: [PATCH v2 0/4] LoongArch: add KHO support and selftests

This series adds Kexec Handover (KHO) support for LoongArch and extends
the KHO selftest infrastructure to run on LoongArch under QEMU.

KHO passes metadata (the KHO state FDT and scratch area addresses) to the
second kernel via the FDT /chosen node, using the linux,kho-fdt and
linux,kho-scratch properties that drivers/of/kexec.c:kho_add_chosen()
writes and drivers/of/fdt.c:early_init_dt_check_kho() reads.

KHO support (patches 1-2):

Patch 1 adds KHO support for FDT-based systems (initial_boot_params !=
NULL, e.g. QEMU virt without OVMF).  kho_load_fdt() copies the running
kernel's FDT, appends linux,kho-fdt and linux,kho-scratch to /chosen,
and loads the result as a kexec segment.  machine_kexec() updates the
DEVICE_TREE_GUID entry in the EFI config table to point to this segment
so the second kernel's fdt_setup() can find and parse it.

Patch 2 adds KHO support for ACPI-only systems (initial_boot_params ==
NULL, e.g. LoongArch servers with UEFI or QEMU with OVMF).  Because no
system FDT is available, kho_load_fdt() builds a minimal FDT from
scratch containing only /chosen with the two KHO properties.  Since
DEVICE_TREE_GUID is absent from the EFI config table on ACPI-only
systems, a new extended config table is built with the entry appended
and loaded as a kexec segment; machine_kexec() switches st->tables to
point to it before jumping.  The second kernel's fdt_setup() calls
efi_fdt_pointer() to detect the KHO FDT and passes it to
early_init_dt_check_kho().

Selftest support (patches 3-4):

Patch 3 adds loongarch.conf and extends vmtest.sh to recognise loongarch64
as a build target.  The LoongArch virt machine is FDT-only (no ACPI), so
'earlycon' must appear on the kernel cmdline or the console UART is never
discovered.  PS/2 input devices are also disabled since QEMU's LoongArch
virt machine has no i8042 controller; the fallback port probe hits a page
fault and panics before reaching userspace.

Patch 4 handles QEMU not exiting after kexec on LoongArch.  QEMU provides
no EFI runtime services, so machine_restart() falls through to an infinite
idle loop.  QEMU_NEEDS_KILL=1 in loongarch.conf signals vmtest.sh to run
QEMU in the background, poll the serial output for the test verdict, and
kill QEMU once it appears, so the test completes unattended.

George Guo (4):
  LoongArch: kexec: add KHO support for FDT-based systems
  LoongArch: kexec: add KHO support for ACPI-only systems
  selftests/kho: add LoongArch vmtest support
  selftests/kho: handle QEMU not exiting after kexec on LoongArch

 arch/loongarch/Kconfig                     |   3 +
 arch/loongarch/include/asm/kexec.h         |   7 +
 arch/loongarch/kernel/machine_kexec.c      |  38 +++
 arch/loongarch/kernel/machine_kexec_file.c | 256 +++++++++++++++++++++
 arch/loongarch/kernel/setup.c              |  21 +-
 tools/testing/selftests/kho/loongarch.conf |  13 ++
 tools/testing/selftests/kho/vmtest.sh      |  35 ++-
 7 files changed, 365 insertions(+), 8 deletions(-)
 create mode 100644 tools/testing/selftests/kho/loongarch.conf

-- 
2.25.1



^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re:
@ 2024-10-10 22:44 PRIVATE
  0 siblings, 0 replies; 10+ messages in thread
From: PRIVATE @ 2024-10-10 22:44 UTC (permalink / raw)
  To: kexec

I have a viable proposal for you, If You want to know more, get back to me.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread
* (no subject)
@ 2012-11-30 13:58 Naresh Bhat
  2012-11-30 14:27 ` Daniel Mack
  0 siblings, 1 reply; 10+ messages in thread
From: Naresh Bhat @ 2012-11-30 13:58 UTC (permalink / raw)
  To: kexec; +Cc: magnus.damm, Daniel Mack

Hi,

I am using Versatile express target at Daughterboard Site 1:
V2P-CA15_A7 Cortex A15

root@arm-cortex-a15:~# kexec -f zImage --dtb=vexpress.dtb
--append="root=/dev/nfs rw ip=dhcp
nfsroot=<Host-IP>:/mnt/sda3/nfs/cortexa15/core-image
console=ttyAMA0,38400n8 nosmp"
Starting new kernel
Bye!
Uncompressing Linux...

It stops here nothing is coming on serial console/terminal.

1. vexpress.dtb is generated from vexpress-v2p-ca15_a7.dts file.
2. Kernel version:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
3. Userland Tool:
git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git

Please, help me to overcome from the above issue.  I appreciate your help

My questions are
1. My command line parameters are correct ?
2. Is it possible to test kexec using ATAGs on ca15_a7 architecture ??

Thanks and Regards
-Naresh Bhat

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-05-31  9:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-29 14:32 George Guo
2026-05-29 14:32 ` [PATCH v2 1/4] LoongArch: kexec: add KHO support for FDT-based systems George Guo
2026-05-29 14:32 ` [PATCH v2 2/4] LoongArch: kexec: add KHO support for ACPI-only systems George Guo
2026-05-29 14:32 ` [PATCH v2 3/4] selftests/kho: add LoongArch vmtest support George Guo
2026-05-29 14:32 ` [PATCH v2 4/4] selftests/kho: handle QEMU not exiting after kexec on LoongArch George Guo
2026-05-31  9:28 ` Mike Rapoport
  -- strict thread matches above, loose matches on Subject: below --
2024-10-10 22:44 Re: PRIVATE
2012-11-30 13:58 Naresh Bhat
2012-11-30 14:27 ` Daniel Mack
2012-12-14 14:09   ` Re: Naresh Bhat
2012-12-14 14:35     ` Re: Sven Neumann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox