Changeset 82862 in vbox for trunk/src/VBox
- Timestamp:
- Jan 26, 2020 2:47:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r82591 r82862 183 183 * @remarks This is primarily a way of avoiding the deadlock checks in the 184 184 * windows driver verifier. */ 185 #if defined(RT_OS_WINDOWS) || defined( DOXYGEN_RUNNING)185 #if defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN) || defined(DOXYGEN_RUNNING) 186 186 # define VBOX_USE_CRIT_SECT_FOR_GIANT 187 187 #endif … … 451 451 /** Indicates that the chunk is a large page (2MB). */ 452 452 #define GMM_CHUNK_FLAGS_LARGE_PAGE UINT16_C(0x0001) 453 /** Indicates that the chunk was locked rather than allocated directly. */ 454 #define GMM_CHUNK_FLAGS_SEEDED UINT16_C(0x0002) 453 455 /** @} */ 454 456 … … 2132 2134 Assert(pGMM->hMtxOwner != RTThreadNativeSelf()); 2133 2135 Assert(hGVM != NIL_GVM_HANDLE || pGMM->fBoundMemoryMode); 2134 Assert(fChunkFlags == 0 || fChunkFlags == GMM_CHUNK_FLAGS_LARGE_PAGE );2136 Assert(fChunkFlags == 0 || fChunkFlags == GMM_CHUNK_FLAGS_LARGE_PAGE || fChunkFlags == GMM_CHUNK_FLAGS_SEEDED); 2135 2137 2136 2138 #if defined(VBOX_WITH_RAM_IN_KERNEL) && !defined(VBOX_WITH_LINEAR_HOST_PHYS_MEM) … … 2138 2140 * Get a ring-0 mapping of the object. 2139 2141 */ 2140 uint8_t *pbMapping = (uint8_t *)RTR0MemObjAddress(hMemObj);2142 uint8_t *pbMapping = !(fChunkFlags & GMM_CHUNK_FLAGS_SEEDED) ? (uint8_t *)RTR0MemObjAddress(hMemObj) : NULL; 2141 2143 if (!pbMapping) 2142 2144 { … … 4291 4293 if (RT_SUCCESS(rc)) 4292 4294 { 4293 rc = gmmR0RegisterChunk(pGMM, &pGVM->gmm.s.Private, hMemObj, pGVM->hSelf, 0 /*fChunkFlags*/, NULL);4295 rc = gmmR0RegisterChunk(pGMM, &pGVM->gmm.s.Private, hMemObj, pGVM->hSelf, GMM_CHUNK_FLAGS_SEEDED, NULL); 4294 4296 if (RT_SUCCESS(rc)) 4295 4297 gmmR0MutexRelease(pGMM);
Note:
See TracChangeset
for help on using the changeset viewer.