HomeFreeBSD

amd64 pmap: do not panic on inability to insert ptp into trie

Description

amd64 pmap: do not panic on inability to insert ptp into trie

When pmap_enter_pde() needs to destroy existing kernel superpage
mapping, do not remove saved pt page from the pm_root trie. Then the
pt page does not need to be re-inserted into the trie.

If the kernel region is not mapped with the superpage, try to insert the
pt page into pm_root trie before clearing ptes. If failed, we can
return failure without a need to rewind.

Suggested by: alc
Reviewed by: alc, markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D50970

Details

Provenance
kibAuthored on Jun 24 2025, 10:58 PM
Reviewer
alc
Differential Revision
D50970: amd64 pmap: eliminate two explicit panics on low mem conditions
Parents
rGee502c853183: amd64 pmap: update comment in pmap_demote_DMAP() explaining the len<NBPDP check
Branches
Unknown
Tags
Unknown