summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstefan <stefan@openbsd.org>2016-03-03 18:45:42 +0000
committerstefan <stefan@openbsd.org>2016-03-03 18:45:42 +0000
commitb35ea90083923586a24b917d25e7765fd898b8d6 (patch)
treeda4fe06e9e7fbc2bdf89bfb98ab6e86042129761
parentping(8) and ping6(8) use different types for packet counters. In (diff)
downloadwireguard-openbsd-b35ea90083923586a24b917d25e7765fd898b8d6.tar.xz
wireguard-openbsd-b35ea90083923586a24b917d25e7765fd898b8d6.zip
VM guest memory is allocated via an uvm anon memory range.
Allocate management data structures (amap) lazily by specifying the UVM_FLAG_COPYONW flag instead of UVM_FLAG_OVERLAY when creating the anon. ok mlarkin@
-rw-r--r--sys/arch/amd64/amd64/vmm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c
index 809b5f0b578..ad762a05d8a 100644
--- a/sys/arch/amd64/amd64/vmm.c
+++ b/sys/arch/amd64/amd64/vmm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmm.c,v 1.39 2016/03/03 18:23:06 stefan Exp $ */
+/* $OpenBSD: vmm.c,v 1.40 2016/03/03 18:45:42 stefan Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -1015,7 +1015,7 @@ vm_impl_init_vmx(struct vm *vm)
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_INHERIT_NONE,
MADV_NORMAL,
- UVM_FLAG_FIXED | UVM_FLAG_OVERLAY));
+ UVM_FLAG_FIXED | UVM_FLAG_COPYONW));
if (ret) {
printf("vm_impl_init_vmx: uvm_mapanon failed (%d)\n", ret);
/* uvm_map_deallocate calls pmap_destroy for us */