Re: [PATCH v2 1/2] x86/boot: Move early kernel mapping code into startup/

From: Ingo Molnar
Date: Mon Apr 07 2025 - 13:45:48 EST



* Ard Biesheuvel <ardb+git@xxxxxxxxxx> wrote:

> From: Ard Biesheuvel <ardb@xxxxxxxxxx>
>
> The startup code that constructs the kernel virtual mapping runs from
> the 1:1 mapping of memory itself, and therefore, cannot use absolute
> symbol references. Move this code into a separate source file under
> arch/x86/boot/startup/ where all such code will be kept from now on.
>
> Since all code here is constructed in a manner that ensures that it
> tolerates running from the 1:1 mapping of memory, any uses of the
> RIP_REL_REF() macro can be dropped, along with __head annotations for
> placing this code in a dedicated startup section.

So would it be possible to do this in ~3 steps: first the mechanic
movement of code, with very few changes (if the result builds & boots),
then drop the RIP_REL_REF() uses and __head annotations in two separate
patches?

Bisectability, ease of review, etc.

(The tiny bird gets the worm, but I might have butchered that proverb.)

Thanks,

Ingo