Changeset 11299 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 8, 2008 10:56:56 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/IOM.cpp
r10538 r11299 1461 1461 IOMR3MMIOHandler, pRange, 1462 1462 pVM->iom.s.pfnMMIOHandlerR0, MMHyperR3ToR0(pVM, pRange), 1463 pVM->iom.s.pfnMMIOHandlerGC, MMHyperR3To GC(pVM, pRange), pszDesc);1463 pVM->iom.s.pfnMMIOHandlerGC, MMHyperR3ToRC(pVM, pRange), pszDesc); 1464 1464 if (RT_SUCCESS(rc)) 1465 1465 { … … 1525 1525 pRange->pfnWriteCallbackGC= pfnWriteCallback; 1526 1526 pRange->pfnFillCallbackGC = pfnFillCallback; 1527 pRange->pDevInsGC = MMHyperCCTo GC(pVM, pDevIns);1527 pRange->pDevInsGC = MMHyperCCToRC(pVM, pDevIns); 1528 1528 1529 1529 return VINF_SUCCESS; -
trunk/src/VBox/VMM/PDM.cpp
r11261 r11299 318 318 { 319 319 pDevIns->pDevHlpGC = pDevHlpGC; 320 pDevIns->pvInstanceDataGC = MMHyperR3To GC(pVM, pDevIns->pvInstanceDataR3);320 pDevIns->pvInstanceDataGC = MMHyperR3ToRC(pVM, pDevIns->pvInstanceDataR3); 321 321 pDevIns->pvInstanceDataR0 = MMHyperR3ToR0(pVM, pDevIns->pvInstanceDataR3); 322 322 pDevIns->Internal.s.pVMGC = pVM->pVMGC; 323 323 if (pDevIns->Internal.s.pPciBusHC) 324 pDevIns->Internal.s.pPciBusGC = MMHyperR3To GC(pVM, pDevIns->Internal.s.pPciBusHC);324 pDevIns->Internal.s.pPciBusGC = MMHyperR3ToRC(pVM, pDevIns->Internal.s.pPciBusHC); 325 325 if (pDevIns->Internal.s.pPciDeviceHC) 326 pDevIns->Internal.s.pPciDeviceGC = MMHyperR3To GC(pVM, pDevIns->Internal.s.pPciDeviceHC);326 pDevIns->Internal.s.pPciDeviceGC = MMHyperR3ToRC(pVM, pDevIns->Internal.s.pPciDeviceHC); 327 327 if (pDevIns->pDevReg->pfnRelocate) 328 328 { -
trunk/src/VBox/VMM/PGM.cpp
r11133 r11299 1197 1197 if (VBOX_SUCCESS(rc)) 1198 1198 { 1199 pVM->pgm.s.pvZeroPgGC = MMHyperR3To GC(pVM, pVM->pgm.s.pvZeroPgR3);1199 pVM->pgm.s.pvZeroPgGC = MMHyperR3ToRC(pVM, pVM->pgm.s.pvZeroPgR3); 1200 1200 pVM->pgm.s.pvZeroPgR0 = MMHyperR3ToR0(pVM, pVM->pgm.s.pvZeroPgR3); 1201 1201 AssertRelease(pVM->pgm.s.pvZeroPgR0 != NIL_RTHCPHYS); … … 1858 1858 for (PPGMRAMRANGE pCur = pVM->pgm.s.pRamRangesR3; pCur->pNextR3; pCur = pCur->pNextR3) 1859 1859 #ifdef VBOX_WITH_NEW_PHYS_CODE 1860 pCur->pNextGC = MMHyperR3To GC(pVM, pCur->pNextR3);1860 pCur->pNextGC = MMHyperR3ToRC(pVM, pCur->pNextR3); 1861 1861 #else 1862 1862 { 1863 pCur->pNextGC = MMHyperR3To GC(pVM, pCur->pNextR3);1863 pCur->pNextGC = MMHyperR3ToRC(pVM, pCur->pNextR3); 1864 1864 if (pCur->pavHCChunkGC) 1865 1865 pCur->pavHCChunkGC = MMHyperHC2GC(pVM, pCur->pavHCChunkHC); … … 1881 1881 for (RTHCUINT i = 0; i < pCur->cPTs; i++) 1882 1882 { 1883 pCur->aPTs[i].pPTGC = MMHyperR3To GC(pVM, pCur->aPTs[i].pPTR3);1884 pCur->aPTs[i].paPaePTsGC = MMHyperR3To GC(pVM, pCur->aPTs[i].paPaePTsR3);1883 pCur->aPTs[i].pPTGC = MMHyperR3ToRC(pVM, pCur->aPTs[i].pPTR3); 1884 pCur->aPTs[i].paPaePTsGC = MMHyperR3ToRC(pVM, pCur->aPTs[i].paPaePTsR3); 1885 1885 } 1886 1886 } … … 1995 1995 1996 1996 /* Exit the guest paging mode before the pgm pool gets reset. 1997 * Important to clean up the amd64 case. 1997 * Important to clean up the amd64 case. 1998 1998 */ 1999 1999 int rc = PGM_GST_PFN(Exit, pVM)(pVM); -
trunk/src/VBox/VMM/PGMMap.cpp
r9303 r11299 164 164 */ 165 165 pNew->aPTs[i].pPTR3 = (PX86PT)pbPTs; 166 pNew->aPTs[i].pPTGC = MMHyperR3To GC(pVM, pNew->aPTs[i].pPTR3);166 pNew->aPTs[i].pPTGC = MMHyperR3ToRC(pVM, pNew->aPTs[i].pPTR3); 167 167 pNew->aPTs[i].pPTR0 = MMHyperR3ToR0(pVM, pNew->aPTs[i].pPTR3); 168 168 pNew->aPTs[i].HCPhysPT = MMR3HyperHCVirt2HCPhys(pVM, pNew->aPTs[i].pPTR3); … … 177 177 pNew->aPTs[i].HCPhysPaePT1 = MMR3HyperHCVirt2HCPhys(pVM, pbPTs + PAGE_SIZE); 178 178 pNew->aPTs[i].paPaePTsR3 = (PX86PTPAE)pbPTs; 179 pNew->aPTs[i].paPaePTsGC = MMHyperR3To GC(pVM, pbPTs);179 pNew->aPTs[i].paPaePTsGC = MMHyperR3ToRC(pVM, pbPTs); 180 180 pNew->aPTs[i].paPaePTsR0 = MMHyperR3ToR0(pVM, pbPTs); 181 181 pbPTs += PAGE_SIZE * 2; … … 189 189 */ 190 190 pNew->pNextR3 = pCur; 191 pNew->pNextGC = pCur ? MMHyperR3To GC(pVM, pCur) : 0;191 pNew->pNextGC = pCur ? MMHyperR3ToRC(pVM, pCur) : 0; 192 192 pNew->pNextR0 = pCur ? MMHyperR3ToR0(pVM, pCur) : 0; 193 193 if (pPrev) 194 194 { 195 195 pPrev->pNextR3 = pNew; 196 pPrev->pNextGC = MMHyperR3To GC(pVM, pNew);196 pPrev->pNextGC = MMHyperR3ToRC(pVM, pNew); 197 197 pPrev->pNextR0 = MMHyperR3ToR0(pVM, pNew); 198 198 } … … 200 200 { 201 201 pVM->pgm.s.pMappingsR3 = pNew; 202 pVM->pgm.s.pMappingsGC = MMHyperR3To GC(pVM, pNew);202 pVM->pgm.s.pMappingsGC = MMHyperR3ToRC(pVM, pNew); 203 203 pVM->pgm.s.pMappingsR0 = MMHyperR3ToR0(pVM, pNew); 204 204 } … … 847 847 pMapping->pNextR0 = pPrev->pNextR0; 848 848 pPrev->pNextR3 = pMapping; 849 pPrev->pNextGC = MMHyperR3To GC(pVM, pMapping);849 pPrev->pNextGC = MMHyperR3ToRC(pVM, pMapping); 850 850 pPrev->pNextR0 = MMHyperR3ToR0(pVM, pMapping); 851 851 } … … 855 855 pMapping->pNextR0 = pVM->pgm.s.pMappingsR0; 856 856 pVM->pgm.s.pMappingsR3 = pMapping; 857 pVM->pgm.s.pMappingsGC = MMHyperR3To GC(pVM, pMapping);857 pVM->pgm.s.pMappingsGC = MMHyperR3ToRC(pVM, pMapping); 858 858 pVM->pgm.s.pMappingsR0 = MMHyperR3ToR0(pVM, pMapping); 859 859 } -
trunk/src/VBox/VMM/PGMPhys.cpp
r11235 r11299 98 98 pNew->pNextR3 = pRam; 99 99 pNew->pNextR0 = pRam ? MMHyperCCToR0(pVM, pRam) : NIL_RTR0PTR; 100 pNew->pNextGC = pRam ? MMHyperCCTo GC(pVM, pRam) : NIL_RTGCPTR;100 pNew->pNextGC = pRam ? MMHyperCCToRC(pVM, pRam) : NIL_RTGCPTR; 101 101 102 102 if (pPrev) … … 104 104 pPrev->pNextR3 = pNew; 105 105 pPrev->pNextR0 = MMHyperCCToR0(pVM, pNew); 106 pPrev->pNextGC = MMHyperCCTo GC(pVM, pNew);106 pPrev->pNextGC = MMHyperCCToRC(pVM, pNew); 107 107 } 108 108 else … … 110 110 pVM->pgm.s.pRamRangesR3 = pNew; 111 111 pVM->pgm.s.pRamRangesR0 = MMHyperCCToR0(pVM, pNew); 112 pVM->pgm.s.pRamRangesGC = MMHyperCCTo GC(pVM, pNew);112 pVM->pgm.s.pRamRangesGC = MMHyperCCToRC(pVM, pNew); 113 113 } 114 114 … … 135 135 pPrev->pNextR3 = pNext; 136 136 pPrev->pNextR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR; 137 pPrev->pNextGC = pNext ? MMHyperCCTo GC(pVM, pNext) : NIL_RTGCPTR;137 pPrev->pNextGC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR; 138 138 } 139 139 else … … 142 142 pVM->pgm.s.pRamRangesR3 = pNext; 143 143 pVM->pgm.s.pRamRangesR0 = pNext ? MMHyperCCToR0(pVM, pNext) : NIL_RTR0PTR; 144 pVM->pgm.s.pRamRangesGC = pNext ? MMHyperCCTo GC(pVM, pNext) : NIL_RTGCPTR;144 pVM->pgm.s.pRamRangesGC = pNext ? MMHyperCCToRC(pVM, pNext) : NIL_RTGCPTR; 145 145 } 146 146 … … 252 252 rc = MMHyperAlloc(pVM, (cb >> PGM_DYNAMIC_CHUNK_SHIFT) * sizeof(void *), 16, MM_TAG_PGM, (void **)&pNew->pavHCChunkHC); 253 253 AssertRCReturn(rc, rc); 254 pNew->pavHCChunkGC = MMHyperCCTo GC(pVM, pNew->pavHCChunkHC);254 pNew->pavHCChunkGC = MMHyperCCToRC(pVM, pNew->pavHCChunkHC); 255 255 pNew->fFlags |= MM_RAM_FLAGS_DYNAMIC_ALLOC; 256 256 … … 1296 1296 #endif 1297 1297 NULL, "pgmPhysRomWriteHandler", MMHyperCCToR0(pVM, pRomNew), 1298 NULL, "pgmPhysRomWriteHandler", MMHyperCCTo GC(pVM, pRomNew), pszDesc);1298 NULL, "pgmPhysRomWriteHandler", MMHyperCCToRC(pVM, pRomNew), pszDesc); 1299 1299 if (RT_SUCCESS(rc)) 1300 1300 { … … 1343 1343 pRomNew->pNextR3 = pRom; 1344 1344 pRomNew->pNextR0 = pRom ? MMHyperCCToR0(pVM, pRom) : NIL_RTR0PTR; 1345 pRomNew->pNextGC = pRom ? MMHyperCCTo GC(pVM, pRom) : NIL_RTGCPTR;1345 pRomNew->pNextGC = pRom ? MMHyperCCToRC(pVM, pRom) : NIL_RTGCPTR; 1346 1346 1347 1347 if (pRomPrev) … … 1349 1349 pRomPrev->pNextR3 = pRomNew; 1350 1350 pRomPrev->pNextR0 = MMHyperCCToR0(pVM, pRomNew); 1351 pRomPrev->pNextGC = MMHyperCCTo GC(pVM, pRomNew);1351 pRomPrev->pNextGC = MMHyperCCToRC(pVM, pRomNew); 1352 1352 } 1353 1353 else … … 1355 1355 pVM->pgm.s.pRomRangesR3 = pRomNew; 1356 1356 pVM->pgm.s.pRomRangesR0 = MMHyperCCToR0(pVM, pRomNew); 1357 pVM->pgm.s.pRomRangesGC = MMHyperCCTo GC(pVM, pRomNew);1357 pVM->pgm.s.pRomRangesGC = MMHyperCCToRC(pVM, pRomNew); 1358 1358 } 1359 1359 … … 1818 1818 pNew->pNextR3 = pCur; 1819 1819 pNew->pNextR0 = pCur ? MMHyperCCToR0(pVM, pCur) : NIL_RTR0PTR; 1820 pNew->pNextGC = pCur ? MMHyperCCTo GC(pVM, pCur) : NIL_RTGCPTR;1820 pNew->pNextGC = pCur ? MMHyperCCToRC(pVM, pCur) : NIL_RTGCPTR; 1821 1821 if (pPrev) 1822 1822 { -
trunk/src/VBox/VMM/TM.cpp
r10567 r11299 252 252 } 253 253 254 pVM->tm.s.VirtualGetRawDataGC.pu64Prev = MMHyperR3To GC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);254 pVM->tm.s.VirtualGetRawDataGC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev); 255 255 pVM->tm.s.VirtualGetRawDataR0.pu64Prev = MMHyperR3ToR0(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev); 256 256 AssertReturn(pVM->tm.s.VirtualGetRawDataR0.pu64Prev, VERR_INTERNAL_ERROR); … … 752 752 LogFlow(("TMR3Relocate\n")); 753 753 754 pVM->tm.s.pvGIPGC = MMHyperR3To GC(pVM, pVM->tm.s.pvGIPR3);755 pVM->tm.s.paTimerQueuesGC = MMHyperR3To GC(pVM, pVM->tm.s.paTimerQueuesR3);754 pVM->tm.s.pvGIPGC = MMHyperR3ToRC(pVM, pVM->tm.s.pvGIPR3); 755 pVM->tm.s.paTimerQueuesGC = MMHyperR3ToRC(pVM, pVM->tm.s.paTimerQueuesR3); 756 756 pVM->tm.s.paTimerQueuesR0 = MMHyperR3ToR0(pVM, pVM->tm.s.paTimerQueuesR3); 757 757 758 pVM->tm.s.VirtualGetRawDataGC.pu64Prev = MMHyperR3To GC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);758 pVM->tm.s.VirtualGetRawDataGC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev); 759 759 AssertFatal(pVM->tm.s.VirtualGetRawDataGC.pu64Prev); 760 760 rc = PDMR3GetSymbolGCLazy(pVM, NULL, "tmVirtualNanoTSBad", &pVM->tm.s.VirtualGetRawDataGC.pfnBad); -
trunk/src/VBox/VMM/TRPM.cpp
r9531 r11299 508 508 rc = MMHyperAlloc(pVM, sizeof(STAMCOUNTER) * 255, 8, MM_TAG_STAM, (void **)&pVM->trpm.s.paStatForwardedIRQR3); 509 509 AssertRCReturn(rc, rc); 510 pVM->trpm.s.paStatForwardedIRQGC = MMHyperR3To GC(pVM, pVM->trpm.s.paStatForwardedIRQR3);510 pVM->trpm.s.paStatForwardedIRQGC = MMHyperR3ToRC(pVM, pVM->trpm.s.paStatForwardedIRQR3); 511 511 pVM->trpm.s.paStatForwardedIRQR0 = MMHyperR3ToR0(pVM, pVM->trpm.s.paStatForwardedIRQR3); 512 512 for (unsigned i = 0; i < 255; i++) -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r10523 r11299 70 70 pVM->cpum.s.pHyperCoreR3 = (R3PTRTYPE(PCPUMCTXCORE))MMHyperCCToR3(pVM, pCtxCore); 71 71 pVM->cpum.s.pHyperCoreR0 = (R0PTRTYPE(PCPUMCTXCORE))MMHyperCCToR0(pVM, pCtxCore); 72 pVM->cpum.s.pHyperCoreGC = (RCPTRTYPE(PCPUMCTXCORE))MMHyperCCTo GC(pVM, pCtxCore);72 pVM->cpum.s.pHyperCoreGC = (RCPTRTYPE(PCPUMCTXCORE))MMHyperCCToRC(pVM, pCtxCore); 73 73 } 74 74 } -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r10405 r11299 443 443 { 444 444 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u)); 445 pgmPoolFree(pPool->CTXSUFF(pVM), 446 uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, 445 pgmPoolFree(pPool->CTXSUFF(pVM), 446 uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, 447 447 /* Note: hardcoded PAE implementation dependency */ 448 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? PGMPOOL_IDX_PAE_PD : pPage->idx, 448 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? PGMPOOL_IDX_PAE_PD : pPage->idx, 449 449 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? iShw + (pPage->idx - PGMPOOL_IDX_PAE_PD_0) * X86_PG_PAE_ENTRIES : iShw); 450 450 uShw.pPDPae->a[iShw].u = 0; … … 472 472 { 473 473 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPae->a[iShw2].u)); 474 pgmPoolFree(pPool->CTXSUFF(pVM), 475 uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK, 474 pgmPoolFree(pPool->CTXSUFF(pVM), 475 uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK, 476 476 /* Note: hardcoded PAE implementation dependency */ 477 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? PGMPOOL_IDX_PAE_PD : pPage->idx, 477 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? PGMPOOL_IDX_PAE_PD : pPage->idx, 478 478 (pPage->enmKind == PGMPOOLKIND_PAE_PD_FOR_PAE_PD) ? iShw2 + (pPage->idx - PGMPOOL_IDX_PAE_PD_0) * X86_PG_PAE_ENTRIES : iShw2); 479 479 uShw.pPDPae->a[iShw2].u = 0; … … 535 535 { 536 536 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u)); 537 pgmPoolFree(pPool->CTXSUFF(pVM), 538 uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, 539 pPage->idx, 537 pgmPoolFree(pPool->CTXSUFF(pVM), 538 uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, 539 pPage->idx, 540 540 iShw); 541 541 uShw.pPDPae->a[iShw].u = 0; … … 561 561 { 562 562 LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPae->a[iShw2].u)); 563 pgmPoolFree(pPool->CTXSUFF(pVM), 564 uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK, 565 pPage->idx, 563 pgmPoolFree(pPool->CTXSUFF(pVM), 564 uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK, 565 pPage->idx, 566 566 iShw2); 567 567 uShw.pPDPae->a[iShw2].u = 0; … … 1492 1492 pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pPage), 1493 1493 pPool->pfnAccessHandlerR0, MMHyperCCToR0(pVM, pPage), 1494 pPool->pfnAccessHandlerGC, MMHyperCCTo GC(pVM, pPage),1494 pPool->pfnAccessHandlerGC, MMHyperCCToRC(pVM, pPage), 1495 1495 pPool->pszAccessHandler); 1496 1496 /** @todo we should probably deal with out-of-memory conditions here, but for now increasing … … 1568 1568 pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pNewHead), 1569 1569 pPool->pfnAccessHandlerR0, MMHyperCCToR0(pVM, pNewHead), 1570 pPool->pfnAccessHandlerGC, MMHyperCCTo GC(pVM, pNewHead),1570 pPool->pfnAccessHandlerGC, MMHyperCCToRC(pVM, pNewHead), 1571 1571 pPool->pszAccessHandler); 1572 1572 AssertFatalRCSuccess(rc); … … 3534 3534 pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pPage), 3535 3535 pPool->pfnAccessHandlerR0, MMHyperCCToR0(pVM, pPage), 3536 pPool->pfnAccessHandlerGC, MMHyperCCTo GC(pVM, pPage),3536 pPool->pfnAccessHandlerGC, MMHyperCCToRC(pVM, pPage), 3537 3537 pPool->pszAccessHandler); 3538 3538 AssertFatalRCSuccess(rc);
Note:
See TracChangeset
for help on using the changeset viewer.