svn commit: r305191 - head/sys/arm64/arm64
Andrew Turner
andrew at FreeBSD.org
Thu Sep 1 10:26:07 UTC 2016
Author: andrew
Date: Thu Sep 1 10:26:06 2016
New Revision: 305191
URL: https://svnweb.freebsd.org/changeset/base/305191
Log:
Fix arm64 superpages bugs in pmap_enter:
* Pass the correct virtual address when demoting a superpage
* Use the correct l3 table after demoting a superpage
* Remove an invalid KASSERT hit demoting then promoting a superpage [1]
With this it is believed that superpages on arm64 is stable.
Reported by: [1] cognet
Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/arm64/arm64/pmap.c
Modified: head/sys/arm64/arm64/pmap.c
==============================================================================
--- head/sys/arm64/arm64/pmap.c Thu Sep 1 08:34:31 2016 (r305190)
+++ head/sys/arm64/arm64/pmap.c Thu Sep 1 10:26:06 2016 (r305191)
@@ -2732,7 +2732,9 @@ pmap_enter(pmap_t pmap, vm_offset_t va,
if (pde != NULL && lvl == 1) {
l2 = pmap_l1_to_l2(pde, va);
if ((pmap_load(l2) & ATTR_DESCR_MASK) == L2_BLOCK &&
- (l3 = pmap_demote_l2_locked(pmap, l2, va, &lock)) != NULL) {
+ (l3 = pmap_demote_l2_locked(pmap, l2, va & ~L2_OFFSET,
+ &lock)) != NULL) {
+ l3 = &l3[pmap_l3_index(va)];
if (va < VM_MAXUSER_ADDRESS) {
mpte = PHYS_TO_VM_PAGE(
pmap_load(l2) & ~ATTR_MASK);
@@ -2944,7 +2946,6 @@ validate:
pmap_superpages_enabled() &&
(m->flags & PG_FICTITIOUS) == 0 &&
vm_reserv_level_iffullpop(m) == 0) {
- KASSERT(lvl == 2, ("Invalid pde level %d", lvl));
pmap_promote_l2(pmap, pde, va, &lock);
}
}
More information about the svn-src-all
mailing list