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, Nov 3, 1:04 AM
Unknown Object (File)
Sat, Nov 1, 8:16 PM
Unknown Object (File)
Sun, Oct 26, 2:26 PM
Unknown Object (File)
Sun, Oct 26, 2:24 PM
Unknown Object (File)
Sun, Oct 26, 12:53 AM
Unknown Object (File)
Sat, Oct 25, 11:42 PM
Unknown Object (File)
Sat, Oct 18, 2:32 AM
Unknown Object (File)
Fri, Oct 17, 4:17 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.