1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00

- Fix panic: mutex vm page queue free mutex not owned on 10-CURRENT

- Fix compile error: 'D_PSEUDO' undeclared here on 10-CURRENT
- Bump PORTREVISION

PR:		ports/162186
Submitted by:	Jung-uk Kim <jkim@FreeBSD.org>
Feature safe:	yes
This commit is contained in:
Bernhard Froehlich 2011-12-02 13:38:42 +00:00
parent b5df71551e
commit d6d01011a0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286763
3 changed files with 56 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 4.0.12
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= emulators kld
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \

View File

@ -0,0 +1,13 @@
--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2011-11-04 07:19:39.000000000 -0400
+++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c 2011-11-29 17:34:56.000000000 -0500
@@ -100,7 +100,9 @@
static struct cdevsw g_VBoxDrvFreeBSDChrDevSW =
{
.d_version = D_VERSION,
-#if __FreeBSD_version > 800061
+#if __FreeBSD_version >= 1000000
+ .d_flags = D_TRACKCLOSE | D_NEEDMINOR,
+#elif __FreeBSD_version > 800061
.d_flags = D_PSEUDO | D_TRACKCLOSE | D_NEEDMINOR,
#else
.d_flags = D_PSEUDO | D_TRACKCLOSE,

View File

@ -5,9 +5,13 @@ to VPO_UNMANAGED for an additional assert.
Reviewed by: kib
See: http://svnweb.freebsd.org/base?view=revision&revision=224746
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-04-05 14:34:09.000000000 +0200
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-08-11 15:06:46.000000000 +0200
@@ -394,9 +394,13 @@
--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2011-11-04 07:19:54.000000000 -0400
+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2011-11-29 18:13:32.000000000 -0500
@@ -391,12 +391,18 @@
static void rtR0MemObjFreeBSDPhysPageInit(vm_page_t pPage, vm_pindex_t iPage)
{
+#if __FreeBSD_version <= 1000000
pPage->wire_count = 1;
pPage->pindex = iPage;
pPage->act_count = 0;
@ -19,7 +23,42 @@ See: http://svnweb.freebsd.org/base?view=revision&revision=224746
+ Assert(pPage->oflags & VPO_UNMANAGED != 0);
+#else
+ Assert(pPage->flags & PG_UNMANAGED != 0);
+#endif
+#endif
}
@@ -408,6 +414,9 @@
int rc = VINF_SUCCESS;
uint32_t cPages = cb >> PAGE_SHIFT;
vm_paddr_t VmPhysAddrHigh;
+#if __FreeBSD_version >= 1000001
+ int pFlags = VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED;
+#endif
/* create the object. */
PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(RT_OFFSETOF(RTR0MEMOBJFREEBSD, u.Phys.apPages[cPages]),
@@ -424,7 +433,11 @@
if (fContiguous)
{
+#if __FreeBSD_version >= 1000001
+ vm_page_t pPage = vm_page_alloc_contig(NULL, 0, pFlags, cPages, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
+#else
vm_page_t pPage = vm_phys_alloc_contig(cPages, 0, VmPhysAddrHigh, uAlignment, 0);
+#endif
if (pPage)
for (uint32_t iPage = 0; iPage < cPages; iPage++)
@@ -440,7 +453,11 @@
/* Allocate page by page */
for (uint32_t iPage = 0; iPage < cPages; iPage++)
{
+#if __FreeBSD_version >= 1000001
+ vm_page_t pPage = vm_page_alloc_contig(NULL, iPage, pFlags, 1, 0, VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT);
+#else
vm_page_t pPage = vm_phys_alloc_contig(1, 0, VmPhysAddrHigh, uAlignment, 0);
+#endif
if (!pPage)
{