diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-11-01 14:37:52 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-11-01 14:37:52 +0000 |
commit | afd89ed23e4a7fdc4b5f42af8f496746befbfa26 (patch) | |
tree | b7d566f754f26f44444b18c0e722fd7643acf0cf /src/VBox/Runtime/r0drv/os2 | |
parent | eb0aaa4bb5d9f884283d8faa168d31b2b91482b1 (diff) | |
download | VirtualBox-svn-afd89ed23e4a7fdc4b5f42af8f496746befbfa26.tar.gz |
IPRT/memobj-r0drv-os2.cpp: Implemented sub-mappings in kernel space. bugref:9218
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@81620 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Runtime/r0drv/os2')
-rw-r--r-- | src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp b/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp index 1441b269b49..9780fbb40ea 100644 --- a/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp +++ b/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp @@ -348,7 +348,6 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, size_t offSub, size_t cbSub) { - AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); /* @@ -357,7 +356,6 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ if (uAlignment > PAGE_SIZE) return VERR_NOT_SUPPORTED; - /** @todo finish the implementation. */ int rc; @@ -415,8 +413,10 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ * isn't actually freed until all the mappings have been freed up * (reference counting). */ + if (!cbSub) + cbSub = pMemToMapOs2->Core.cb - offSub; PRTR0MEMOBJOS2 pMemOs2 = (PRTR0MEMOBJOS2)rtR0MemObjNew(RT_UOFFSETOF(RTR0MEMOBJOS2, Lock), RTR0MEMOBJTYPE_MAPPING, - pvR0, pMemToMapOs2->Core.cb); + (uint8_t *)pvR0 + offSub, cbSub); if (pMemOs2) { pMemOs2->Core.u.Mapping.R0Process = NIL_RTR0PROCESS; |