From 205a8351f4c165f2b2718f477fd5ec474dec2160 Mon Sep 17 00:00:00 2001 From: grehan Date: Sun, 23 Nov 2014 23:07:21 +0000 Subject: Change the lower bound for guest vmspace allocation to 0 instead of using the VM_MIN_ADDRESS constant. HardenedBSD redefines VM_MIN_ADDRESS to be 64K, which results in bhyve VM startup failing. Guest memory is always assumed to start at 0 so use the absolute value instead. Reported by: Shawn Webb, lattera at gmail com Reviewed by: neel, grehan Obtained from: Oliver Pinter via HardenedBSD https://github.com/HardenedBSD/hardenedBSD/commit/23bd719ce1e3a8cc42fc8317b1c7c6d9e74dcba0 MFC after: 1 week --- sys/amd64/vmm/vmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/amd64/vmm') diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index aaa9d23..e7fbada 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -389,7 +389,7 @@ vm_create(const char *name, struct vm **retvm) if (name == NULL || strlen(name) >= VM_MAX_NAMELEN) return (EINVAL); - vmspace = VMSPACE_ALLOC(VM_MIN_ADDRESS, VM_MAXUSER_ADDRESS); + vmspace = VMSPACE_ALLOC(0, VM_MAXUSER_ADDRESS); if (vmspace == NULL) return (ENOMEM); -- cgit v1.1