From owner-svn-ports-all@FreeBSD.ORG Sat Sep 21 18:41:56 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2F753C33; Sat, 21 Sep 2013 18:41:56 +0000 (UTC) (envelope-from decke@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1AC63223C; Sat, 21 Sep 2013 18:41:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r8LIftoo093591; Sat, 21 Sep 2013 18:41:55 GMT (envelope-from decke@svn.freebsd.org) Received: (from decke@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r8LIfs3b093580; Sat, 21 Sep 2013 18:41:54 GMT (envelope-from decke@svn.freebsd.org) Message-Id: <201309211841.r8LIfs3b093580@svn.freebsd.org> From: Bernhard Froehlich Date: Sat, 21 Sep 2013 18:41:54 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r327838 - in head/emulators: virtualbox-ose-additions/files virtualbox-ose-kmod/files virtualbox-ose/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Sep 2013 18:41:56 -0000 Author: decke Date: Sat Sep 21 18:41:53 2013 New Revision: 327838 URL: http://svnweb.freebsd.org/changeset/ports/327838 Log: - Fix calls of vm_map_find() after r255426 broke it and added a mmap flag. PR: ports/181971, ports/182121 Submitted by: Lawrence Stewart , Dan McGregor Added: head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c (contents, props changed) head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c (contents, props changed) head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c (contents, props changed) head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c (contents, props changed) head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c (contents, props changed) Added: head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,16 @@ +--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-06 06:30:30.000000000 -0600 ++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-18 12:01:45.000000000 -0600 +@@ -79,8 +79,13 @@ + return VERR_NO_EXEC_MEMORY; + + /* Addr contains a start address vm_map_find will start searching for suitable space at. */ ++#if __FreeBSD_version >= 1000055 ++ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, ++ cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#else + int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, + cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#endif + if (rc == KERN_SUCCESS) + { + rc = vm_map_wire(kernel_map, Addr, Addr + cbAllocated, Added: head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose-additions/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,48 @@ +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2013-09-06 12:30:30.000000000 +0000 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-09-21 18:12:53.000000000 +0000 +@@ -286,9 +286,15 @@ + pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); + + /* No additional object reference for auto-deallocation upon unmapping. */ ++#if __FreeBSD_version >= 1000055 ++ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, ++ &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE, ++ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#else + rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, + &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE, + fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#endif + + if (rc == KERN_SUCCESS) + { +@@ -551,6 +557,9 @@ + 0, /* offset */ + &MapAddress, /* addr (IN/OUT) */ + cb, /* length */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* max addr */ ++#endif + pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* find_space */ + VM_PROT_NONE, /* protection */ +@@ -628,6 +637,9 @@ + offSub, /* Start offset in the object */ + &Addr, /* Start address IN/OUT */ + cbSub, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of mapping */ ++#endif + VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */ + VM_PROT_ALL, /* Maximum protection flags */ +@@ -704,6 +716,9 @@ + 0, /* Start offset in the object */ + &AddrR3, /* Start address IN/OUT */ + pMemToMap->cb, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of the mapping */ ++#endif + R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */ Added: head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,16 @@ +--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-06 06:30:30.000000000 -0600 ++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-18 12:01:45.000000000 -0600 +@@ -79,8 +79,13 @@ + return VERR_NO_EXEC_MEMORY; + + /* Addr contains a start address vm_map_find will start searching for suitable space at. */ ++#if __FreeBSD_version >= 1000055 ++ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, ++ cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#else + int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, + cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#endif + if (rc == KERN_SUCCESS) + { + rc = vm_map_wire(kernel_map, Addr, Addr + cbAllocated, Added: head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,48 @@ +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2013-09-06 12:30:30.000000000 +0000 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-09-21 18:12:53.000000000 +0000 +@@ -286,9 +286,15 @@ + pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); + + /* No additional object reference for auto-deallocation upon unmapping. */ ++#if __FreeBSD_version >= 1000055 ++ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, ++ &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE, ++ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#else + rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, + &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE, + fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#endif + + if (rc == KERN_SUCCESS) + { +@@ -551,6 +557,9 @@ + 0, /* offset */ + &MapAddress, /* addr (IN/OUT) */ + cb, /* length */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* max addr */ ++#endif + pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* find_space */ + VM_PROT_NONE, /* protection */ +@@ -628,6 +637,9 @@ + offSub, /* Start offset in the object */ + &Addr, /* Start address IN/OUT */ + cbSub, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of mapping */ ++#endif + VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */ + VM_PROT_ALL, /* Maximum protection flags */ +@@ -704,6 +716,9 @@ + 0, /* Start offset in the object */ + &AddrR3, /* Start address IN/OUT */ + pMemToMap->cb, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of the mapping */ ++#endif + R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */ Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-alloc-r0drv-freebsd.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,16 @@ +--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-06 06:30:30.000000000 -0600 ++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2013-09-18 12:01:45.000000000 -0600 +@@ -79,8 +79,13 @@ + return VERR_NO_EXEC_MEMORY; + + /* Addr contains a start address vm_map_find will start searching for suitable space at. */ ++#if __FreeBSD_version >= 1000055 ++ int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, ++ cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#else + int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, + cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); ++#endif + if (rc == KERN_SUCCESS) + { + rc = vm_map_wire(kernel_map, Addr, Addr + cbAllocated, Added: head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/virtualbox-ose/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_MAP_FIND.c Sat Sep 21 18:41:53 2013 (r327838) @@ -0,0 +1,48 @@ +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2013-09-06 12:30:30.000000000 +0000 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-09-21 18:12:53.000000000 +0000 +@@ -286,9 +286,15 @@ + pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); + + /* No additional object reference for auto-deallocation upon unmapping. */ ++#if __FreeBSD_version >= 1000055 ++ rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, ++ &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE, ++ fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#else + rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, + &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE, + fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); ++#endif + + if (rc == KERN_SUCCESS) + { +@@ -551,6 +557,9 @@ + 0, /* offset */ + &MapAddress, /* addr (IN/OUT) */ + cb, /* length */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* max addr */ ++#endif + pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* find_space */ + VM_PROT_NONE, /* protection */ +@@ -628,6 +637,9 @@ + offSub, /* Start offset in the object */ + &Addr, /* Start address IN/OUT */ + cbSub, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of mapping */ ++#endif + VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */ + VM_PROT_ALL, /* Maximum protection flags */ +@@ -704,6 +716,9 @@ + 0, /* Start offset in the object */ + &AddrR3, /* Start address IN/OUT */ + pMemToMap->cb, /* Size of the mapping */ ++#if __FreeBSD_version >= 1000055 ++ 0, /* Upper bound of the mapping */ ++#endif + R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, + /* Whether a suitable address should be searched for first */ + ProtectionFlags, /* protection flags */