VirtualBox

Changeset 93654 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 8, 2022 12:26:36 PM (3 years ago)
Author:
vboxsync
Message:

TM: Set up the tm.s.VirtualGetRawDataR0 pointers in ring-0. bugref:10094

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/TMR0.cpp

    r93554 r93654  
    5151        pGVM->tmr0.s.aTimerQueues[idxQueue].hMapObj = NIL_RTR0MEMOBJ;
    5252    }
     53
     54    pGVM->tm.s.VirtualGetRawDataR0.pu64Prev       = &pGVM->tm.s.u64VirtualRawPrev;
     55    pGVM->tm.s.VirtualGetRawDataR0.pfnBad         = tmVirtualNanoTSBad;
     56    pGVM->tm.s.VirtualGetRawDataR0.pfnBadCpuIndex = tmVirtualNanoTSBadCpuIndex;
     57    pGVM->tm.s.VirtualGetRawDataR0.pfnRediscover  = tmVirtualNanoTSRediscover;
     58    pGVM->tm.s.pfnVirtualGetRawR0                 = tmVirtualNanoTSRediscover;
    5359}
    5460
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r93554 r93654  
    292292    pVM->tm.s.VirtualGetRawDataR3.pfnBadCpuIndex = tmVirtualNanoTSBadCpuIndex;
    293293    pVM->tm.s.VirtualGetRawDataR3.pu64Prev       = &pVM->tm.s.u64VirtualRawPrev;
    294     if (!SUPR3IsDriverless())
    295     {
    296         pVM->tm.s.VirtualGetRawDataR0.pu64Prev   = MMHyperR3ToR0(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);
    297         AssertRelease(pVM->tm.s.VirtualGetRawDataR0.pu64Prev);
    298     }
    299     /* The rest is done in TMR3InitFinalize() since it's too early to call PDM. */
    300294
    301295    /*
     
    10721066    int rc;
    10731067
    1074     /*
    1075      * Resolve symbols, unless we're in driverless mode.
    1076      */
    1077     if (!SUPR3IsDriverless())
    1078     {
    1079         rc = PDMR3LdrGetSymbolR0(pVM, NULL, "tmVirtualNanoTSBad",           &pVM->tm.s.VirtualGetRawDataR0.pfnBad);
    1080         AssertRCReturn(rc, rc);
    1081         rc = PDMR3LdrGetSymbolR0(pVM, NULL, "tmVirtualNanoTSBadCpuIndex",   &pVM->tm.s.VirtualGetRawDataR0.pfnBadCpuIndex);
    1082         AssertRCReturn(rc, rc);
    1083         rc = PDMR3LdrGetSymbolR0(pVM, NULL, "tmVirtualNanoTSRediscover",    &pVM->tm.s.VirtualGetRawDataR0.pfnRediscover);
    1084         AssertRCReturn(rc, rc);
    1085         pVM->tm.s.pfnVirtualGetRawR0 = pVM->tm.s.VirtualGetRawDataR0.pfnRediscover;
    1086     }
    1087 
    10881068#ifndef VBOX_WITHOUT_NS_ACCOUNTING
    10891069    /*
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