Changeset 70372 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 28, 2017 10:19:33 AM (7 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMMap.cpp
r69111 r70372 67 67 /* 68 68 * Validate input. 69 * Note! The lower limit (1 MB) matches how pgmR3PhysMMIOExCreate works. 69 70 */ 70 71 Assert(!fFlags || fFlags == PGMR3MAPPT_FLAGS_UNMAPPABLE); 71 if (cb < _2M || cb > 64 * _1M) 72 { 73 AssertMsgFailed(("Serious? cb=%d\n", cb)); 74 return VERR_INVALID_PARAMETER; 75 } 72 AssertMsgReturn(cb >= _1M && cb <= _64M, ("Seriously? cb=%d (%#x)\n", cb, cb), VERR_OUT_OF_RANGE); 73 76 74 cb = RT_ALIGN_32(cb, _4M); 77 75 RTGCPTR GCPtrLast = GCPtr + cb - 1; -
trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp
r69111 r70372 2597 2597 const size_t cbRange = RT_OFFSETOF(PGMREGMMIORANGE, RamRange.aPages[cPagesTrackedByChunk]); 2598 2598 PPGMREGMMIORANGE pNew = NULL; 2599 if ( cPagesTrackedByChunk > cPagesLeft /**< @todo r=klaus the first part of the condition is guaranteed false due to RT_MIN above */2599 if ( iChunk + 1 < cChunks 2600 2600 || cbRange >= _1M) 2601 2601 { … … 2643 2643 else 2644 2644 { 2645 RTGCPTR GCPtrChunkMap = pVM->pgm.s.GCPtrPrevRamRangeMapping - cbChunk;2645 RTGCPTR GCPtrChunkMap = pVM->pgm.s.GCPtrPrevRamRangeMapping - RT_ALIGN_Z(cbChunk, _4M); 2646 2646 RTGCPTR const GCPtrChunk = GCPtrChunkMap + PAGE_SIZE; 2647 2647 rc = PGMR3MapPT(pVM, GCPtrChunkMap, (uint32_t)cbChunk, 0 /*fFlags*/, pgmR3PhysMMIOExRangeRelocate, pNew, pszDesc); … … 2651 2651 2652 2652 RTGCPTR GCPtrPage = GCPtrChunk; 2653 for (uint32_t iPage = 0; iPage < c PagesTrackedByChunk&& RT_SUCCESS(rc); iPage++, GCPtrPage += PAGE_SIZE)2653 for (uint32_t iPage = 0; iPage < cChunkPages && RT_SUCCESS(rc); iPage++, GCPtrPage += PAGE_SIZE) 2654 2654 rc = PGMMap(pVM, GCPtrPage, paChunkPages[iPage].Phys, PAGE_SIZE, 0); 2655 2655 }
Note:
See TracChangeset
for help on using the changeset viewer.