Page MenuHomeFreeBSD

riscv: handle kernel PTE edge-case in pmap_enter_l2()
ClosedPublic

Authored by mhorne on Oct 5 2022, 4:24 PM.
Tags
None
Referenced Files
F81625244: D36885.id111467.diff
Fri, Apr 19, 4:27 AM
Unknown Object (File)
Feb 16 2024, 6:00 AM
Unknown Object (File)
Feb 16 2024, 6:00 AM
Unknown Object (File)
Feb 16 2024, 6:00 AM
Unknown Object (File)
Feb 16 2024, 5:47 AM
Unknown Object (File)
Dec 23 2023, 3:07 AM
Unknown Object (File)
Dec 14 2023, 11:46 AM
Unknown Object (File)
Dec 12 2023, 10:42 AM
Subscribers

Details

Summary

Page table pages are never freed from the kernel pmap, instead they are
zeroed when a range is unmapped. This allows future mappings to be
constructed more quickly. Detect this scenario in pmap_enter_l2(), so we
don't fail to create a superpage mapping when the 2MB range is actually
available.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47698
Build 44585: arc lint + arc unit

Event Timeline

mhorne requested review of this revision.Oct 5 2022, 4:24 PM
This revision is now accepted and ready to land.Oct 5 2022, 4:28 PM
sys/riscv/riscv/pmap.c
3206

On amd64 and arm64, we don't maintain an exact count of the valid mappings within a kernel page table page. If that is true on riscv, then this section of code should look more like the amd64 and arm64 versions.

mhorne added inline comments.
sys/riscv/riscv/pmap.c
3206

Yes, good catch. I will make the adjustment as part of D36563.

This revision was automatically updated to reflect the committed changes.
mhorne marked an inline comment as done.