VirtualBox

Changeset 68020 in vbox for trunk/src/VBox/VMM/VMMR3


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

TMR3Reset: Must reset TSC to zero to work around windows 8 bug TSC range.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r65897 r68020  
    11781178    pVM->tm.s.fParavirtTscEnabled = false;
    11791179
     1180    /*
     1181     * Reset TSC to avoid a windows 8 bug (see @bugref{8926}).
     1182     */
     1183    VM_ASSERT_EMT0(pVM);
     1184    uint64_t offTscRawSrc;
     1185    if (pVM->tm.s.enmTSCMode == TMTSCMODE_REAL_TSC_OFFSET)
     1186        offTscRawSrc = SUPReadTsc();
     1187    else
     1188    {
     1189        offTscRawSrc = TMVirtualSyncGetNoCheck(pVM);
     1190        offTscRawSrc = ASMMultU64ByU32DivByU32(offTscRawSrc, pVM->tm.s.cTSCTicksPerSecond, TMCLOCK_FREQ_VIRTUAL);
     1191    }
     1192    for (VMCPUID iCpu = 0; iCpu < pVM->cCpus; iCpu++)
     1193    {
     1194        pVM->aCpus[iCpu].tm.s.offTSCRawSrc   = offTscRawSrc;
     1195        pVM->aCpus[iCpu].tm.s.u64TSC         = 0;
     1196        pVM->aCpus[iCpu].tm.s.u64TSCLastSeen = 0;
     1197    }
     1198
    11801199    TM_UNLOCK_TIMERS(pVM);
    11811200}
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