Re: [RFC PATCH 2/4] mm: Add support for unaccepted memory hotplug

From: Kiryl Shutsemau

Date: Thu Nov 27 2025 - 12:36:00 EST


On Wed, Nov 26, 2025 at 11:31:27PM +0100, Borislav Petkov wrote:
> On Wed, Nov 26, 2025 at 11:12:13AM +0000, Kiryl Shutsemau wrote:
> > > diff --git a/arch/x86/boot/compressed/efi.h b/arch/x86/boot/compressed/efi.h
> > > index 4f7027f33def..a220a1966cae 100644
> > > --- a/arch/x86/boot/compressed/efi.h
> > > +++ b/arch/x86/boot/compressed/efi.h
> > > @@ -102,6 +102,7 @@ struct efi_unaccepted_memory {
> > > u32 unit_size;
> > > u64 phys_base;
> > > u64 size;
> > > + bool mem_reserved;
> > > unsigned long *bitmap;
> > > };
> > >
> >
> > Again, this is ABI break for kexec.
>
> ABI break for kexec? Is that a thing?
>
> Since when do we enforce ABI compatibility for kexec and where are we
> documenting that?

The whole purpose of kexec() is to switch between kernel versions. This
struct defines format we communicate information about unaccepted memory
between kernels. The mismatch will lead to boot failure.

The structure is versioned. Ideally, we should know the format of the
structure the next kernel supports and act accordingly in the first
kernel. Like, we can accept all memory before kexec on mismatch.

--
Kiryl Shutsemau / Kirill A. Shutemov