VirtualBox

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


Ignore:
Timestamp:
Feb 26, 2014 7:34:46 PM (11 years ago)
Author:
vboxsync
Message:

Implemented MSR 0x00000035 on i7, it reports threads and core counts on intel.

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

Legend:

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

    r50590 r50617  
    15161516{
    15171517    /** @todo Write EBL_CR_POWERON: Remember written bits. */
     1518    return VINF_SUCCESS;
     1519}
     1520
     1521
     1522/** @callback_method_impl{FNCPUMRDMSR} */
     1523static DECLCALLBACK(int) cpumMsrRd_IntelI7CoreThreadCount(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     1524{
     1525    /* Note! According to cpuid_set_info in XNU (10.7.0), Westmere CPU only
     1526             have a 4-bit core count. */
     1527    uint16_t cCores   = pVCpu->CTX_SUFF(pVM)->cCpus;
     1528    uint16_t cThreads = cCores; /** @todo hyper-threading. */
     1529    *puValue = RT_MAKE_U32(cThreads, cCores);
    15181530    return VINF_SUCCESS;
    15191531}
     
    44574469
    44584470    cpumMsrRd_IntelEblCrPowerOn,
     4471    cpumMsrRd_IntelI7CoreThreadCount,
    44594472    cpumMsrRd_IntelP4EbcHardPowerOn,
    44604473    cpumMsrRd_IntelP4EbcSoftPowerOn,
     
    51465159
    51475160    CPUM_ASSERT_RD_MSR_FN(IntelEblCrPowerOn);
     5161    CPUM_ASSERT_RD_MSR_FN(IntelI7CoreThreadCount);
    51485162    CPUM_ASSERT_RD_MSR_FN(IntelP4EbcHardPowerOn);
    51495163    CPUM_ASSERT_RD_MSR_FN(IntelP4EbcSoftPowerOn);
  • trunk/src/VBox/VMM/VMMR3/cpus/Intel_Core_i5_3570.h

    r50590 r50617  
    7070    MVX(0x00000033, "TEST_CTL", 0, 0, UINT64_C(0xffffffff7fffffff)),
    7171    MVO(0x00000034, "P6_UNK_0000_0034", 0x285),
    72     MVO(0x00000035, "P6_UNK_0000_0035", 0x40004),
     72    MFO(0x00000035, "MSR_CORE_THREAD_COUNT", IntelI7CoreThreadCount), /* value=0x40004*/
    7373    MVO(0x00000036, "I7_UNK_0000_0036", UINT64_C(0x1000000000105df2)),
    7474    MFO(0x0000003a, "IA32_FEATURE_CONTROL", Ia32FeatureControl), /* value=0x5 */
  • trunk/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3820QM.h

    r50590 r50617  
    7070    MVX(0x00000033, "TEST_CTL", 0, 0, UINT64_C(0xffffffff7fffffff)),
    7171    MVO(0x00000034, "P6_UNK_0000_0034", 0xe),
    72     MVO(0x00000035, "P6_UNK_0000_0035", 0x40008),
     72    MFO(0x00000035, "MSR_CORE_THREAD_COUNT", IntelI7CoreThreadCount), /* value=0x40008*/
    7373    MVO(0x00000036, "I7_UNK_0000_0036", 0x6c405eec),
    7474    MFO(0x0000003a, "IA32_FEATURE_CONTROL", Ia32FeatureControl), /* value=0xff07 */
  • trunk/src/VBox/VMM/VMMR3/cpus/Intel_Core_i7_3960X.h

    r50590 r50617  
    7979    MVX(0x00000033, "TEST_CTL", 0, 0, UINT64_C(0xffffffff7fffffff)),
    8080    MVO(0x00000034, "P6_UNK_0000_0034", 0x4cb),
    81     MVO(0x00000035, "P6_UNK_0000_0035", 0x6000c),
     81    MFO(0x00000035, "MSR_CORE_THREAD_COUNT", IntelI7CoreThreadCount), /* value=0x6000c*/
    8282    MFO(0x0000003a, "IA32_FEATURE_CONTROL", Ia32FeatureControl), /* value=0x5 */
    8383    MVX(0x0000003e, "I7_UNK_0000_003e", 0x1, 0, UINT64_C(0xfffffffffffffffe)),
  • trunk/src/VBox/VMM/include/CPUMInternal.h

    r50590 r50617  
    207207
    208208    kCpumMsrRdFn_IntelEblCrPowerOn,
     209    kCpumMsrRdFn_IntelI7CoreThreadCount,
    209210    kCpumMsrRdFn_IntelP4EbcHardPowerOn,
    210211    kCpumMsrRdFn_IntelP4EbcSoftPowerOn,
  • trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp

    r50590 r50617  
    627627        case 0x00000033: return "TEST_CTL";
    628628        case 0x00000034: return "P6_UNK_0000_0034"; /* P6_M_Dothan. */
    629         case 0x00000035: return "P6_UNK_0000_0035"; /* P6_M_Dothan. */
     629        case 0x00000035: return CPUMMICROARCH_IS_INTEL_CORE7(g_enmMicroarch) ? "MSR_CORE_THREAD_COUNT" : "P6_UNK_0000_0035"; /* P6_M_Dothan. */
    630630        case 0x00000036: return "I7_UNK_0000_0036"; /* SandyBridge, IvyBridge. */
    631631        case 0x00000039: return "C2_UNK_0000_0039"; /* Core2_Penryn */
     
    18101810        case 0x0000002c: *pfTakesValue = true; return g_fIntelNetBurst ? "IntelP4EbcFrequencyId" : NULL;
    18111811        //case 0x00000033: return "IntelTestCtl";
     1812        case 0x00000035: return CPUMMICROARCH_IS_INTEL_CORE7(g_enmMicroarch) ? "IntelI7CoreThreadCount" : NULL;
    18121813        case 0x0000003a: return "Ia32FeatureControl";
    18131814
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