diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-11-10 08:21:29 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-11-10 08:21:29 +0000 |
commit | 0863918b990802d849eb2d81fe9514065d591473 (patch) | |
tree | ff0147a4e179b6e4d6b849b7522913dd9106810d /sys/uvm | |
parent | 69f81d71876147808bc64f8ac209517fa3a2f57b (diff) |
UVM change needed for vmm.
discussed with miod, deraadt, and guenther.
Diffstat (limited to 'sys/uvm')
-rw-r--r-- | sys/uvm/uvm_fault.c | 12 | ||||
-rw-r--r-- | sys/uvm/uvm_pmap.h | 8 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/uvm/uvm_fault.c b/sys/uvm/uvm_fault.c index 8104ee7c82c..eadd1c9690b 100644 --- a/sys/uvm/uvm_fault.c +++ b/sys/uvm/uvm_fault.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_fault.c,v 1.86 2015/09/09 14:52:12 miod Exp $ */ +/* $OpenBSD: uvm_fault.c,v 1.87 2015/11/10 08:21:28 mlarkin Exp $ */ /* $NetBSD: uvm_fault.c,v 1.51 2000/08/06 00:22:53 thorpej Exp $ */ /* @@ -446,6 +446,16 @@ uvmfault_update_stats(struct uvm_faultinfo *ufi) map = ufi->orig_map; + /* + * If this is a nested pmap (eg, a virtual machine pmap managed + * by vmm(4) on amd64/i386), don't do any updating, just return. + * + * pmap_nested() on other archs is #defined to 0, so this is a + * no-op. + */ + if (pmap_nested(map->pmap)) + return; + /* Update the maxrss for the process. */ if (map->flags & VM_MAP_ISVMSPACE) { p = curproc; diff --git a/sys/uvm/uvm_pmap.h b/sys/uvm/uvm_pmap.h index e2fd987298d..81ae92e2c12 100644 --- a/sys/uvm/uvm_pmap.h +++ b/sys/uvm/uvm_pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pmap.h,v 1.24 2015/02/15 21:34:33 miod Exp $ */ +/* $OpenBSD: uvm_pmap.h,v 1.25 2015/11/10 08:21:28 mlarkin Exp $ */ /* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */ /* @@ -176,6 +176,12 @@ vaddr_t pmap_steal_memory(vsize_t, vaddr_t *, vaddr_t *); #if defined(PMAP_FORK) void pmap_fork(pmap_t, pmap_t); #endif + +/* nested pmaps are used in i386/amd64 vmm */ +#ifndef pmap_nested +#define pmap_nested(pm) 0 +#endif + __END_DECLS #endif /* kernel*/ #endif /* PMAP_EXCLUDE_DECLS */ |