Changeset 89477 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 3, 2021 9:17:34 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89476 r89477 2242 2242 2243 2243 /** 2244 * Checks whether two consecutive I/O page results of a DMA memory request form a2245 * physically contiguous region.2244 * Checks whether two consecutive I/O page results of a DMA memory request 2245 * translates to a physically contiguous region. 2246 2246 * 2247 2247 * @returns @c true if the I/O pages are contiguous, @c false otherwise. … … 2257 2257 RTGCPHYS const GCPhysPrev = pIoPagePrev->GCPhysBase; 2258 2258 RTGCPHYS const GCPhys = pIoPage->GCPhysBase; 2259 uint64_t const offMaskPrev = X86_GET_PAGE_OFFSET_MASK(pIoPagePrev->cShift); 2260 uint64_t const offMask = X86_GET_PAGE_OFFSET_MASK(pIoPage->cShift); 2261 2259 #ifdef RT_STRICT 2262 2260 /* Paranoia: Ensure offset bits are 0. */ 2263 Assert(!(GCPhysPrev & offMaskPrev)); 2264 Assert(!(GCPhys & offMask)); 2265 2266 if ((GCPhysPrev & ~offMaskPrev) + cbPrev == (GCPhys & ~offMask)) 2267 return true; 2268 return false; 2261 { 2262 uint64_t const fOffMaskPrev = X86_GET_PAGE_OFFSET_MASK(pIoPagePrev->cShift); 2263 uint64_t const fOffMask = X86_GET_PAGE_OFFSET_MASK(pIoPage->cShift); 2264 Assert(!(GCPhysPrev & fOffMaskPrev)); 2265 Assert(!(GCPhys & fOffMask)); 2266 } 2267 #endif 2268 return GCPhysPrev + cbPrev == GCPhys; 2269 2269 } 2270 2270
Note:
See TracChangeset
for help on using the changeset viewer.