aboutsummaryrefslogtreecommitdiff
path: root/emulators/virtualbox-ose-kmod
diff options
context:
space:
mode:
authorSean Bruno <sbruno@FreeBSD.org>2013-03-21 01:24:26 +0000
committerSean Bruno <sbruno@FreeBSD.org>2013-03-21 01:24:26 +0000
commitd600c214cc9b6ceecd24e2cb5522c04e71443246 (patch)
tree77a548a0a7127cf5be35a3ce646adf27c72f1e0a /emulators/virtualbox-ose-kmod
parentb2ac5f0650f6b73ec159e6510f0a70e22175b398 (diff)
downloadports-d600c214cc9b6ceecd24e2cb5522c04e71443246.tar.gz
ports-d600c214cc9b6ceecd24e2cb5522c04e71443246.zip
Notes
Diffstat (limited to 'emulators/virtualbox-ose-kmod')
-rw-r--r--emulators/virtualbox-ose-kmod/Makefile2
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c95
-rw-r--r--emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h12
3 files changed, 108 insertions, 1 deletions
diff --git a/emulators/virtualbox-ose-kmod/Makefile b/emulators/virtualbox-ose-kmod/Makefile
index 370d97446272..d9dbad2bfa58 100644
--- a/emulators/virtualbox-ose-kmod/Makefile
+++ b/emulators/virtualbox-ose-kmod/Makefile
@@ -3,7 +3,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 4.2.6
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= emulators kld
MASTER_SITES= http://download.virtualbox.org/virtualbox/${DISTVERSION}/ \
http://tmp.chruetertee.ch/ \
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c
new file mode 100644
index 000000000000..12da26c317a4
--- /dev/null
+++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-memobj-r0drv-freebsd_VM_OBJECT_RENAME.c
@@ -0,0 +1,95 @@
+$FreeBSD$
+
+--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 14:45:46.594643103 -0700
++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2013-03-20 14:33:00.483697105 -0700
+@@ -162,7 +162,7 @@
+ case RTR0MEMOBJTYPE_PHYS:
+ case RTR0MEMOBJTYPE_PHYS_NC:
+ {
+- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
+ 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 +177,7 @@
+ #if __FreeBSD_version < 900000
+ vm_page_unlock_queues();
+ #endif
+- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
+ vm_object_deallocate(pMemFreeBSD->pObject);
+ break;
+ }
+@@ -205,10 +205,10 @@
+
+ while (cTries <= 1)
+ {
+- VM_OBJECT_LOCK(pObject);
++ VM_OBJECT_RLOCK(pObject);
+ pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0,
+ VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
+- VM_OBJECT_UNLOCK(pObject);
++ VM_OBJECT_RUNLOCK(pObject);
+ if (pPages)
+ break;
+ vm_pageout_grow_cache(cTries, 0, VmPhysAddrHigh);
+@@ -228,7 +228,7 @@
+
+ if (!pPages)
+ return pPages;
+- VM_OBJECT_LOCK(pObject);
++ VM_OBJECT_RLOCK(pObject);
+ for (vm_pindex_t iPage = 0; iPage < cPages; iPage++)
+ {
+ vm_page_t pPage = pPages + iPage;
+@@ -240,7 +240,7 @@
+ atomic_add_int(&cnt.v_wire_count, 1);
+ }
+ }
+- VM_OBJECT_UNLOCK(pObject);
++ VM_OBJECT_RUNLOCK(pObject);
+ return pPages;
+ #endif
+ }
+@@ -264,7 +264,7 @@
+ if (!pPage)
+ {
+ /* Free all allocated pages */
+- VM_OBJECT_LOCK(pObject);
++ VM_OBJECT_RLOCK(pObject);
+ while (iPage-- > 0)
+ {
+ pPage = vm_page_lookup(pObject, iPage);
+@@ -278,7 +278,7 @@
+ vm_page_unlock_queues();
+ #endif
+ }
+- VM_OBJECT_UNLOCK(pObject);
++ VM_OBJECT_RUNLOCK(pObject);
+ return rcNoMem;
+ }
+ }
+@@ -411,9 +411,9 @@
+ if (fContiguous)
+ {
+ Assert(enmType == RTR0MEMOBJTYPE_PHYS);
+- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
+ pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0));
+- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
+ pMemFreeBSD->Core.u.Phys.fAllocated = true;
+ }
+
+@@ -823,9 +823,9 @@
+ case RTR0MEMOBJTYPE_PHYS_NC:
+ {
+ RTHCPHYS addr;
+- VM_OBJECT_LOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RLOCK(pMemFreeBSD->pObject);
+ addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage));
+- VM_OBJECT_UNLOCK(pMemFreeBSD->pObject);
++ VM_OBJECT_RUNLOCK(pMemFreeBSD->pObject);
+ return addr;
+ }
+
diff --git a/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h
new file mode 100644
index 000000000000..090be79634cc
--- /dev/null
+++ b/emulators/virtualbox-ose-kmod/files/patch-src-VBox-Runtime-r0drv-freebsd-the-freebsd-kernel.h
@@ -0,0 +1,12 @@
+$FreeBSD$
+
+--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2012-12-19 10:27:29.000000000 -0800
++++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h 2013-03-20 14:50:35.330638254 -0700
+@@ -50,6 +50,7 @@
+ #include <sys/unistd.h>
+ #include <sys/kthread.h>
+ #include <sys/lock.h>
++#include <sys/rwlock.h>
+ #include <sys/mutex.h>
+ #include <sys/sched.h>
+ #include <sys/callout.h>