[PATCH RESEND] x86/kexec: Carry forward the boot DTB on kexec

Brian Mak makb at juniper.net
Wed Jul 30 10:02:08 PDT 2025


On Jul 30, 2025, at 12:31 AM, Dave Young <dyoung at redhat.com> wrote

>> +#ifdef CONFIG_OF_FLATTREE
>> +     if (initial_boot_params) {
>> +             setup_dtb(params, params_load_addr, setup_data_offset);
>> +             setup_data_offset += sizeof(struct setup_data) +
>> +                                  fdt_totalsize(initial_boot_params);
> 
> I suppose current boot dtb should be valid for the current runnning
> kernel, if you use kexec to load another kernel the next kexec reboot
> could fail due to unmatching dtb.
> 
> Make this unconditionally could break the previous working kexec?

Hi Dave,

Thanks for taking the time to look at this change!

The behavior on ARM64 for carrying over the current boot DTB is
unconditional, which is why I've made it unconditional here as well. I'm
open to suggestions on this though. Realistically, would there be a case
where having no DTB wouldn't break, but carrying over the current DTB
would?

> 
>> +     } else {
>> +             pr_info("No DTB\n");
> 
> pr_debug sounds better.

Agreed. I'll raise it in a v2 in a few days if there's no other
comments.

Thanks,
Brian



More information about the kexec mailing list