VirtualBox

Changeset 64255 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Oct 13, 2016 3:18:21 PM (8 years ago)
Author:
vboxsync
Message:

SUP,VMM,IPRT: SUPDrv and GIP major version bump! Added processor group info to GIP along with a new RDTSCP-based method for getting the current CPU (for the timesup code).

Location:
trunk/src/VBox/Runtime/common/time
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/time/timesup.cpp

    r62556 r64255  
    203203                          : pGip->fGetGipCpu & SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
    204204                          ? RTTimeNanoTSLFenceAsyncUseRdtscp
     205                          : pGip->fGetGipCpu & SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
     206                          ? RTTimeNanoTSLFenceAsyncUseRdtscpGroupChNumCl
    205207                          : pGip->fGetGipCpu & SUPGIPGETCPU_APIC_ID
    206208                          ? RTTimeNanoTSLFenceAsyncUseApicId
     
    239241                pfnWorker = pGip->fGetGipCpu & SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
    240242                          ? RTTimeNanoTSLegacyAsyncUseRdtscp
     243                          : pGip->fGetGipCpu & SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
     244                          ? RTTimeNanoTSLegacyAsyncUseRdtscpGroupChNumCl
    241245                          : pGip->fGetGipCpu & SUPGIPGETCPU_IDTR_LIMIT_MASK_MAX_SET_CPUS
    242246                          ? RTTimeNanoTSLegacyAsyncUseIdtrLim
  • trunk/src/VBox/Runtime/common/time/timesupref.cpp

    r62477 r64255  
    112112RT_EXPORT_SYMBOL(RTTimeNanoTSLegacyAsyncUseIdtrLim);
    113113
     114# undef  TMPL_GET_CPU_METHOD
     115# define TMPL_GET_CPU_METHOD     SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
     116# undef  rtTimeNanoTSInternalRef
     117# define rtTimeNanoTSInternalRef RTTimeNanoTSLegacyAsyncUseRdtscpGroupChNumCl
     118# include "timesupref.h"
     119RT_EXPORT_SYMBOL(RTTimeNanoTSLegacyAsyncUseRdtscpGroupChNumCl);
     120
    114121#else  /* IN_RC || IN_RING0: Disable interrupts and call getter function. */
    115122
     
    196203RT_EXPORT_SYMBOL(RTTimeNanoTSLFenceAsyncUseIdtrLim);
    197204
     205# undef  TMPL_GET_CPU_METHOD
     206# define TMPL_GET_CPU_METHOD     SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
     207# undef  rtTimeNanoTSInternalRef
     208# define rtTimeNanoTSInternalRef RTTimeNanoTSLFenceAsyncUseRdtscpGroupChNumCl
     209# include "timesupref.h"
     210RT_EXPORT_SYMBOL(RTTimeNanoTSLFenceAsyncUseRdtscpGroupChNumCl);
     211
    198212#else  /* IN_RC || IN_RING0: Disable interrupts and call getter function. */
    199213
  • trunk/src/VBox/Runtime/common/time/timesupref.h

    r62477 r64255  
    9191            uint8_t  const  idApic   = ASMGetApicId();
    9292            uint16_t const  iGipCpu  = pGip->aiCpuFromApicId[idApic];
    93 # elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
     93# elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS \
     94    || TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
    9495#  if TMPL_MODE != TMPL_MODE_ASYNC
    9596            uint32_t const  u32TransactionId = pGip->aCPUs[0].u32TransactionId;
     
    9798            uint32_t        uAux;
    9899            ASMReadTscWithAux(&uAux);
     100#  if TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
    99101            uint16_t const  iCpuSet  = uAux & (RTCPUSET_MAX_CPUS - 1);
     102#  else
     103            uint16_t const  iCpuSet  = pGip->aiFirstCpuSetIdxFromCpuGroup[(uAux >> 8) & UINT8_MAX] + (uAux & UINT8_MAX);
     104#  endif
    100105            uint16_t const  iGipCpu  = pGip->aiCpuFromCpuSetIdx[iCpuSet];
    101106# elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_IDTR_LIMIT_MASK_MAX_SET_CPUS
     
    124129#elif TMPL_MODE != TMPL_MODE_ASYNC \
    125130   && TMPL_GET_CPU_METHOD != SUPGIPGETCPU_APIC_ID \
    126    && TMPL_GET_CPU_METHOD != SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
     131   && TMPL_GET_CPU_METHOD != SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS \
     132   && TMPL_GET_CPU_METHOD != SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
    127133                uint32_t const u32TransactionId = pGip->aCPUs[0].u32TransactionId;
    128134                ASMCompilerBarrier();
     
    149155#endif
    150156                uint64_t u64PrevNanoTS          = ASMAtomicUoReadU64(pData->pu64Prev);
    151 #if TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
     157#if TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS \
     158 || TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
    152159                ASMCompilerBarrier();
    153160                uint32_t uAux2;
     
    168175# if   TMPL_GET_CPU_METHOD == SUPGIPGETCPU_APIC_ID
    169176                if (RT_LIKELY(ASMGetApicId() == idApic))
    170 # elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS
     177# elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_MASK_MAX_SET_CPUS \
     178    || TMPL_GET_CPU_METHOD == SUPGIPGETCPU_RDTSCP_GROUP_IN_CH_NUMBER_IN_CL
    171179                if (RT_LIKELY(uAux2 == uAux))
    172180# elif TMPL_GET_CPU_METHOD == SUPGIPGETCPU_IDTR_LIMIT_MASK_MAX_SET_CPUS
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