View | Details | Raw Unified | Return to bug 249326 | Differences between
and this patch

Collapse All | Expand All

(-)emulators/virtualbox-ose/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	virtualbox-ose
4
PORTNAME=	virtualbox-ose
5
PORTVERSION=	5.2.44
5
PORTVERSION=	5.2.44
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	https://download.oracle.com/virtualbox/${PORTVERSION}/
8
MASTER_SITES=	https://download.oracle.com/virtualbox/${PORTVERSION}/
9
DISTFILES=	VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
9
DISTFILES=	VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS}
(-)emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c (-2 / +17 lines)
Lines 114-119 Link Here
114
                 vm_page_unlock_queues();
114
                 vm_page_unlock_queues();
115
 #endif
115
 #endif
116
             }
116
             }
117
@@ -323,7 +323,8 @@
118
     size_t      cPages = atop(pMemFreeBSD->Core.cb);
119
     int         rc;
120
 
121
-    pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages);
122
+    pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL,
123
+      pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred);
124
 
125
     /* No additional object reference for auto-deallocation upon unmapping. */
126
 #if __FreeBSD_version >= 1000055
117
@@ -364,58 +364,77 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE
127
@@ -364,58 +364,77 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE
118
 }
128
 }
119
 DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
129
 DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable)
Lines 200-206 Link Here
200
     uint32_t   cPages = atop(cb);
210
     uint32_t   cPages = atop(cb);
201
     vm_paddr_t VmPhysAddrHigh;
211
     vm_paddr_t VmPhysAddrHigh;
202
 
212
 
203
@@ -432,7 +452,10 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
213
@@ -432,10 +452,14 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
204
     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
214
     PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD),
205
                                                                        enmType, NULL, cb);
215
                                                                        enmType, NULL, cb);
206
     if (!pMemFreeBSD)
216
     if (!pMemFreeBSD)
Lines 209-216 Link Here
209
         return VERR_NO_MEMORY;
219
         return VERR_NO_MEMORY;
210
+    }
220
+    }
211
 
221
 
212
     pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, atop(cb));
222
-    pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, atop(cb));
223
+    pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, cb, VM_PROT_ALL,
224
+       0, curthread->td_ucred);
213
 
225
 
226
     if (PhysHighest != NIL_RTHCPHYS)
227
         VmPhysAddrHigh = PhysHighest;
228
 
214
@@ -470,6 +493,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
229
@@ -470,6 +493,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB
215
         rtR0MemObjDelete(&pMemFreeBSD->Core);
230
         rtR0MemObjDelete(&pMemFreeBSD->Core);
216
     }
231
     }
(-)emulators/virtualbox-ose/files/patch-src_VBox_Runtime_r0drv_freebsd_the-freebsd-kernel.h (-3 / +7 lines)
Lines 1-4 Link Here
1
--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig	2018-10-15 14:31:31 UTC
1
--- src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h.orig	2020-07-09 16:57:38 UTC
2
+++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h
2
+++ src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h
3
@@ -60,6 +60,7 @@
3
@@ -60,6 +60,7 @@
4
 #include <sys/smp.h>
4
 #include <sys/smp.h>
Lines 8-14 Link Here
8
 #include <vm/vm.h>
8
 #include <vm/vm.h>
9
 #include <vm/pmap.h>            /* for vtophys */
9
 #include <vm/pmap.h>            /* for vtophys */
10
 #include <vm/vm_map.h>
10
 #include <vm/vm_map.h>
11
@@ -70,7 +71,6 @@
11
@@ -67,10 +68,10 @@
12
 #include <vm/vm_kern.h>
13
 #include <vm/vm_param.h>        /* KERN_SUCCESS ++ */
14
 #include <vm/vm_page.h>
15
+#include <vm/vm_pager.h>
12
 #include <vm/vm_phys.h>         /* vm_phys_alloc_* */
16
 #include <vm/vm_phys.h>         /* vm_phys_alloc_* */
13
 #include <vm/vm_extern.h>       /* kmem_alloc_attr */
17
 #include <vm/vm_extern.h>       /* kmem_alloc_attr */
14
 #include <vm/vm_pageout.h>      /* vm_contig_grow_cache */
18
 #include <vm/vm_pageout.h>      /* vm_contig_grow_cache */
Lines 16-22 Link Here
16
 #include <sys/resourcevar.h>
20
 #include <sys/resourcevar.h>
17
 #include <machine/cpu.h>
21
 #include <machine/cpu.h>
18
 
22
 
19
@@ -114,6 +114,24 @@
23
@@ -114,6 +115,24 @@
20
  */
24
  */
21
 #if 0 /** @todo Not available yet. */
25
 #if 0 /** @todo Not available yet. */
22
 # define USE_KMEM_ALLOC_PROT
26
 # define USE_KMEM_ALLOC_PROT
(-)emulators/virtualbox-ose-kmod/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	virtualbox-ose
4
PORTNAME=	virtualbox-ose
5
PORTVERSION=	5.2.44
5
PORTVERSION=	5.2.44
6
PORTREVISION=	1
6
PORTREVISION=	3
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	https://download.oracle.com/virtualbox/${PORTVERSION}/
8
MASTER_SITES=	https://download.oracle.com/virtualbox/${PORTVERSION}/
9
PKGNAMESUFFIX=	-kmod
9
PKGNAMESUFFIX=	-kmod

Return to bug 249326