Page MenuHomeFreeBSD

Set PTE_A and PTE_D for user mappings in pmap_enter().
ClosedPublic

Authored by jhb on Oct 31 2018, 6:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 6, 3:43 PM
Unknown Object (File)
Mon, Apr 6, 1:16 PM
Unknown Object (File)
Mon, Apr 6, 10:12 AM
Unknown Object (File)
Sun, Apr 5, 9:34 AM
Unknown Object (File)
Sat, Apr 4, 6:07 AM
Unknown Object (File)
Dec 29 2025, 10:49 PM
Unknown Object (File)
Dec 11 2025, 12:09 AM
Unknown Object (File)
Dec 9 2025, 9:08 PM
Subscribers

Details

Summary

This assumes that an access according to the prot in 'flags' triggered
a fault and is going to be retried after the fault returns, so the two
flags are set preemptively to avoid refaulting on the retry.

While here, only bother setting PTE_D for kernel mappings in pmap_enter
for writable mappings.

Test Plan
  • booted qemu and ran various programs

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/riscv/riscv/pmap.c
2093 ↗(On Diff #49840)

Should be new_l3, as you corrected in D17783.

This revision is now accepted and ready to land.Nov 1 2018, 2:39 PM
jhb marked an inline comment as done.Nov 1 2018, 10:17 PM
This revision was automatically updated to reflect the committed changes.