]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Set PTE_A and PTE_D for user mappings in pmap_enter().
authorjhb <jhb@FreeBSD.org>
Thu, 1 Nov 2018 22:17:51 +0000 (22:17 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 1 Nov 2018 22:17:51 +0000 (22:17 +0000)
commit1d7c7b58cafd2f5c119af0457f6c9dfb9827f718
tree67e1dfa86b09265ab6e6faa6eee65abb2598aa60
parent3fd117de79a9497afd700b1d98912c6cf1538e0b
Set PTE_A and PTE_D for user mappings in pmap_enter().

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.

Reviewed by: markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D17782
sys/riscv/riscv/pmap.c