]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Implement software access and dirty bit management for arm64.
authormarkj <markj@FreeBSD.org>
Mon, 15 Jul 2019 17:13:32 +0000 (17:13 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 15 Jul 2019 17:13:32 +0000 (17:13 +0000)
commitcdc0469c0e7a5058598baaa649f0367fe28e3fee
treea759e5539a932eec58f1d89506525389ae9aafe1
parentc99cb2e79ed6c7f0e12b63cb3121c2a5c4c1a5ba
Implement software access and dirty bit management for arm64.

Previously the arm64 pmap did no reference or modification tracking;
all mappings were treated as referenced and all read-write mappings
were treated as dirty.  This change implements software management
of these attributes.

Dirty bit management is implemented to emulate ARMv8.1's optional
hardware dirty bit modifier management, following a suggestion from alc.
In particular, a mapping with ATTR_SW_DBM set is logically writeable and
is dirty if the ATTR_AP_RW_BIT bit is clear.  Mappings with
ATTR_AP_RW_BIT set are write-protected, and a write access will trigger
a permission fault.  pmap_fault() handles permission faults for such
mappings and marks the page dirty by clearing ATTR_AP_RW_BIT, thus
mapping the page read-write.

Reviewed by: alc
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20907
sys/arm64/arm64/pmap.c
sys/arm64/arm64/trap.c
sys/arm64/include/pte.h