Changeset 9148 in vbox for trunk/src/VBox
- Timestamp:
- May 27, 2008 9:21:03 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/MMHyper.cpp
r8155 r9148 100 100 * Map the VM structure into the hypervisor space. 101 101 */ 102 rc = MMR3HyperMapPages(pVM, pVM, pVM->pVMR0, RT_ALIGN_Z(sizeof(VM), PAGE_SIZE) >> PAGE_SHIFT, pVM->paVMPagesR3, "VM", &pVM->pVMGC); 102 RTGCPTR GCPtr; 103 rc = MMR3HyperMapPages(pVM, pVM, pVM->pVMR0, RT_ALIGN_Z(sizeof(VM), PAGE_SIZE) >> PAGE_SHIFT, pVM->paVMPagesR3, "VM", &GCPtr); 103 104 if (VBOX_SUCCESS(rc)) 104 105 { 106 pVM->pVMGC = (RTGCPTR32)GCPtr; 107 105 108 /* Reserve a page for fencing. */ 106 109 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); … … 109 112 * Map the heap into the hypervisor space. 110 113 */ 111 rc = mmR3HyperHeapMap(pVM, pVM->mm.s.pHyperHeapHC, & pVM->mm.s.pHyperHeapGC);114 rc = mmR3HyperHeapMap(pVM, pVM->mm.s.pHyperHeapHC, &GCPtr); 112 115 if (VBOX_SUCCESS(rc)) 113 116 { 117 pVM->mm.s.pHyperHeapGC = (RTGCPTR32)GCPtr; 118 114 119 /* 115 120 * Register info handlers. -
trunk/src/VBox/VMM/PDMDevice.cpp
r8564 r9148 1261 1261 && (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC)) 1262 1262 { 1263 RTGCPTR GCPtrIn = 0;1263 RTGCPTR32 GCPtrIn = 0; 1264 1264 if (pszIn) 1265 1265 { … … 1267 1267 AssertMsgRC(rc, ("Failed to resolve %s.%s (pszIn)\n", pDevIns->pDevReg->szGCMod, pszIn)); 1268 1268 } 1269 RTGCPTR GCPtrOut = 0;1269 RTGCPTR32 GCPtrOut = 0; 1270 1270 if (pszOut && VBOX_SUCCESS(rc)) 1271 1271 { … … 1273 1273 AssertMsgRC(rc, ("Failed to resolve %s.%s (pszOut)\n", pDevIns->pDevReg->szGCMod, pszOut)); 1274 1274 } 1275 RTGCPTR GCPtrInStr = 0;1275 RTGCPTR32 GCPtrInStr = 0; 1276 1276 if (pszInStr && VBOX_SUCCESS(rc)) 1277 1277 { … … 1279 1279 AssertMsgRC(rc, ("Failed to resolve %s.%s (pszInStr)\n", pDevIns->pDevReg->szGCMod, pszInStr)); 1280 1280 } 1281 RTGCPTR GCPtrOutStr = 0;1281 RTGCPTR32 GCPtrOutStr = 0; 1282 1282 if (pszOutStr && VBOX_SUCCESS(rc)) 1283 1283 { … … 1406 1406 && (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC)) 1407 1407 { 1408 RTGCPTR GCPtrWrite = 0;1408 RTGCPTR32 GCPtrWrite = 0; 1409 1409 if (pszWrite) 1410 1410 rc = PDMR3GetSymbolGCLazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szGCMod, pszWrite, &GCPtrWrite); 1411 RTGCPTR GCPtrRead = 0;1411 RTGCPTR32 GCPtrRead = 0; 1412 1412 int rc2 = VINF_SUCCESS; 1413 1413 if (pszRead) 1414 1414 rc2 = PDMR3GetSymbolGCLazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szGCMod, pszRead, &GCPtrRead); 1415 RTGCPTR GCPtrFill = 0;1415 RTGCPTR32 GCPtrFill = 0; 1416 1416 int rc3 = VINF_SUCCESS; 1417 1417 if (pszFill) … … 4144 4144 PDMDEV_ASSERT_DEVINS(pDevIns); 4145 4145 VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC); 4146 RTGCPTR pGCHelpers = 0;4146 RTGCPTR32 pGCHelpers = 0; 4147 4147 int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCPicHlp", &pGCHelpers); 4148 4148 AssertReleaseRC(rc); … … 4230 4230 PDMDEV_ASSERT_DEVINS(pDevIns); 4231 4231 VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC); 4232 RTGCPTR pGCHelpers = 0;4232 RTGCPTR32 pGCHelpers = 0; 4233 4233 int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCApicHlp", &pGCHelpers); 4234 4234 AssertReleaseRC(rc); … … 4294 4294 PDMDEV_ASSERT_DEVINS(pDevIns); 4295 4295 VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC); 4296 RTGCPTR pGCHelpers = 0;4296 RTGCPTR32 pGCHelpers = 0; 4297 4297 int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCIoApicHlp", &pGCHelpers); 4298 4298 AssertReleaseRC(rc); … … 4377 4377 PDMDEV_ASSERT_DEVINS(pDevIns); 4378 4378 VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC); 4379 RTGCPTR pGCHelpers = 0;4379 RTGCPTR32 pGCHelpers = 0; 4380 4380 int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCPciHlp", &pGCHelpers); 4381 4381 AssertReleaseRC(rc); -
trunk/src/VBox/VMM/PDMLdr.cpp
r8155 r9148 750 750 * @param pGCPtrValue Where to store the symbol value. 751 751 */ 752 PDMR3DECL(int) PDMR3GetSymbolGC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR pGCPtrValue)752 PDMR3DECL(int) PDMR3GetSymbolGC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR32 pGCPtrValue) 753 753 { 754 754 #ifdef PDMLDR_FAKE_MODE … … 806 806 * @param pGCPtrValue Where to store the symbol value. 807 807 */ 808 PDMR3DECL(int) PDMR3GetSymbolGCLazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR pGCPtrValue)808 PDMR3DECL(int) PDMR3GetSymbolGCLazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR32 pGCPtrValue) 809 809 { 810 810 #ifdef PDMLDR_FAKE_MODE -
trunk/src/VBox/VMM/PGM.cpp
r9092 r9148 1588 1588 PGMR3DECL(int) PGMR3InitDynMap(PVM pVM) 1589 1589 { 1590 RTGCPTR GCPtr; 1590 1591 /* 1591 1592 * Reserve space for mapping the paging pages into guest context. 1592 1593 */ 1593 int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + ELEMENTS(pVM->pgm.s.apHCPaePDs) + 1 + 2 + 2), "Paging", & pVM->pgm.s.pGC32BitPD);1594 int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + ELEMENTS(pVM->pgm.s.apHCPaePDs) + 1 + 2 + 2), "Paging", &GCPtr); 1594 1595 AssertRCReturn(rc, rc); 1596 pVM->pgm.s.pGC32BitPD = GCPtr; 1595 1597 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 1596 1598 … … 1599 1601 */ 1600 1602 /** @todo r=bird: Need to verify that the checks for crossing PTs are correct here. They seems to be assuming 4MB PTs.. */ 1601 rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping", &pVM->pgm.s.pbDynPageMapBaseGC); 1603 rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping", &GCPtr); 1604 if (VBOX_SUCCESS(rc)) 1605 pVM->pgm.s.pbDynPageMapBaseGC = GCPtr; 1606 1602 1607 if ( VBOX_SUCCESS(rc) 1603 1608 && (pVM->pgm.s.pbDynPageMapBaseGC >> X86_PD_SHIFT) != ((pVM->pgm.s.pbDynPageMapBaseGC + MM_HYPER_DYNAMIC_SIZE - 1) >> X86_PD_SHIFT)) 1604 rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping not crossing", &pVM->pgm.s.pbDynPageMapBaseGC); 1609 { 1610 rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping not crossing", &GCPtr); 1611 if (VBOX_SUCCESS(rc)) 1612 pVM->pgm.s.pbDynPageMapBaseGC = GCPtr; 1613 } 1605 1614 if (VBOX_SUCCESS(rc)) 1606 1615 { … … 2122 2131 SSMR3GetGCPtr(pSSM, &GCPtr); 2123 2132 RTGCUINTPTR cPTs; 2124 rc = SSMR3Get U32(pSSM,&cPTs);2133 rc = SSMR3GetGCUIntPtr(pSSM, &cPTs); 2125 2134 if (VBOX_FAILURE(rc)) 2126 2135 return rc; -
trunk/src/VBox/VMM/PGMHandler.cpp
r8625 r9148 112 112 * Resolve the GC handler. 113 113 */ 114 RTGCPTR pfnHandlerGC = NIL_RTGCPTR;114 RTGCPTR32 pfnHandlerGC = NIL_RTGCPTR; 115 115 if (pszHandlerGC) 116 116 rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC); … … 250 250 * Resolve the GC handler. 251 251 */ 252 RTGCPTR pfnHandlerGC;252 RTGCPTR32 pfnHandlerGC; 253 253 int rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC); 254 254 if (VBOX_SUCCESS(rc)) -
trunk/src/VBox/VMM/TM.cpp
r8911 r9148 213 213 AssertMsgRCReturn(rc, ("Failed to get GIP physical address!\n"), rc); 214 214 215 rc = MMR3HyperMapHCPhys(pVM, pVM->tm.s.pvGIPR3, HCPhysGIP, PAGE_SIZE, "GIP", &pVM->tm.s.pvGIPGC); 215 RTGCPTR GCPtr; 216 rc = MMR3HyperMapHCPhys(pVM, pVM->tm.s.pvGIPR3, HCPhysGIP, PAGE_SIZE, "GIP", &GCPtr); 216 217 if (VBOX_FAILURE(rc)) 217 218 { … … 219 220 return rc; 220 221 } 222 pVM->tm.s.pvGIPGC = GCPtr; 221 223 LogFlow(("TMR3Init: HCPhysGIP=%RHp at %VGv\n", HCPhysGIP, pVM->tm.s.pvGIPGC)); 222 224 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); -
trunk/src/VBox/VMM/TRPM.cpp
r8985 r9148 552 552 * exports in TRPMR3Init(). 553 553 */ 554 RTGCPTR aGCPtrs[TRPM_HANDLER_MAX] = {0};554 RTGCPTR32 aGCPtrs[TRPM_HANDLER_MAX] = {0}; 555 555 int rc; 556 556 rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "TRPMGCHandlerInterupt", &aGCPtrs[TRPM_HANDLER_INT]); … … 1051 1051 { 1052 1052 /** @todo cleanup trpmR3ClearPassThroughHandler()! */ 1053 RTGCPTR aGCPtrs[TRPM_HANDLER_MAX];1053 RTGCPTR32 aGCPtrs[TRPM_HANDLER_MAX]; 1054 1054 int rc; 1055 1055 -
trunk/src/VBox/VMM/TRPMInternal.h
r8155 r9148 149 149 /** Temporary Hypervisor trap handlers. 150 150 * NULL means default action. */ 151 RTGCPTR 151 RTGCPTR32 aTmpTrapHandlers[256]; 152 152 153 153 /** GC Pointer to the IDT shadow area (aIdt) placed in Hypervisor memory arena. */ 154 RTGCPTR 154 RTGCPTR32 GCPtrIdt; 155 155 /** Current (last) Guest's IDTR. */ 156 156 VBOXIDTR GuestIdtr; … … 160 160 161 161 /** Checked trap & interrupt handler array */ 162 RTGCPTR 162 RTGCPTR32 aGuestTrapHandler[256]; 163 163 164 164 /** GC: The number of times writes to the Guest IDT were detected. */ -
trunk/src/VBox/VMM/VMM.cpp
r8841 r9148 306 306 * Map the code into the GC address space. 307 307 */ 308 rc = MMR3HyperMapHCPhys(pVM, pVM->vmm.s.pvHCCoreCodeR3, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, "Core Code", &pVM->vmm.s.pvGCCoreCode); 308 RTGCPTR GCPtr; 309 rc = MMR3HyperMapHCPhys(pVM, pVM->vmm.s.pvHCCoreCodeR3, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, "Core Code", &GCPtr); 309 310 if (VBOX_SUCCESS(rc)) 310 311 { 312 pVM->vmm.s.pvGCCoreCode = GCPtr; 311 313 MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL); 312 314 LogRel(("CoreCode: R3=%VHv R0=%VHv GC=%VGv Phys=%VHp cb=%#x\n", … … 677 679 * -# do a generic hypervisor call. 678 680 */ 679 RTGCPTR GCPtrEP;681 RTGCPTR32 GCPtrEP; 680 682 int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP); 681 683 if (VBOX_SUCCESS(rc)) … … 866 868 */ 867 869 int rc = VINF_SUCCESS; 868 RTGCPTR GCPtrLoggerFlush = 0;870 RTGCPTR32 GCPtrLoggerFlush = 0; 869 871 870 872 if (pVM->vmm.s.pLoggerHC … … 880 882 if (pVM->vmm.s.pLoggerHC) 881 883 { 882 RTGCPTR GCPtrLoggerWrapper = 0;884 RTGCPTR32 GCPtrLoggerWrapper = 0; 883 885 rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerWrapper", &GCPtrLoggerWrapper); 884 886 AssertReleaseMsgRC(rc, ("vmmGCLoggerWrapper not found! rc=%Vra\n", rc)); … … 892 894 if (pVM->vmm.s.pRelLoggerHC) 893 895 { 894 RTGCPTR GCPtrLoggerWrapper = 0;896 RTGCPTR32 GCPtrLoggerWrapper = 0; 895 897 rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCRelLoggerWrapper", &GCPtrLoggerWrapper); 896 898 AssertReleaseMsgRC(rc, ("vmmGCRelLoggerWrapper not found! rc=%Vra\n", rc)); … … 1567 1569 VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM) 1568 1570 { 1569 RTGCPTR GCPtr;1571 RTGCPTR32 GCPtr; 1570 1572 int rc = PDMR3GetSymbolGC(pVM, NULL, "g_szRTAssertMsg1", &GCPtr); 1571 1573 if (VBOX_SUCCESS(rc)) … … 1583 1585 VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM) 1584 1586 { 1585 RTGCPTR GCPtr;1587 RTGCPTR32 GCPtr; 1586 1588 int rc = PDMR3GetSymbolGC(pVM, NULL, "g_szRTAssertMsg2", &GCPtr); 1587 1589 if (VBOX_SUCCESS(rc)) -
trunk/src/VBox/VMM/VMMInternal.h
r8841 r9148 161 161 RTR0PTR pvHCCoreCodeR0; 162 162 /** Pointer to core code guest context mapping. */ 163 RTGCPTR 163 RTGCPTR32 pvGCCoreCode; 164 164 #ifdef VBOX_WITH_NMI 165 165 /** The guest context address of the APIC (host) mapping. */ 166 RTGCPTR 167 RTGCPTR 166 RTGCPTR32 GCPtrApicBase; 167 RTGCPTR32 pGCPadding0; /**< Alignment padding */ 168 168 #endif 169 169 /** The current switcher. … … 180 180 GCPTRTYPE(PFNVMMSWITCHERGC) pfnGCGuestToHost; 181 181 /** Call Trampoline. See vmmGCCallTrampoline(). */ 182 RTGCPTR 182 RTGCPTR32 pfnGCCallTrampoline; 183 183 184 184 /** Resume Guest Execution. See CPUMGCResumeGuest(). */ 185 RTGCPTR 185 RTGCPTR32 pfnCPUMGCResumeGuest; 186 186 /** Resume Guest Execution in V86 mode. See CPUMGCResumeGuestV86(). */ 187 RTGCPTR 187 RTGCPTR32 pfnCPUMGCResumeGuestV86; 188 188 /** The last GC return code. */ 189 189 RTINT iLastGCRc; -
trunk/src/VBox/VMM/VMMTests.cpp
r8899 r9148 56 56 static int vmmR3DoGCTest(PVM pVM, VMMGCOPERATION enmTestcase, unsigned uVariation) 57 57 { 58 RTGCPTR GCPtrEP;58 RTGCPTR32 GCPtrEP; 59 59 int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP); 60 60 if (VBOX_FAILURE(rc)) … … 90 90 RTPrintf("VMM: testing 0%x / %d - %s\n", u8Trap, uVariation, pszDesc); 91 91 92 RTGCPTR GCPtrEP;92 RTGCPTR32 GCPtrEP; 93 93 int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP); 94 94 if (VBOX_FAILURE(rc)) … … 123 123 else if (pszFaultEIP) 124 124 { 125 RTGCPTR GCPtrFault;125 RTGCPTR32 GCPtrFault; 126 126 int rc2 = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, &GCPtrFault); 127 127 if (VBOX_FAILURE(rc2)) … … 178 178 * Setup stack for calling VMMGCEntry(). 179 179 */ 180 RTGCPTR GCPtrEP;180 RTGCPTR32 GCPtrEP; 181 181 int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP); 182 182 if (VBOX_SUCCESS(rc)) … … 485 485 * Setup stack for calling VMMGCEntry(). 486 486 */ 487 RTGCPTR GCPtrEP;487 RTGCPTR32 GCPtrEP; 488 488 rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP); 489 489 if (VBOX_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.