From d299a74a08239ef895b9f7e6d4b3f588af486bff Mon Sep 17 00:00:00 2001 From: Stefan Kempf Date: Thu, 3 Mar 2016 18:45:43 +0000 Subject: 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@ --- sys/arch/amd64/amd64/vmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch') 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 * @@ -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 */ -- cgit v1.2.3