VirtualBox

Changeset 2056 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 12, 2007 4:44:39 PM (18 years ago)
Author:
vboxsync
Message:

Virtualize the TSC.

File:
1 edited

Legend:

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

    r1956 r2056  
    186186    rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "TSCVirtualized", &pVM->tm.s.fTSCVirtualized);
    187187    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    188 #if 0 /* seems to kind of work... */
    189         pVM->tm.s.fTSCVirtualized = true;
    190 #else
    191         pVM->tm.s.fTSCVirtualized = false;
    192 #endif
     188        pVM->tm.s.fTSCVirtualized = true; /* trap rdtsc */
    193189    else if (VBOX_FAILURE(rc))
    194190        return VMSetError(pVM, rc, RT_SRC_POS,
     
    198194    rc = CFGMR3QueryBool(CFGMR3GetRoot(pVM), "UseRealTSC", &pVM->tm.s.fTSCTicking);
    199195    if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    200 #if 0 /* doesn't seem to work reliably yet... xp takes several ~2 min to shutdown now. darn. */
    201         pVM->tm.s.fTSCUseRealTSC = false; /* virtualize it */
    202 #else
    203         pVM->tm.s.fTSCUseRealTSC = true; /* don't virtualize it */
    204 #endif
     196        pVM->tm.s.fTSCUseRealTSC = false; /* use virtual time */
    205197    else if (VBOX_FAILURE(rc))
    206198        return VMSetError(pVM, rc, RT_SRC_POS,
    207199                          N_("Configuration error: Failed to querying bool value \"UseRealTSC\". (%Vrc)"), rc);
    208 #if 1 /* temporary hack */
    209     if (RTEnvExist("VBOX_TM_VIRTUALIZED_TSC"))
    210         pVM->tm.s.fTSCUseRealTSC = false;
    211 #endif
    212200    if (!pVM->tm.s.fTSCUseRealTSC)
    213201        pVM->tm.s.fTSCVirtualized = true;
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