diff options
author | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-03 18:45:43 +0000 |
---|---|---|
committer | Stefan Kempf <stefan@cvs.openbsd.org> | 2016-03-03 18:45:43 +0000 |
commit | d299a74a08239ef895b9f7e6d4b3f588af486bff (patch) | |
tree | 1da90429d9f7be7b9bf6e18b4d88d595d15353f4 /sys/arch | |
parent | d6285a1042fca7d22392334f29550e2d4ef74080 (diff) |
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@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 4 |
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 */ |