]> Gentwo Git Trees - linux/.git/commit
x86/kexec: carry forward the boot DTB on kexec
authorBrian Mak <makb@juniper.net>
Tue, 5 Aug 2025 21:15:27 +0000 (14:15 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 14 Sep 2025 00:32:43 +0000 (17:32 -0700)
commitf367474b5884edbc42661e7fecf784cb131dd25d
treec741ae41f49be0f846fca4c44c610cc8cd4c9908
parent1440648c0feed03cfd51c7dba92a77feb34bf27b
x86/kexec: carry forward the boot DTB on kexec

Currently, the kexec_file_load syscall on x86 does not support passing a
device tree blob to the new kernel.  Some embedded x86 systems use device
trees.  On these systems, failing to pass a device tree to the new kernel
causes a boot failure.

To add support for this, we copy the behavior of ARM64 and PowerPC and
copy the current boot's device tree blob for use in the new kernel.  We do
this on x86 by passing the device tree blob as a setup_data entry in
accordance with the x86 boot protocol.

This behavior is gated behind the KEXEC_FILE_FORCE_DTB flag.

Link: https://lkml.kernel.org/r/20250805211527.122367-3-makb@juniper.net
Signed-off-by: Brian Mak <makb@juniper.net>
Cc: Alexander Graf <graf@amazon.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Borislav Betkov <bp@alien8.de>
Cc: Dave Young <dyoung@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Saravana Kannan <saravanak@google.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/x86/kernel/kexec-bzimage64.c
include/linux/kexec.h
include/uapi/linux/kexec.h
kernel/kexec_file.c