Page MenuHomeFreeBSD

D61549.1794795882.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61549.1794795882.diff

Index: sys/arm64/arm64/pmap.c
===================================================================
--- sys/arm64/arm64/pmap.c
+++ sys/arm64/arm64/pmap.c
@@ -5645,8 +5645,26 @@
pmap_store(tl3p, newpte);
newpte += L3_SIZE;
}
+ /*
+ * Revert to the last L3 entry within the L3C superpage to
+ * detect wiring-only changes.
+ */
+ newpte -= L3_SIZE;
}
- dsb(ishst);
+
+ /*
+ * A page fault does not automatically invalidate the TLB entry for a
+ * valid mapping, so we must perform an invalidation on any change to
+ * a valid mapping, including changes that add permissions. The only
+ * exception is a wiring-only change. One TLB invalidation suffices
+ * for L1 or L2 block mappings.
+ */
+ if ((origpte & ATTR_DESCR_VALID) != 0 &&
+ ((origpte ^ newpte) & ~ATTR_SW_WIRED) != 0)
+ pmap_invalidate_range(pmap, va, va + (psind == 1 ?
+ L3C_SIZE : PAGE_SIZE), true);
+ else
+ dsb(ishst);
if ((origpte & ATTR_DESCR_VALID) == 0)
pmap_resident_count_inc(pmap, pagesizes[psind] / PAGE_SIZE);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 16, 2:24 AM (18 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41755632
Default Alt Text
D61549.1794795882.diff (1 KB)

Event Timeline