HomeFreeBSD

Change pmap_demote_l2_locked() so that it removes the superpage mapping on a

Description

Change pmap_demote_l2_locked() so that it removes the superpage mapping on a
demotion failure. Otherwise, some callers to pmap_demote_l2_locked(), such
as pmap_protect(), may leave an incorrect mapping in place on a demotion
failure.

Change pmap_demote_l2_locked() so that it handles addresses that are not
superpage aligned. Some callers to pmap_demote_l2_locked(), such as
pmap_protect(), may not pass a superpage aligned address.

Change pmap_enter_l2() so that it correctly calls vm_page_free_pages_toq().
The arm64 pmap is updating the count of wired pages when freeing page table
pages, so pmap_enter_l2() should pass false to vm_page_free_pages_toq().

Optimize TLB invalidation in pmap_remove_l2().

Reviewed by: kib, markj (an earlier version)
Discussed with: andrew
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D20585

Details

Committed
alcJun 12 2019, 8:38 PM
Reviewer
kib
Differential Revision
D20585: Various arm64 pmap fixes (and one optimization)
Parents
rS349002: fileargs: add wrapping/unwrapping functions
Branches
Unknown
Tags
Unknown