VirtualBox

Ignore:
Timestamp:
May 13, 2008 3:43:59 PM (17 years ago)
Author:
vboxsync
Message:

Windows host: also check for tsc consistency across cores/cpus. The TSC invariant cpuid bit doesn't always imply consistent behaviour on the new barcelona cpus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/win/SUPDrv-win.cpp

    r8155 r8789  
    120120        if (NT_SUCCESS(rc))
    121121        {
     122            uint64_t  u64DiffCores;
     123
    122124            /*
    123125             * Initialize the device extension.
     
    125127            PSUPDRVDEVEXT pDevExt = (PSUPDRVDEVEXT)pDevObj->DeviceExtension;
    126128            memset(pDevExt, 0, sizeof(*pDevExt));
     129
     130            /* Make sure the tsc is consistent across cpus/cores. */
     131            pDevExt->fForceAsyncTsc = supdrvDetermineAsyncTsc(&u64DiffCores);
     132            dprintf(("supdrvDetermineAsyncTsc: fAsync=%d u64DiffCores=%u.\n", pDevExt->fForceAsyncTsc, (uint32_t)u64DiffCores));
     133
    127134            int vrc = supdrvInitDevExt(pDevExt);
    128135            if (!vrc)
     
    767774 * Force async tsc mode (stub).
    768775 */
    769 bool VBOXCALL  supdrvOSGetForcedAsyncTscMode(void)
    770 {
    771     return false;
     776bool VBOXCALL  supdrvOSGetForcedAsyncTscMode(PSUPDRVDEVEXT pDevExt)
     777{
     778    return pDevExt->fForceAsyncTsc != 0;
    772779}
    773780
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