Changeset 20675 in vbox
- Timestamp:
- Jun 18, 2009 8:49:43 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48777
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp
r19747 r20675 64 64 if (pVM->tm.s.fTSCVirtualized) 65 65 { 66 /** @todo Test that pausing and resuming doesn't cause lag! (I.e. that we're 67 * unpaused before the virtual time and stopped after it. */ 66 68 if (pVM->tm.s.fTSCUseRealTSC) 67 69 pVCpu->tm.s.u64TSCOffset = ASMReadTSC() - pVCpu->tm.s.u64TSC; … … 95 97 AssertFailed(); 96 98 return VERR_INTERNAL_ERROR; 97 }98 99 100 /**101 * Pauses the CPU timestamp counter ticking.102 *103 * @returns VBox status code.104 * @param pVCpu The VMCPU to operate on.105 * @todo replace this with TMNotifySuspend106 */107 VMMDECL(int) TMCpuTickPause(PVMCPU pVCpu)108 {109 PVM pVM = pVCpu->CTX_SUFF(pVM);110 111 if (!pVM->tm.s.fTSCTiedToExecution)112 return tmCpuTickPause(pVM, pVCpu);113 /* ignored */114 return VINF_SUCCESS;115 99 } 116 100 … … 266 250 VMMDECL(int) TMCpuTickSet(PVMCPU pVCpu, uint64_t u64Tick) 267 251 { 268 Assert(!pVCpu->tm.s.fTSCTicking); 252 /* 253 * This is easier to do when the TSC is paused since resume will 254 * do all the calcuations for us. 255 */ 256 PVM pVM = pVCpu->CTX_SUFF(pVM); 257 bool fTSCTicking = pVCpu->tm.s.fTSCTicking; 258 if (fTSCTicking) 259 tmCpuTickPause(pVM, pVCpu); 269 260 pVCpu->tm.s.u64TSC = u64Tick; 261 262 if (fTSCTicking) 263 tmCpuTickResume(pVM, pVCpu); 264 /** @todo Try help synchronizing it better among the virtual CPUs? */ 270 265 return VINF_SUCCESS; 271 266 }
Note:
See TracChangeset
for help on using the changeset viewer.