HomeFreeBSD

amd64 sysctl vm.pmap.kernel_maps: rework

Description

amd64 sysctl vm.pmap.kernel_maps: rework

Iterate over the KVA instead of the pml4 indexes. Otherwise, we would
need to iterate of pml5 indexes for LA57 and then either use secondary
loop for pml4 entries, or use flat indexes for pml4. It is simpler to
have unified loop for both paging modes.

Instead of checking pml4 indexes for start of interesting kernel maps,
use kva_layout. Again, this makes the printing of heralds independent
of the paging mode.

Restart the loop iteration when changing address due to
canonicalization. This is needed to not miss printing the map herald
line.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D51453

Details

Provenance
kibAuthored on Jul 20 2025, 12:57 AM
Reviewer
markj
Differential Revision
D51453: amd64: fix sysctl vm.pmap.kernel_maps
Parents
rGf6ec18e200ab: amd64 vm.pmap.kernel_maps: provide canonical address switch for la57
Branches
Unknown
Tags
Unknown