[PATCH V2 06/14] arm64/mm: Enable fixmap with 5 level page table

Anshuman Khandual anshuman.khandual at arm.com
Wed Sep 16 23:18:36 PDT 2026


On Wed, Sep 16, 2026 at 04:30:05PM +0200, David Hildenbrand (Arm) wrote:
> 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?

But fixmap was never 5 level earlier.

> 
> 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?

IIUC existing configurations which never required 5 levels would not need
this reconfiguration even now.

> 
> > 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."

Right.

> 
> -- 
> Cheers,
> 
> David



More information about the linux-arm-kernel mailing list