From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

aarch64: fix page fault handler to set PTE dirty bit if access fault on write

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/arch/aarch64/mmu.cc b/arch/aarch64/mmu.cc
--- a/arch/aarch64/mmu.cc
+++ b/arch/aarch64/mmu.cc
@@ -59,7 +59,7 @@ static void handle_access_flag_fault(exception_frame *ef, u64 
addr) {
     auto leaf_pte = l0_ptep.read();
 
     leaf_pte.set_accessed(true);
-    if (ACCESS_FLAG_FAULT_LEVEL_3(ef->esr)) {
+    if (ACCESS_FLAG_FAULT_LEVEL_3_WHEN_WRITE(ef->esr)) {
         leaf_pte.set_dirty(true);
     }
 

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/000000000000888b0a05de9dab4c%40google.com.

Reply via email to