VirtualBox

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


Ignore:
Timestamp:
Feb 5, 2021 12:58:54 PM (4 years ago)
Author:
vboxsync
Message:

IPRT/time,VMM/TM: Added extra parameter to the RTTimeNanoTS GIP workers for returning the TSC value.

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

Legend:

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

    r85186 r87626  
    6565 * last two events may occur as CPUs are taken online.
    6666 */
    67 DECLCALLBACK(DECLEXPORT(uint64_t)) tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA pData)
     67DECLCALLBACK(DECLEXPORT(uint64_t)) tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA pData, PRTITMENANOTSEXTRA pExtra)
    6868{
    6969    PVM pVM = RT_FROM_MEMBER(pData, VM, CTX_SUFF(tm.s.VirtualGetRawData));
     
    143143     */
    144144    ASMAtomicWritePtr((void * volatile *)&CTX_SUFF(pVM->tm.s.pfnVirtualGetRaw), (void *)(uintptr_t)pfnWorker);
    145     return pfnWorker(pData);
     145    return pfnWorker(pData, pExtra);
    146146}
    147147
     
    150150 * @interface_method_impl{RTTIMENANOTSDATA,pfnBadCpuIndex}
    151151 */
    152 DECLCALLBACK(DECLEXPORT(uint64_t)) tmVirtualNanoTSBadCpuIndex(PRTTIMENANOTSDATA pData, uint16_t idApic, uint16_t iCpuSet,
    153                                                               uint16_t iGipCpu)
     152DECLCALLBACK(DECLEXPORT(uint64_t)) tmVirtualNanoTSBadCpuIndex(PRTTIMENANOTSDATA pData, PRTITMENANOTSEXTRA pExtra,
     153                                                              uint16_t idApic, uint16_t iCpuSet, uint16_t iGipCpu)
    154154{
    155155    PVM pVM = RT_FROM_MEMBER(pData, VM, CTX_SUFF(tm.s.VirtualGetRawData));
    156     AssertFatalMsgFailed(("pVM=%p idApic=%#x iCpuSet=%#x iGipCpu=%#x\n", pVM, idApic, iCpuSet, iGipCpu));
     156    AssertFatalMsgFailed(("pVM=%p idApic=%#x iCpuSet=%#x iGipCpu=%#x pExtra=%p\n", pVM, idApic, iCpuSet, iGipCpu, pExtra));
    157157#ifndef _MSC_VER
    158158    return UINT64_MAX;
     
    167167{
    168168# ifdef IN_RING3
    169     uint64_t u64 = CTXALLSUFF(pVM->tm.s.pfnVirtualGetRaw)(&CTXALLSUFF(pVM->tm.s.VirtualGetRawData));
     169    uint64_t u64 = CTXALLSUFF(pVM->tm.s.pfnVirtualGetRaw)(&CTXALLSUFF(pVM->tm.s.VirtualGetRawData), NULL /*pExtra*/);
    170170# else  /* !IN_RING3 */
    171171    uint32_t cPrevSteps = pVM->tm.s.CTX_SUFF(VirtualGetRawData).c1nsSteps;
    172     uint64_t u64 = pVM->tm.s.CTX_SUFF(pfnVirtualGetRaw)(&pVM->tm.s.CTX_SUFF(VirtualGetRawData));
     172    uint64_t u64 = pVM->tm.s.CTX_SUFF(pfnVirtualGetRaw)(&pVM->tm.s.CTX_SUFF(VirtualGetRawData), NULL /*pExtra*/);
    173173    if (cPrevSteps != pVM->tm.s.CTX_SUFF(VirtualGetRawData).c1nsSteps)
    174174        VMCPU_FF_SET(VMMGetCpu(pVM), VMCPU_FF_TO_R3);
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r82968 r87626  
    229229    pVM->tm.s.paTimerQueuesR3[TMCLOCK_TSC].enmClock            = TMCLOCK_TSC;
    230230    pVM->tm.s.paTimerQueuesR3[TMCLOCK_TSC].u64Expire           = INT64_MAX;
    231 
    232231
    233232    /*
  • trunk/src/VBox/VMM/include/TMInternal.h

    r82968 r87626  
    801801DECLCALLBACK(DECLEXPORT(void))      tmVirtualNanoTSBad(PRTTIMENANOTSDATA pData, uint64_t u64NanoTS,
    802802                                                       uint64_t u64DeltaPrev, uint64_t u64PrevNanoTS);
    803 DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA pData);
    804 DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSBadCpuIndex(PRTTIMENANOTSDATA pData, uint16_t idApic,
    805                                                                uint16_t iCpuSet, uint16_t iGipCpu);
     803DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSRediscover(PRTTIMENANOTSDATA pData, PRTITMENANOTSEXTRA pExtra);
     804DECLCALLBACK(DECLEXPORT(uint64_t))  tmVirtualNanoTSBadCpuIndex(PRTTIMENANOTSDATA pData, PRTITMENANOTSEXTRA pExtra,
     805                                                               uint16_t idApic, uint16_t iCpuSet, uint16_t iGipCpu);
    806806
    807807/**
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