Page MenuHomeFreeBSD

LA57: move large map out of kernel pml4
ClosedPublic

Authored by kib on Jul 17 2025, 12:15 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Aug 29, 3:23 AM
Unknown Object (File)
Thu, Aug 21, 8:22 PM
Unknown Object (File)
Thu, Aug 21, 7:37 PM
Unknown Object (File)
Thu, Aug 14, 4:50 PM
Unknown Object (File)
Thu, Aug 14, 8:45 AM
Unknown Object (File)
Sat, Aug 9, 6:26 PM
Unknown Object (File)
Jul 31 2025, 8:26 PM
Unknown Object (File)
Jul 31 2025, 12:58 AM
Subscribers

Details

Summary
amd64 pmap: make large map sizing depend on kva_layout instead of pml4 indexes


amd64 pmap: for LA57 move large map out of kernel pml4 slot

and allow it to consume up to 32 pml5 slots (32 x 2048 TB), same as
DMAP.


amd64 vmparam.h: update KVA map

Also designate the start address of the kernel pml4 entry.


amd64 sysctl vm.pmap.kernel_maps: do not desinformate for la57 case

For !la57, direct map, large map, and recursive mapping are not in top
pml4 region.

Bigger change would be adding the dump of whole pml5 KVA mappings.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Jul 17 2025, 12:15 AM
sys/amd64/amd64/pmap.c
2612

I think this can be conditional on !la57.

kib marked an inline comment as done.Jul 17 2025, 9:22 PM
kib added inline comments.
sys/amd64/amd64/pmap.c
2612

Right now yes, but eventually this should be fixed (as a next step of the KVA changes).

kib marked an inline comment as done.

Only clip lmap for KMSAN map in !la57 case.

markj added inline comments.
sys/amd64/amd64/pmap.c
10783–10784

Don't these assertions require some modification for la57?

This revision is now accepted and ready to land.Jul 18 2025, 1:46 AM
kib edited the summary of this revision. (Show Details)

Update KASSERTs in pmap_large_map_pdpe() as much as it is useful.
Disable some printings in sysctl_kmaps() for la57 mode.

This revision now requires review to proceed.Jul 18 2025, 4:03 AM
This revision is now accepted and ready to land.Jul 18 2025, 2:22 PM
alc added inline comments.
sys/amd64/amd64/pmap.c
10784

The #ifdef seems redundant. The compiler will recognize that the if (!la57) is empty, and not generate any code.

Fix indexes for pml5 LMAP creation loop.
Split pmap_large_map_pdpe() into la57/la58 pathes.

This revision now requires review to proceed.Jul 19 2025, 12:56 AM
sys/amd64/amd64/pmap.c
10780

pml4?

kib marked 3 inline comments as done.

pml4

This revision is now accepted and ready to land.Jul 20 2025, 12:16 AM