- Update to 4.2.12

- Add missing patch to additions to fix building after r248084
which renamed VM_OBJECT_LOCK() to VM_OBJECT_WLOCK(). The patch
was already included in the kmod port but additions also need
it.
This commit is contained in:
Bernhard Froehlich 2013-05-02 20:54:04 +00:00
parent a25a60bedd
commit f211bc094c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=317147
8 changed files with 156 additions and 15 deletions

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.6
DISTVERSION= 4.2.12
CATEGORIES= emulators kld
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \

View File

@ -1,2 +1,2 @@
SHA256 (VirtualBox-4.2.6.tar.bz2) = 54526091bc2aa66b88ca878dd9ecc4466f96d607db2f6678a9d673ecf6646ae3
SIZE (VirtualBox-4.2.6.tar.bz2) = 76291326
SHA256 (VirtualBox-4.2.12.tar.bz2) = eb65ecac94f63d6292a967d39cb5e28326404c10d0e8c2c50399eedb59c17ee6
SIZE (VirtualBox-4.2.12.tar.bz2) = 76876011

View File

@ -0,0 +1,132 @@
$FreeBSD$
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 19:19:36.795745576 -0700
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 19:15:35.164791970 -0700
@@ -162,7 +162,11 @@
case RTR0MEMOBJTYPE_PHYS:
case RTR0MEMOBJTYPE_PHYS_NC:
{
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_LOCK(pMemFreeBSD->pObject);
+#endif
vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0);
#if __FreeBSD_version < 900000
/* See http://lists.freebsd.org/pipermail/freebsd-current/2012-November/037963.html */
@@ -177,7 +181,12 @@
#if __FreeBSD_version < 900000
vm_page_unlock_queues();
#endif
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
+#endif
+
vm_object_deallocate(pMemFreeBSD->pObject);
break;
}
@@ -205,10 +214,18 @@
while (cTries <= 1)
{
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pObject);
+#else
VM_OBJECT_LOCK(pObject);
+#endif
pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0,
VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pObject);
+#else
VM_OBJECT_UNLOCK(pObject);
+#endif
if (pPages)
break;
vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
@@ -228,7 +245,11 @@
if (!pPages)
return pPages;
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pObject);
+#else
VM_OBJECT_LOCK(pObject);
+#endif
for (vm_pindex_t iPage = 0; iPage < cPages; iPage++)
{
vm_page_t pPage = pPages + iPage;
@@ -240,7 +261,11 @@
atomic_add_int(&cnt.v_wire_count, 1);
}
}
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pObject);
+#else
VM_OBJECT_UNLOCK(pObject);
+#endif
return pPages;
#endif
}
@@ -264,7 +289,11 @@
if (!pPage)
{
/* Free all allocated pages */
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pObject);
+#else
VM_OBJECT_LOCK(pObject);
+#endif
while (iPage-- > 0)
{
pPage = vm_page_lookup(pObject, iPage);
@@ -278,7 +307,11 @@
vm_page_unlock_queues();
#endif
}
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pObject);
+#else
VM_OBJECT_UNLOCK(pObject);
+#endif
return rcNoMem;
}
}
@@ -411,9 +444,17 @@
if (fContiguous)
{
Assert(enmType == RTR0MEMOBJTYPE_PHYS);
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_LOCK(pMemFreeBSD->pObject);
+#endif
pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
+#endif
pMemFreeBSD->Core.u.Phys.fAllocated = true;
}
@@ -823,9 +864,17 @@
case RTR0MEMOBJTYPE_PHYS_NC:
{
RTHCPHYS addr;
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_LOCK(pMemFreeBSD->pObject);
+#endif
addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage));
+#if __FreeBSD_version >= 1000030
+ VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject);
+#else
VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
+#endif
return addr;
}

View File

@ -1,6 +1,16 @@
--- ./src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig 2012-06-12 02:54:01.440878507 +0400
+++ ./src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2012-06-12 00:08:55.218232972 +0400
@@ -64,6 +64,7 @@
--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig 2013-03-05 14:28:07.000000000 +0000
+++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2013-03-28 13:10:34.000000000 +0000
@@ -50,6 +50,9 @@
#include <sys/unistd.h>
#include <sys/kthread.h>
#include <sys/lock.h>
+#if __FreeBSD_version >= 1000030
+#include <sys/rwlock.h>
+#endif
#include <sys/mutex.h>
#include <sys/sched.h>
#include <sys/callout.h>
@@ -64,6 +67,7 @@
#include <vm/vm_kern.h>
#include <vm/vm_param.h> /* KERN_SUCCESS ++ */
#include <vm/vm_page.h>

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.6
PORTREVISION= 4
DISTVERSION= 4.2.12
CATEGORIES= emulators kld
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \

View File

@ -1,2 +1,2 @@
SHA256 (VirtualBox-4.2.6.tar.bz2) = 54526091bc2aa66b88ca878dd9ecc4466f96d607db2f6678a9d673ecf6646ae3
SIZE (VirtualBox-4.2.6.tar.bz2) = 76291326
SHA256 (VirtualBox-4.2.12.tar.bz2) = eb65ecac94f63d6292a967d39cb5e28326404c10d0e8c2c50399eedb59c17ee6
SIZE (VirtualBox-4.2.12.tar.bz2) = 76876011

View File

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.6
DISTVERSION= 4.2.12
CATEGORIES= emulators
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \

View File

@ -1,4 +1,4 @@
SHA256 (VirtualBox-4.2.6.tar.bz2) = 54526091bc2aa66b88ca878dd9ecc4466f96d607db2f6678a9d673ecf6646ae3
SIZE (VirtualBox-4.2.6.tar.bz2) = 76291326
SHA256 (VBoxGuestAdditions_4.2.6.iso) = b9afd356d85fe6822fd28009fd63faddd2ac7cbd75c415ea4ce6a22925243ed3
SIZE (VBoxGuestAdditions_4.2.6.iso) = 57401344
SHA256 (VirtualBox-4.2.12.tar.bz2) = eb65ecac94f63d6292a967d39cb5e28326404c10d0e8c2c50399eedb59c17ee6
SIZE (VirtualBox-4.2.12.tar.bz2) = 76876011
SHA256 (VBoxGuestAdditions_4.2.12.iso) = aed4730b643aca8daa0829e1122b7c8d592b9f6cea902a98e390c4d22373dfb8
SIZE (VBoxGuestAdditions_4.2.12.iso) = 59488256