Changeset 72522 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jun 12, 2018 8:45:27 AM (6 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp
r72488 r72522 27 27 *********************************************************************************************************************************/ 28 28 #define LOG_GROUP LOG_GROUP_NEM 29 #define VMCPU_INCL_CPUM_GST_CTX 29 30 #include <iprt/nt/nt-and-windows.h> 30 31 #include <iprt/nt/hyperv.h> -
trunk/src/VBox/VMM/VMMR3/TM.cpp
r70948 r72522 436 436 pVM->tm.s.cTSCTicksPerSecond); 437 437 else 438 {439 438 pVM->tm.s.enmTSCMode = TMTSCMODE_VIRT_TSC_EMULATED; 440 }441 439 442 440 /** @cfgm{/TM/TSCTiedToExecution, bool, false} … … 1197 1195 VM_ASSERT_EMT0(pVM); 1198 1196 uint64_t offTscRawSrc; 1199 if (pVM->tm.s.enmTSCMode == TMTSCMODE_REAL_TSC_OFFSET) 1200 offTscRawSrc = SUPReadTsc(); 1201 else 1202 { 1203 offTscRawSrc = TMVirtualSyncGetNoCheck(pVM); 1204 offTscRawSrc = ASMMultU64ByU32DivByU32(offTscRawSrc, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL); 1197 switch (pVM->tm.s.enmTSCMode) 1198 { 1199 case TMTSCMODE_REAL_TSC_OFFSET: 1200 offTscRawSrc = SUPReadTsc(); 1201 break; 1202 case TMTSCMODE_DYNAMIC: 1203 case TMTSCMODE_VIRT_TSC_EMULATED: 1204 offTscRawSrc = TMVirtualSyncGetNoCheck(pVM); 1205 offTscRawSrc = ASMMultU64ByU32DivByU32(offTscRawSrc, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL); 1206 break; 1207 case TMTSCMODE_NATIVE_API: 1208 /** @todo NEM TSC reset on reset for Windows8+ bug workaround. */ 1209 offTscRawSrc = 0; 1210 break; 1211 default: 1212 AssertFailedBreakStmt(offTscRawSrc = 0); 1205 1213 } 1206 1214 for (VMCPUID iCpu = 0; iCpu < pVM->cCpus; iCpu++) … … 3305 3313 AssertPtr(pVM); Assert(pVM->tm.s.fTSCModeSwitchAllowed); NOREF(pVCpuEmt); NOREF(pvData); 3306 3314 Assert(pVM->tm.s.enmTSCMode != TMTSCMODE_REAL_TSC_OFFSET); 3315 Assert(pVM->tm.s.enmTSCMode != TMTSCMODE_NATIVE_API); /** @todo figure out NEM/win and paravirt */ 3307 3316 Assert(tmR3HasFixedTSC(pVM)); 3308 3317 … … 3584 3593 pHlp->pfnPrintf(pHlp, "\n offset %RU64", pVCpu->tm.s.offTSCRawSrc); 3585 3594 } 3595 else if (pVM->tm.s.enmTSCMode == TMTSCMODE_NATIVE_API) 3596 pHlp->pfnPrintf(pHlp, " - native api"); 3586 3597 else 3587 3598 pHlp->pfnPrintf(pHlp, " - virtual clock"); … … 3638 3649 case TMTSCMODE_VIRT_TSC_EMULATED: return "VirtTscEmulated"; 3639 3650 case TMTSCMODE_DYNAMIC: return "Dynamic"; 3651 case TMTSCMODE_NATIVE_API: return "NativeApi"; 3640 3652 default: return "???"; 3641 3653 }
Note:
See TracChangeset
for help on using the changeset viewer.