HomeFreeBSD

riscv: Remove unnecessary invalidations in pmap_enter_quick_locked()

Description

riscv: Remove unnecessary invalidations in pmap_enter_quick_locked()

This function always overwrites an invalid PTE, so if
pmap_try_insert_pv_entry() fails it is certainly not necessary to
invalidate anything, because the PTE has not yet been written by that
point.

It should also not be necessary to invalidate TLBs after overwriting an
invalid entry. In principle the TLB could cache negative entries, but
then the worst case scenario is a spurious fault. Since pmap_enter()
does not bother issuing an sfence.vma, pmap_enter_quick_locked() should
behave similarly.

Reviewed by: kib
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D42291

(cherry picked from commit 71b77a7172c26783a9d2181d3bed27cf62974200)

Details

Provenance
markjAuthored on Nov 2 2023, 6:34 PM
Reviewer
kib
Differential Revision
D42291: riscv: Remove unnecessary invalidations in pmap_enter_quick_locked()
Parents
rG0a13f4d7934f: riscv: Port improvements from arm64/amd64 pmaps, part 3
Branches
Unknown
Tags
Unknown