Changeset 81096 in vbox
- Timestamp:
- Oct 1, 2019 7:29:03 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/sup.h
r81071 r81096 467 467 /** The TSC frequency of the system. */ 468 468 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;475 469 /** The number of CPUs that are online. */ 476 470 volatile uint16_t cOnlineCpus; … … 490 484 /** GIP flags, see SUPGIP_FLAGS_XXX. */ 491 485 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 492 501 493 502 /** Padding / reserved space for future data. */ 494 uint32_t au32Padding1[ 24];503 uint32_t au32Padding1[48]; 495 504 496 505 /** Table indexed by the CPU APIC ID to get the CPU table index. */ … … 514 523 } SUPGLOBALINFOPAGE; 515 524 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, u64NanoTSLastUpdateHz, 8); 516 #if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64) 525 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, OnlineCpuSet, 64); 526 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, PresentCpuSet, 64); 527 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, PossibleCpuSet, 64); 528 #if defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64) /* ?? needed ?? */ 517 529 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 32); 518 530 #else 519 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 256);531 AssertCompileMemberAlignment(SUPGLOBALINFOPAGE, aCPUs, 128); 520 532 #endif 521 533 -
trunk/include/VBox/sup.mac
r81071 r81096 76 76 .u64NanoTSLastUpdateHz resq 1 77 77 .u64CpuHz resq 1 78 .OnlineCpuSet resq 479 .PresentCpuSet resq 480 .PossibleCpuSet resq 481 78 .cOnlineCpus resw 1 82 79 .cPresentCpus resw 1 … … 87 84 .fGetGipCpu resd 1 88 85 .fFlags resd 1 89 .au32Padding1 resd 24 86 .OnlineCpuSet resq 16 87 .PresentCpuSet resq 16 88 .PossibleCpuSet resq 16 89 .au32Padding1 resd 48 90 90 .aiCpuFromApicId resw 1024 91 91 .aiCpuFromCpuSetIdx resw 1024 -
trunk/include/VBox/vmm/uvm.h
r76585 r81096 139 139 struct STAMUSERPERVM s; 140 140 #endif 141 uint8_t padding[ 6880];141 uint8_t padding[25056]; 142 142 } stam; 143 143 -
trunk/include/iprt/types.h
r80531 r81096 2393 2393 /** The maximum number of CPUs a set can contain and IPRT is able 2394 2394 * 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). */ 2396 2396 #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 2398 2404 #elif defined(RT_ARCH_SPARC) || defined(RT_ARCH_SPARC64) 2399 2405 # define RTCPUSET_MAX_CPUS 1024 -
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r81075 r81096 1939 1939 */ 1940 1940 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))); 1948 1944 return VERR_TOO_MANY_CPUS; 1949 1945 } -
trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h
r81071 r81096 223 223 * - Move SUP_IOCTL_FAST_DO_NOP and SUP_VMMR0_DO_NEM_RUN after NEM. 224 224 */ 225 #define SUPDRV_IOC_VERSION 0x002 b0000225 #define SUPDRV_IOC_VERSION 0x002c0000 226 226 227 227 /** SUP_IOCTL_COOKIE. */ -
trunk/src/VBox/HostDrivers/Support/testcase/tstGIP-2.cpp
r76553 r81096 131 131 SUPR3GipSetFlags(SUPGIP_FLAGS_TESTING_ENABLE, UINT32_MAX); 132 132 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", 134 134 g_pSUPGlobalInfoPage->u32Mode, 135 135 SUPGetGIPModeName(g_pSUPGlobalInfoPage), 136 136 fTestMode, 137 137 g_pSUPGlobalInfoPage->u32Version, 138 g_pSUPGlobalInfoPage->fGetGipCpu); 138 g_pSUPGlobalInfoPage->fGetGipCpu, 139 g_pSUPGlobalInfoPage->cPages); 139 140 RTPrintf("tstGIP-2: cCpus=%d cPossibleCpus=%d cPossibleCpuGroups=%d cPresentCpus=%d cOnlineCpus=%d idCpuMax=%#x\n", 140 141 g_pSUPGlobalInfoPage->cCpus, -
trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp
r76553 r81096 104 104 105 105 /** 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. */ 107 107 static struct 108 108 { … … 113 113 /** CPU set indexes for each CPU in the group. */ 114 114 int16_t aidxCpuSetMembers[64]; 115 } g_aRtMpNtCpuGroups[ RTCPUSET_MAX_CPUS];115 } g_aRtMpNtCpuGroups[256]; 116 116 /** Maps CPU set indexes to RTCPUID. 117 117 * 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 119 119 static uint32_t volatile g_cRtMpWinActiveCpus; 120 120 /** 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. 122 122 * @sa g_aRtMpNtCpuGroups */ 123 123 static struct … … 129 129 /** CPU set indexes for each CPU in the group. */ 130 130 int16_t aidxCpuSetMembers[64]; 131 } g_aRtMpWinCpuGroups[ RTCPUSET_MAX_CPUS];131 } g_aRtMpWinCpuGroups[256]; 132 132 /** Maps CPU set indexes to RTCPUID. 133 133 * @sa g_aidRtMpNtByCpuSetIdx */ … … 193 193 SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX Info; 194 194 uint8_t abPaddingG[ sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) 195 + sizeof(PROCESSOR_GROUP_INFO) * RTCPUSET_MAX_CPUS];195 + sizeof(PROCESSOR_GROUP_INFO) * 256]; 196 196 uint8_t abPaddingC[ sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) 197 197 + (sizeof(PROCESSOR_RELATIONSHIP) + sizeof(GROUP_AFFINITY))
Note:
See TracChangeset
for help on using the changeset viewer.