Re: [PATCH V2 06/14] arm64/mm: Enable fixmap with 5 level page table
From: David Hildenbrand (Arm)
Date: Wed Sep 16 2026 - 11:00:59 EST
On 9/7/26 05:50, Anshuman Khandual wrote:
> FEAT_D128 halves PTRS_PER_PXX thus shrinking the VA range coverage
> for each page table level. Hence in order to preserve all existing
> VA range configurations, some geometry now need to become 5-level.
>
Hmm, wasn't this 5-levels before, but other code allocated+initialized the p4d
table for us?
I mean, I see how we are filling in another level, but I don't see how we would
reconfigure something to use 5 page table levels?
> Since fixmap is used to build and manipulate page tables early on
> during boot the mapping must also gain that additional level which
> was not required earlier.
I am no expert ... but I am confused :)
We do have a loop only in early_fixmap_init_pmd(). So we cannot possibly span
more than a single ... PTE table?
>
> Enable fixmap with 5 level page table when required. This creates table
> entries at the PGD level. Add a fallback stub for pgd_page_paddr() when
> (PGTBALE_LEVELS <= 4) which helps in intercepting any unintended usage.
Again, I am very confused. Is it really just "As the page table layout changes,
we might no longer have a p4d table pre-populated for the range our fixmap falls
into. So if there is no p4d table yet, populate a static one just like we do for
the other levels."
--
Cheers,
David