VirtualBox

Changeset 68019 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jul 18, 2017 12:44:53 PM (7 years ago)
Author:
vboxsync
Message:

TMAllCpu.cpp: Removed some weirness from the TSC calc code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/TMAllCpu.cpp

    r66227 r68019  
    4949    else
    5050        u64 = TMVirtualSyncGetNoCheck(pVM);
    51     if (u64 != TMCLOCK_FREQ_VIRTUAL) /* what's the use of this test, document! */
    52         u64 = ASMMultU64ByU32DivByU32(u64, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL);
    53     return u64;
     51    return ASMMultU64ByU32DivByU32(u64, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL);
    5452}
    5553
     
    385383        uint64_t cNsToDeadline;
    386384        uint64_t u64NowVirtSync = TMVirtualSyncGetWithDeadlineNoCheck(pVM, &cNsToDeadline);
    387         uint64_t u64Now = u64NowVirtSync != TMCLOCK_FREQ_VIRTUAL /* what's the use of this? */
    388                         ? ASMMultU64ByU32DivByU32(u64NowVirtSync, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL)
    389                         : u64NowVirtSync;
     385        uint64_t u64Now = ASMMultU64ByU32DivByU32(u64NowVirtSync, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL)
    390386        u64Now -= pVCpu->tm.s.offTSCRawSrc;
    391387        *poffRealTsc     = u64Now - ASMReadTSC();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette