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 |
} |