Changeset 54740 in vbox for trunk/src/VBox
- Timestamp:
- Mar 12, 2015 11:12:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r54739 r54740 1961 1961 bool fNt4LeafLimit; 1962 1962 bool fInvariantTsc; 1963 uint32_t uMaxStdLeaf; 1964 uint32_t uMaxExtLeaf; 1965 uint32_t uMaxCentaurLeaf; 1963 1966 uint32_t uMaxIntelFamilyModelStep; 1964 1967 char szCpuName[128]; … … 2065 2068 if (uLimit <= UINT32_C(0x000fffff)) 2066 2069 { 2067 /** @todo raise the limits! */ 2068 if (pCurLeaf->uEax > 5) 2070 if (uLimit > pConfig->uMaxStdLeaf) 2069 2071 { 2070 pCurLeaf->uEax = uLimit = 5;2072 pCurLeaf->uEax = uLimit = pConfig->uMaxStdLeaf; 2071 2073 cpumR3CpuIdRemoveRange(pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, 2072 2074 uLimit + 1, UINT32_C(0x000fffff)); … … 2099 2101 && uLimit <= UINT32_C(0x800fffff)) 2100 2102 { 2101 /** @todo raise the limits! */ 2102 if (pCurLeaf->uEax > UINT32_C(0x80000008)) 2103 if (uLimit > pConfig->uMaxExtLeaf) 2103 2104 { 2104 pCurLeaf->uEax = uLimit = UINT32_C(0x80000008);2105 pCurLeaf->uEax = uLimit = pConfig->uMaxExtLeaf; 2105 2106 cpumR3CpuIdRemoveRange(pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, 2106 2107 uLimit + 1, UINT32_C(0x800fffff)); 2108 while ((pCurLeaf = cpumR3CpuIdGetExactLeaf(pCpum, UINT32_C(0x80000000), ++uSubLeaf)) != NULL) 2109 pCurLeaf->uEax = uLimit; 2107 2110 } 2108 2109 while ((pCurLeaf = cpumR3CpuIdGetExactLeaf(pCpum, UINT32_C(0x80000000), ++uSubLeaf)) != NULL)2110 pCurLeaf->uEax = uLimit;2111 2111 } 2112 2112 else … … 2129 2129 && uLimit <= UINT32_C(0xc00fffff)) 2130 2130 { 2131 pCurLeaf->uEax = RT_MIN(uLimit, UINT32_C(0xc0000004)); 2132 cpumR3CpuIdRemoveRange(pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, 2133 uLimit + 1, UINT32_C(0xcfffffff)); 2134 2135 while ((pCurLeaf = cpumR3CpuIdGetExactLeaf(pCpum, UINT32_C(0xc0000000), ++uSubLeaf)) != NULL) 2136 pCurLeaf->uEax = uLimit; 2131 if (uLimit > pConfig->uMaxCentaurLeaf) 2132 { 2133 pCurLeaf->uEax = uLimit = pConfig->uMaxCentaurLeaf; 2134 cpumR3CpuIdRemoveRange(pCpum->GuestInfo.paCpuIdLeavesR3, &pCpum->GuestInfo.cCpuIdLeaves, 2135 uLimit + 1, UINT32_C(0xcfffffff)); 2136 while ((pCurLeaf = cpumR3CpuIdGetExactLeaf(pCpum, UINT32_C(0xc0000000), ++uSubLeaf)) != NULL) 2137 pCurLeaf->uEax = uLimit; 2138 } 2137 2139 } 2138 2140 else … … 3167 3169 AssertLogRelRCReturn(rc, rc); 3168 3170 3171 /** @cfgm{/CPUM/MaxStdLeaf, uint32_t, 0x00000005} 3172 * The last standard leaf to keep. The actual last value that is stored in EAX 3173 * is RT_MAX(CPUID[0].EAX,/CPUM/MaxStdLeaf). Leaves beyond the max leaf are 3174 * removed. (This works independently of and differently from NT4LeafLimit.) 3175 */ 3176 rc = CFGMR3QueryU32Def(pCpumCfg, "MaxStdLeaf", &pConfig->uMaxStdLeaf, UINT32_C(0x00000005)); 3177 AssertLogRelRCReturn(rc, rc); 3178 3179 /** @cfgm{/CPUM/MaxExtLeaf, uint32_t, 0x80000008} 3180 * The last extended leaf to keep. The actual last value that is stored in EAX 3181 * is RT_MAX(CPUID[0x80000000].EAX,/CPUM/MaxStdLeaf). Leaves beyond the max 3182 * leaf are removed. 3183 */ 3184 rc = CFGMR3QueryU32Def(pCpumCfg, "MaxExtLeaf", &pConfig->uMaxExtLeaf, UINT32_C(0x80000008)); 3185 AssertLogRelRCReturn(rc, rc); 3186 3187 /** @cfgm{/CPUM/MaxCentaurLeaf, uint32_t, 0xc0000004} 3188 * The last extended leaf to keep. The actual last value that is stored in EAX 3189 * is RT_MAX(CPUID[0xc0000000].EAX,/CPUM/MaxCentaurLeaf). Leaves beyond the max 3190 * leaf are removed. 3191 */ 3192 rc = CFGMR3QueryU32Def(pCpumCfg, "MaxCentaurLeaf", &pConfig->uMaxCentaurLeaf, UINT32_C(0xc0000004)); 3193 AssertLogRelRCReturn(rc, rc); 3194 3169 3195 return VINF_SUCCESS; 3170 3196 }
Note:
See TracChangeset
for help on using the changeset viewer.