Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 pmap_enter(): look directly in the tree for...
details: https://anonhg.NetBSD.org/src/rev/d61de3f8e732
branches: trunk
changeset: 1008233:d61de3f8e732
user: ad <ad%NetBSD.org@localhost>
date: Sun Mar 15 15:14:22 2020 +0000
description:
pmap_enter(): look directly in the tree for old PVE when installing an
unmanaged mapping, because there is no existing pmap_page to check in
the shortcut path (it traps).
pv_pte_next(): don't assert pp_embedded because it could have been removed
(during pmap_pp_remove()).
diffstat:
sys/arch/x86/x86/pmap.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r 598635267304 -r d61de3f8e732 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Sun Mar 15 15:00:14 2020 +0000
+++ b/sys/arch/x86/x86/pmap.c Sun Mar 15 15:14:22 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.367 2020/03/14 20:48:40 ad Exp $ */
+/* $NetBSD: pmap.c,v 1.368 2020/03/15 15:14:22 ad Exp $ */
/*
* Copyright (c) 2008, 2010, 2016, 2017, 2019, 2020 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.367 2020/03/14 20:48:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.368 2020/03/15 15:14:22 ad Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -559,7 +559,6 @@
KASSERT(mutex_owned(&pp->pp_lock));
KASSERT(pvpte != NULL);
if (pvpte == &pp->pp_pte) {
- KASSERT(pp->pp_embedded);
return pve_to_pvpte(LIST_FIRST(&pp->pp_pvlist));
}
return pve_to_pvpte(LIST_NEXT(pvpte_to_pve(pvpte), pve_list));
@@ -4668,7 +4667,7 @@
panic("%s: alloc pve failed", __func__);
}
} else {
- old_pve = pmap_lookup_pv(pmap, ptp, NULL, va);
+ old_pve = pmap_treelookup_pv(pmap, ptp, tree, va);
}
/* Map PTEs into address space. */
@@ -4773,6 +4772,7 @@
pmap_remove_pv(pmap, old_pp, ptp, va, old_pve,
pmap_pte_to_pp_attrs(opte));
if (old_pve != NULL) {
+ KASSERT(old_pve->pve_pp == old_pp);
if (pmap->pm_pve == NULL) {
pmap->pm_pve = old_pve;
} else {
@@ -5584,7 +5584,7 @@
panic("%s: alloc pve failed", __func__);
}
} else {
- old_pve = pmap_lookup_pv(pmap, ptp, NULL, va);
+ old_pve = pmap_treelookup_pv(pmap, ptp, tree, va);
}
/* Map PTEs into address space. */
@@ -5654,6 +5654,7 @@
pmap_remove_pv(pmap, old_pp, ptp, va, old_pve,
pmap_ept_to_pp_attrs(opte));
if (old_pve != NULL) {
+ KASSERT(old_pve->pve_pp == old_pp);
if (pmap->pm_pve == NULL) {
pmap->pm_pve = old_pve;
} else {
Home |
Main Index |
Thread Index |
Old Index