Changeset 93617 in vbox for trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
- Timestamp:
- Feb 6, 2022 8:35:16 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PGMPool.cpp
r93554 r93617 233 233 cb += cMaxPhysExts * sizeof(PGMPOOLPHYSEXT); 234 234 PPGMPOOL pPool; 235 rc = MMR3HyperAllocOnceNoRel(pVM, cb, 0, MM_TAG_PGM_POOL, (void **)&pPool); 235 RTR0PTR pPoolR0; 236 rc = SUPR3PageAllocEx(RT_ALIGN_32(cb, HOST_PAGE_SIZE) >> HOST_PAGE_SHIFT, 0 /*fFlags*/, (void **)&pPool, &pPoolR0, NULL); 236 237 if (RT_FAILURE(rc)) 237 238 return rc; 238 pVM->pgm.s.pPoolR3 = pPool; 239 pVM->pgm.s.pPoolR0 = MMHyperR3ToR0(pVM, pPool); 239 Assert(ASMMemIsZero(pPool, cb)); 240 pVM->pgm.s.pPoolR3 = pPool->pPoolR3 = pPool; 241 pVM->pgm.s.pPoolR0 = pPool->pPoolR0 = pPoolR0; 240 242 241 243 /* … … 250 252 PPGMPOOLUSER paUsers = (PPGMPOOLUSER)&pPool->aPages[pPool->cMaxPages]; 251 253 pPool->paUsersR3 = paUsers; 252 pPool->paUsersR0 = MMHyperR3ToR0(pVM, paUsers);254 pPool->paUsersR0 = pPoolR0 + (uintptr_t)paUsers - (uintptr_t)pPool; 253 255 for (unsigned i = 0; i < cMaxUsers; i++) 254 256 { … … 262 264 PPGMPOOLPHYSEXT paPhysExts = (PPGMPOOLPHYSEXT)&paUsers[cMaxUsers]; 263 265 pPool->paPhysExtsR3 = paPhysExts; 264 pPool->paPhysExtsR0 = MMHyperR3ToR0(pVM, paPhysExts);266 pPool->paPhysExtsR0 = pPoolR0 + (uintptr_t)paPhysExts - (uintptr_t)pPool; 265 267 for (unsigned i = 0; i < cMaxPhysExts; i++) 266 268 {
Note:
See TracChangeset
for help on using the changeset viewer.