VirtualBox

Changeset 81096 in vbox


Ignore:
Timestamp:
Oct 1, 2019 7:29:03 PM (5 years ago)
Author:
vboxsync
Message:

IPRT,SUP,*: Increased RTCPUSET_MAX_CPUS to 1024 for AMD64, except for darwin, and reduced the OS/2 CPU count to 64. Implies GIP and SUPDrv version bump. bugref:9501

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/sup.h

    r81071 r81096  
    467467    /** The TSC frequency of the system. */
    468468    uint64_t            u64CpuHz;
    469     /** The set of online CPUs. */
    470     RTCPUSET            OnlineCpuSet;
    471     /** The set of present CPUs. */
    472     RTCPUSET            PresentCpuSet;
    473     /** The set of possible CPUs. */
    474     RTCPUSET            PossibleCpuSet;
    475469    /** The number of CPUs that are online. */
    476470    volatile uint16_t   cOnlineCpus;
     
    490484    /** GIP flags, see SUPGIP_FLAGS_XXX. */
    491485    volatile uint32_t   fFlags;
     486    /** The set of online CPUs. */
     487    RTCPUSET            OnlineCpuSet;
     488#if RTCPUSET_MAX_CPUS < 1024
     489    uint64_t            abOnlineCpuSetPadding[(1024 - RTCPUSET_MAX_CPUS) / 64];
     490#endif
     491    /** The set of present CPUs. */
     492    RTCPUSET            PresentCpuSet;
     493#if RTCPUSET_MAX_CPUS < 1024
     494    uint64_t            abPresentCpuSetPadding[(1024 - RTCPUSET_MAX_CPUS) / 64];
     495#endif
     496    /** The set of possible CPUs. */
     497    RTCPUSET            PossibleCpuSet;
     498#if RTCPUSET_MAX_CPUS < 1024
     499    uint64_t            abPossibleCpuSetPadding[(1024 - RTCPUSET_MAX_CPUS) / 64];
     500#endif
    492501
    493502    /** Padding / reserved space for future data. */
    494     uint32_t            au32Padding1[24];
     503    uint32_t            au32Padding1[48];
    495504
    496505    /** Table indexed by the CPU APIC ID to get the CPU table index. */
     
    514523} SUPGLOBALINFOPAGE;
    515524AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, u64NanoTSLastUpdateHz, 8);
    516 #if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
     525AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, OnlineCpuSet, 64);
     526AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, PresentCpuSet, 64);
     527AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, PossibleCpuSet, 64);
     528#if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64) /* ?? needed ?? */
    517529AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 32);
    518530#else
    519 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 256);
     531AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 128);
    520532#endif
    521533
  • trunk/include/VBox/sup.mac

    r81071 r81096  
    7676    .u64NanoTSLastUpdateHz      resq 1
    7777    .u64CpuHz                   resq 1
    78     .OnlineCpuSet               resq 4
    79     .PresentCpuSet              resq 4
    80     .PossibleCpuSet             resq 4
    8178    .cOnlineCpus                resw 1
    8279    .cPresentCpus               resw 1
     
    8784    .fGetGipCpu                 resd 1
    8885    .fFlags                     resd 1
    89     .au32Padding1               resd 24
     86    .OnlineCpuSet               resq 16
     87    .PresentCpuSet              resq 16
     88    .PossibleCpuSet             resq 16
     89    .au32Padding1               resd 48
    9090    .aiCpuFromApicId            resw 1024
    9191    .aiCpuFromCpuSetIdx         resw 1024
  • trunk/include/VBox/vmm/uvm.h

    r76585 r81096  
    139139        struct STAMUSERPERVM    s;
    140140#endif
    141         uint8_t                 padding[6880];
     141        uint8_t                 padding[25056];
    142142    } stam;
    143143
  • trunk/include/iprt/types.h

    r80531 r81096  
    23932393/** The maximum number of CPUs a set can contain and IPRT is able
    23942394 * to reference. (Should be max of support arch/platforms.)
    2395  * @remarks Must be a multiple of 64 (see RTCPUSET).  */
     2395 * @remarks Must be a power of two and multiple of 64 (see RTCPUSET).  */
    23962396#if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
    2397 # define RTCPUSET_MAX_CPUS      256
     2397# if defined(RT_OS_OS2)
     2398#  define RTCPUSET_MAX_CPUS     64
     2399# elif defined(RT_OS_DARWIN) || defined(RT_ARCH_X86)
     2400#  define RTCPUSET_MAX_CPUS     256
     2401# else
     2402#  define RTCPUSET_MAX_CPUS     1024
     2403# endif
    23982404#elif defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64)
    23992405# define RTCPUSET_MAX_CPUS      1024
  • trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp

    r81075 r81096  
    19391939     */
    19401940    cCpus = RTMpGetArraySize();
    1941     if (   cCpus > RTCPUSET_MAX_CPUS
    1942 #if RTCPUSET_MAX_CPUS != 256
    1943         || cCpus > 256 /* ApicId is used for the mappings */
    1944 #endif
    1945         )
    1946     {
    1947         SUPR0Printf("VBoxDrv: Too many CPUs (%u) for the GIP (max %u)\n", cCpus, RT_MIN(RTCPUSET_MAX_CPUS, 256));
     1941    if (cCpus > RT_MIN(RTCPUSET_MAX_CPUS, RT_ELEMENTS(pGip->aiCpuFromApicId)))
     1942    {
     1943        SUPR0Printf("VBoxDrv: Too many CPUs (%u) for the GIP (max %u)\n", cCpus, RT_MIN(RTCPUSET_MAX_CPUS, RT_ELEMENTS(pGip->aiCpuFromApicId)));
    19481944        return VERR_TOO_MANY_CPUS;
    19491945    }
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r81071 r81096  
    223223 *          - Move SUP_IOCTL_FAST_DO_NOP and SUP_VMMR0_DO_NEM_RUN after NEM.
    224224 */
    225 #define SUPDRV_IOC_VERSION                              0x002b0000
     225#define SUPDRV_IOC_VERSION                              0x002c0000
    226226
    227227/** SUP_IOCTL_COOKIE. */
  • trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp

    r76553 r81096  
    131131                SUPR3GipSetFlags(SUPGIP_FLAGS_TESTING_ENABLE, UINT32_MAX);
    132132
    133             RTPrintf("tstGIP-2: u32Mode=%d (%s)  fTestMode=%RTbool  u32Version=%#x  fGetGipCpu=%#RX32\n",
     133            RTPrintf("tstGIP-2: u32Mode=%d (%s)  fTestMode=%RTbool  u32Version=%#x  fGetGipCpu=%#RX32  cPages=%#RX32\n",
    134134                     g_pSUPGlobalInfoPage->u32Mode,
    135135                     SUPGetGIPModeName(g_pSUPGlobalInfoPage),
    136136                     fTestMode,
    137137                     g_pSUPGlobalInfoPage->u32Version,
    138                      g_pSUPGlobalInfoPage->fGetGipCpu);
     138                     g_pSUPGlobalInfoPage->fGetGipCpu,
     139                     g_pSUPGlobalInfoPage->cPages);
    139140            RTPrintf("tstGIP-2: cCpus=%d  cPossibleCpus=%d cPossibleCpuGroups=%d cPresentCpus=%d cOnlineCpus=%d idCpuMax=%#x\n",
    140141                     g_pSUPGlobalInfoPage->cCpus,
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r76553 r81096  
    104104
    105105/** Static per group info.
    106  * @remarks  With RTCPUSET_MAX_CPUS as 256, this takes up 33KB. */
     106 * @remarks  With 256 groups this takes up 33KB. */
    107107static struct
    108108{
     
    113113    /** CPU set indexes for each CPU in the group. */
    114114    int16_t     aidxCpuSetMembers[64];
    115 }                                       g_aRtMpNtCpuGroups[RTCPUSET_MAX_CPUS];
     115}                                       g_aRtMpNtCpuGroups[256];
    116116/** Maps CPU set indexes to RTCPUID.
    117117 * Inactive CPUs has bit 31 set (RTMPNT_ID_F_INACTIVE) so we can identify them
  • trunk/src/VBox/Runtime/r3/win/mp-win.cpp

    r76553 r81096  
    119119static uint32_t volatile g_cRtMpWinActiveCpus;
    120120/** Static per group info.
    121  * @remarks  With RTCPUSET_MAX_CPUS as 256, this takes up 33KB.
     121 * @remarks  With 256 entries this takes up 33KB.
    122122 * @sa g_aRtMpNtCpuGroups */
    123123static struct
     
    129129    /** CPU set indexes for each CPU in the group. */
    130130    int16_t     aidxCpuSetMembers[64];
    131 }                   g_aRtMpWinCpuGroups[RTCPUSET_MAX_CPUS];
     131}                   g_aRtMpWinCpuGroups[256];
    132132/** Maps CPU set indexes to RTCPUID.
    133133 * @sa g_aidRtMpNtByCpuSetIdx  */
     
    193193        SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX     Info;
    194194        uint8_t                                     abPaddingG[  sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)
    195                                                                + sizeof(PROCESSOR_GROUP_INFO) * RTCPUSET_MAX_CPUS];
     195                                                               + sizeof(PROCESSOR_GROUP_INFO) * 256];
    196196        uint8_t                                     abPaddingC[  sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX)
    197197                                                               +   (sizeof(PROCESSOR_RELATIONSHIP) + sizeof(GROUP_AFFINITY))
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