Changeset 91939 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Oct 21, 2021 12:43:45 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r91895 r91939 679 679 680 680 } 681 #endif 681 #endif /* VBOX_WITH_RAW_MODE_KEEP */ 682 682 } 683 683 -
trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp
r91905 r91939 746 746 AssertReleaseRCReturn(rc, rc); 747 747 } 748 #ifdef VBOX_WITH_RAW_MODE_KEEP 748 749 if ( (pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_RC) 749 750 && VM_IS_RAW_MODE_ENABLED(pVM)) … … 753 754 AssertReleaseRCReturn(rc, rc); 754 755 } 756 #endif 755 757 756 758 pDrv->iNextInstance++; -
trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp
r91854 r91939 398 398 RTRCPTR RCPtr = 0; 399 399 rc = VMMR3GetImportRC(pVM, pszSymbol, &RCPtr); 400 if (RT_SUCCESS(rc))401 *pValue = RCPtr;402 }403 else if ( !strncmp(pszSymbol, "TM", 2)404 || !strcmp(pszSymbol, "g_pSUPGlobalInfoPage"))405 {406 RTRCPTR RCPtr = 0;407 rc = TMR3GetImportRC(pVM, pszSymbol, &RCPtr);408 400 if (RT_SUCCESS(rc)) 409 401 *pValue = RCPtr; -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r91904 r91939 924 924 if (RT_SUCCESS(rc)) 925 925 { 926 pVM->pgm.s.pvZeroPgRC = MMHyperR3ToRC(pVM, pVM->pgm.s.pvZeroPgR3);927 926 pVM->pgm.s.pvZeroPgR0 = MMHyperR3ToR0(pVM, pVM->pgm.s.pvZeroPgR3); 928 927 pVM->pgm.s.HCPhysZeroPg = MMR3HyperHCVirt2HCPhys(pVM, pVM->pgm.s.pvZeroPgR3); -
trunk/src/VBox/VMM/VMMR3/TM.cpp
r91854 r91939 291 291 pVM->tm.s.VirtualGetRawDataR3.pfnBadCpuIndex = tmVirtualNanoTSBadCpuIndex; 292 292 pVM->tm.s.VirtualGetRawDataR3.pu64Prev = &pVM->tm.s.u64VirtualRawPrev; 293 pVM->tm.s.VirtualGetRawDataRC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);294 293 pVM->tm.s.VirtualGetRawDataR0.pu64Prev = MMHyperR3ToR0(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev); 295 294 AssertRelease(pVM->tm.s.VirtualGetRawDataR0.pu64Prev); … … 675 674 STAM_REL_REG_USED(pVM,(void*)&pVM->tm.s.VirtualGetRawDataR0.c1nsSteps,STAMTYPE_U32, "/TM/R0/1nsSteps", STAMUNIT_OCCURENCES, "Virtual time 1ns steps (due to TSC / GIP variations)."); 676 675 STAM_REL_REG_USED(pVM,(void*)&pVM->tm.s.VirtualGetRawDataR0.cBadPrev, STAMTYPE_U32, "/TM/R0/cBadPrev", STAMUNIT_OCCURENCES, "Times the previous virtual time was considered erratic (shouldn't ever happen)."); 677 STAM_REL_REG_USED(pVM,(void*)&pVM->tm.s.VirtualGetRawDataRC.c1nsSteps,STAMTYPE_U32, "/TM/RC/1nsSteps", STAMUNIT_OCCURENCES, "Virtual time 1ns steps (due to TSC / GIP variations).");678 STAM_REL_REG_USED(pVM,(void*)&pVM->tm.s.VirtualGetRawDataRC.cBadPrev, STAMTYPE_U32, "/TM/RC/cBadPrev", STAMUNIT_OCCURENCES, "Times the previous virtual time was considered erratic (shouldn't ever happen).");679 676 STAM_REL_REG( pVM,(void*)&pVM->tm.s.offVirtualSync, STAMTYPE_U64, "/TM/VirtualSync/CurrentOffset", STAMUNIT_NS, "The current offset. (subtract GivenUp to get the lag)"); 680 677 STAM_REL_REG_USED(pVM,(void*)&pVM->tm.s.offVirtualSyncGivenUp, STAMTYPE_U64, "/TM/VirtualSync/GivenUp", STAMUNIT_NS, "Nanoseconds of the 'CurrentOffset' that's been given up and won't ever be attempted caught up with."); … … 692 689 STAM_REG_USED(pVM,(void *)&pVM->tm.s.VirtualGetRawDataR0.cExpired, STAMTYPE_U32, "/TM/R0/cExpired", STAMUNIT_OCCURENCES, "Times the TSC interval expired (overlaps 1ns steps)."); 693 690 STAM_REG_USED(pVM,(void *)&pVM->tm.s.VirtualGetRawDataR0.cUpdateRaces,STAMTYPE_U32, "/TM/R0/cUpdateRaces", STAMUNIT_OCCURENCES, "Thread races when updating the previous timestamp."); 694 STAM_REG_USED(pVM,(void *)&pVM->tm.s.VirtualGetRawDataRC.cExpired, STAMTYPE_U32, "/TM/RC/cExpired", STAMUNIT_OCCURENCES, "Times the TSC interval expired (overlaps 1ns steps).");695 STAM_REG_USED(pVM,(void *)&pVM->tm.s.VirtualGetRawDataRC.cUpdateRaces,STAMTYPE_U32, "/TM/RC/cUpdateRaces", STAMUNIT_OCCURENCES, "Thread races when updating the previous timestamp.");696 691 STAM_REG(pVM, &pVM->tm.s.StatDoQueues, STAMTYPE_PROFILE, "/TM/DoQueues", STAMUNIT_TICKS_PER_CALL, "Profiling timer TMR3TimerQueuesDo."); 697 692 STAM_REG(pVM, &pVM->tm.s.aTimerQueues[TMCLOCK_VIRTUAL].StatDo, STAMTYPE_PROFILE, "/TM/DoQueues/Virtual", STAMUNIT_TICKS_PER_CALL, "Time spent on the virtual clock queue."); … … 1069 1064 * Resolve symbols. 1070 1065 */ 1071 if (VM_IS_RAW_MODE_ENABLED(pVM))1072 {1073 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBad", &pVM->tm.s.VirtualGetRawDataRC.pfnBad);1074 AssertRCReturn(rc, rc);1075 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBadCpuIndex", &pVM->tm.s.VirtualGetRawDataRC.pfnBadCpuIndex);1076 AssertRCReturn(rc, rc);1077 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSRediscover", &pVM->tm.s.VirtualGetRawDataRC.pfnRediscover);1078 AssertRCReturn(rc, rc);1079 pVM->tm.s.pfnVirtualGetRawRC = pVM->tm.s.VirtualGetRawDataRC.pfnRediscover;1080 }1081 1082 1066 rc = PDMR3LdrGetSymbolR0(pVM, NULL, "tmVirtualNanoTSBad", &pVM->tm.s.VirtualGetRawDataR0.pfnBad); 1083 1067 AssertRCReturn(rc, rc); … … 1150 1134 { 1151 1135 LogFlow(("TMR3Relocate\n")); 1152 1153 if (VM_IS_RAW_MODE_ENABLED(pVM)) 1154 { 1155 pVM->tm.s.pvGIPRC = MMHyperR3ToRC(pVM, pVM->tm.s.pvGIPR3); 1156 pVM->tm.s.VirtualGetRawDataRC.pu64Prev += offDelta; 1157 pVM->tm.s.VirtualGetRawDataRC.pfnBad += offDelta; 1158 pVM->tm.s.VirtualGetRawDataRC.pfnBadCpuIndex += offDelta; 1159 pVM->tm.s.VirtualGetRawDataRC.pfnRediscover += offDelta; 1160 pVM->tm.s.pfnVirtualGetRawRC += offDelta; 1161 } 1136 RT_NOREF(pVM, offDelta); 1162 1137 } 1163 1138 … … 1282 1257 pVCpu->tm.s.u64TSCLastSeen = 0; 1283 1258 } 1284 }1285 1286 1287 /**1288 * Resolve a builtin RC symbol.1289 * Called by PDM when loading or relocating GC modules.1290 *1291 * @returns VBox status1292 * @param pVM The cross context VM structure.1293 * @param pszSymbol Symbol to resolve.1294 * @param pRCPtrValue Where to store the symbol value.1295 * @remark This has to work before TMR3Relocate() is called.1296 */1297 VMM_INT_DECL(int) TMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue)1298 {1299 if (!strcmp(pszSymbol, "g_pSUPGlobalInfoPage"))1300 *pRCPtrValue = MMHyperR3ToRC(pVM, &pVM->tm.s.pvGIPRC);1301 //else if (..)1302 else1303 return VERR_SYMBOL_NOT_FOUND;1304 return VINF_SUCCESS;1305 1259 } 1306 1260
Note:
See TracChangeset
for help on using the changeset viewer.