VirtualBox

Changeset 49927 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 16, 2013 12:17:39 PM (11 years ago)
Author:
vboxsync
Message:

VMM: Mapped the MSRs for a core 2 penryn cpu.

Location:
trunk/src/VBox/VMM
Files:
1 added
5 edited

Legend:

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

    r49899 r49927  
    23652365{
    23662366    /** @todo uncore msrs.  */
     2367    return VINF_SUCCESS;
     2368}
     2369
     2370
     2371/** @callback_method_impl{FNCPUMRDMSR} */
     2372static DECLCALLBACK(int) cpumMsrRd_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2373{
     2374    /** @todo implement enhanced multi thread termal monitoring? */
     2375    *puValue = pRange->uInitOrReadValue;
     2376    return VINF_SUCCESS;
     2377}
     2378
     2379
     2380/** @callback_method_impl{FNCPUMWRMSR} */
     2381static DECLCALLBACK(int) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2382{
     2383    /** @todo implement enhanced multi thread termal monitoring? */
     2384    return VINF_SUCCESS;
     2385}
     2386
     2387
     2388/** @callback_method_impl{FNCPUMRDMSR} */
     2389static DECLCALLBACK(int) cpumMsrRd_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2390{
     2391    /** @todo SMM & C-states? */
     2392    *puValue = 0;
     2393    return VINF_SUCCESS;
     2394}
     2395
     2396
     2397/** @callback_method_impl{FNCPUMWRMSR} */
     2398static DECLCALLBACK(int) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2399{
     2400    /** @todo SMM & C-states? */
     2401    return VINF_SUCCESS;
     2402}
     2403
     2404
     2405/** @callback_method_impl{FNCPUMRDMSR} */
     2406static DECLCALLBACK(int) cpumMsrRd_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2407{
     2408    /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
     2409    *puValue = 0;
     2410    return VINF_SUCCESS;
     2411}
     2412
     2413
     2414/** @callback_method_impl{FNCPUMWRMSR} */
     2415static DECLCALLBACK(int) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2416{
     2417    /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
     2418    return VINF_SUCCESS;
     2419}
     2420
     2421
     2422/** @callback_method_impl{FNCPUMRDMSR} */
     2423static DECLCALLBACK(int) cpumMsrRd_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2424{
     2425    /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
     2426    *puValue = 0;
     2427    return VINF_SUCCESS;
     2428}
     2429
     2430
     2431/** @callback_method_impl{FNCPUMWRMSR} */
     2432static DECLCALLBACK(int) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2433{
     2434    /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
     2435    return VINF_SUCCESS;
     2436}
     2437
     2438
     2439/** @callback_method_impl{FNCPUMRDMSR} */
     2440static DECLCALLBACK(int) cpumMsrRd_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     2441{
     2442    /** @todo Core2+ platform environment control interface control register? */
     2443    *puValue = 0;
     2444    return VINF_SUCCESS;
     2445}
     2446
     2447
     2448/** @callback_method_impl{FNCPUMWRMSR} */
     2449static DECLCALLBACK(int) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2450{
     2451    /** @todo Core2+ platform environment control interface control register? */
    23672452    return VINF_SUCCESS;
    23682453}
     
    41924277    cpumMsrRd_IntelI7UncArbPerfCtrN,
    41934278    cpumMsrRd_IntelI7UncArbPerfEvtSelN,
     4279    cpumMsrRd_IntelCore2EmttmCrTablesN,
     4280    cpumMsrRd_IntelCore2SmmCStMiscInfo,
     4281    cpumMsrRd_IntelCore1ExtConfig,
     4282    cpumMsrRd_IntelCore1DtsCalControl,
     4283    cpumMsrRd_IntelCore2PeciControl,
    41944284
    41954285    cpumMsrRd_P6LastBranchFromIp,
     
    43964486    cpumMsrWr_IntelI7UncArbPerfCtrN,
    43974487    cpumMsrWr_IntelI7UncArbPerfEvtSelN,
     4488    cpumMsrWr_IntelCore2EmttmCrTablesN,
     4489    cpumMsrWr_IntelCore2SmmCStMiscInfo,
     4490    cpumMsrWr_IntelCore1ExtConfig,
     4491    cpumMsrWr_IntelCore1DtsCalControl,
     4492    cpumMsrWr_IntelCore2PeciControl,
    43984493
    43994494    cpumMsrWr_P6LastIntFromIp,
     
    48224917    CPUM_ASSERT_RD_MSR_FN(IntelI7UncArbPerfCtrN);
    48234918    CPUM_ASSERT_RD_MSR_FN(IntelI7UncArbPerfEvtSelN);
     4919    CPUM_ASSERT_RD_MSR_FN(IntelCore2EmttmCrTablesN);
     4920    CPUM_ASSERT_RD_MSR_FN(IntelCore2SmmCStMiscInfo);
     4921    CPUM_ASSERT_RD_MSR_FN(IntelCore1ExtConfig);
     4922    CPUM_ASSERT_RD_MSR_FN(IntelCore1DtsCalControl);
     4923    CPUM_ASSERT_RD_MSR_FN(IntelCore2PeciControl);
    48244924
    48254925    CPUM_ASSERT_RD_MSR_FN(P6LastBranchFromIp);
     
    50155115    CPUM_ASSERT_WR_MSR_FN(IntelI7UncArbPerfCtrN);
    50165116    CPUM_ASSERT_WR_MSR_FN(IntelI7UncArbPerfEvtSelN);
     5117    CPUM_ASSERT_WR_MSR_FN(IntelCore2EmttmCrTablesN);
     5118    CPUM_ASSERT_WR_MSR_FN(IntelCore2SmmCStMiscInfo);
     5119    CPUM_ASSERT_WR_MSR_FN(IntelCore1ExtConfig);
     5120    CPUM_ASSERT_WR_MSR_FN(IntelCore1DtsCalControl);
     5121    CPUM_ASSERT_WR_MSR_FN(IntelCore2PeciControl);
    50175122
    50185123    CPUM_ASSERT_WR_MSR_FN(P6LastIntFromIp);
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r49915 r49927  
    38183818            if (uECX & RT_BIT(29))  pHlp->pfnPrintf(pHlp, " 29");
    38193819            if (uECX & RT_BIT(30))  pHlp->pfnPrintf(pHlp, " 30");
    3820             if (uECX & RT_BIT(31))  pHlp->pfnPrintf(pHlp, " 31");
     3820            if (uECX & RT_BIT(31))  pHlp->pfnPrintf(pHlp, " HVP");
    38213821            pHlp->pfnPrintf(pHlp, "\n");
    38223822        }
  • trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp

    r49899 r49927  
    176176#include "cpus/Intel_Core_i7_3960X.h"
    177177#include "cpus/Intel_Core_i5_3570.h"
     178#include "cpus/Intel_Xeon_X5482_3_20GHz.h"
    178179
    179180#include "cpus/AMD_FX_8150_Eight_Core.h"
     
    198199#ifdef Intel_Pentium_M_processor_2_00GHz
    199200    &g_Entry_Intel_Pentium_M_processor_2_00GHz,
     201#endif
     202#ifdef VBOX_CPUDB_Intel_Xeon_X5482_3_20GHz
     203    &g_Entry_Intel_Xeon_X5482_3_20GHz,
    200204#endif
    201205#ifdef VBOX_CPUDB_AMD_FX_8150_Eight_Core
  • trunk/src/VBox/VMM/include/CPUMInternal.h

    r49899 r49927  
    265265    kCpumMsrRdFn_IntelI7UncArbPerfCtrN,
    266266    kCpumMsrRdFn_IntelI7UncArbPerfEvtSelN,
     267    kCpumMsrRdFn_IntelCore2EmttmCrTablesN,  /**< Range value returned. */
     268    kCpumMsrRdFn_IntelCore2SmmCStMiscInfo,
     269    kCpumMsrRdFn_IntelCore1ExtConfig,
     270    kCpumMsrRdFn_IntelCore1DtsCalControl,
     271    kCpumMsrRdFn_IntelCore2PeciControl,
    267272
    268273    kCpumMsrRdFn_P6LastBranchFromIp,
     
    477482    kCpumMsrWrFn_IntelI7UncArbPerfCtrN,
    478483    kCpumMsrWrFn_IntelI7UncArbPerfEvtSelN,
     484    kCpumMsrWrFn_IntelCore2EmttmCrTablesN,
     485    kCpumMsrWrFn_IntelCore2SmmCStMiscInfo,
     486    kCpumMsrWrFn_IntelCore1ExtConfig,
     487    kCpumMsrWrFn_IntelCore1DtsCalControl,
     488    kCpumMsrWrFn_IntelCore2PeciControl,
    479489
    480490    kCpumMsrWrFn_P6LastIntFromIp,
  • trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp

    r49899 r49927  
    575575        case 0x00000018: return "P6_UNK_0000_0018"; /* P6_M_Dothan. */
    576576        case 0x0000001b: return "IA32_APIC_BASE";
     577        case 0x00000021: return "C2_UNK_0000_0021"; /* Core2_Penryn */
    577578        case 0x0000002a: return "EBL_CR_POWERON";
    578579        case 0x0000002e: return "I7_UNK_0000_002e"; /* SandyBridge, IvyBridge. */
     
    583584        case 0x00000035: return "P6_UNK_0000_0035"; /* P6_M_Dothan. */
    584585        case 0x00000036: return "I7_UNK_0000_0036"; /* SandyBridge, IvyBridge. */
     586        case 0x00000039: return "C2_UNK_0000_0039"; /* Core2_Penryn */
    585587        case 0x0000003a: return "IA32_FEATURE_CONTROL";
    586588        case 0x0000003b: return "P6_UNK_0000_003b"; /* P6_M_Dothan. */
    587589        case 0x0000003e: return "I7_UNK_0000_003e"; /* SandyBridge, IvyBridge. */
    588590        case 0x0000003f: return "P6_UNK_0000_003f"; /* P6_M_Dothan. */
    589         case 0x00000040: return "MSR_LASTBRANCH_0";
    590         case 0x00000041: return "MSR_LASTBRANCH_1";
    591         case 0x00000042: return "MSR_LASTBRANCH_2";
    592         case 0x00000043: return "MSR_LASTBRANCH_3";
    593         case 0x00000044: return "MSR_LASTBRANCH_4";
    594         case 0x00000045: return "MSR_LASTBRANCH_5";
    595         case 0x00000046: return "MSR_LASTBRANCH_6";
    596         case 0x00000047: return "MSR_LASTBRANCH_7";
    597         case 0x00000048: return "MSR_LASTBRANCH_8";
    598         case 0x00000049: return "MSR_LASTBRANCH_9";
     591        case 0x00000040: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_0_FROM_IP" : "MSR_LASTBRANCH_0";
     592        case 0x00000041: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_1_FROM_IP" : "MSR_LASTBRANCH_1";
     593        case 0x00000042: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_2_FROM_IP" : "MSR_LASTBRANCH_2";
     594        case 0x00000043: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_3_FROM_IP" : "MSR_LASTBRANCH_3";
     595        case 0x00000044: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_4_FROM_IP" : "MSR_LASTBRANCH_4";
     596        case 0x00000045: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_5_FROM_IP" : "MSR_LASTBRANCH_5";
     597        case 0x00000046: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_6_FROM_IP" : "MSR_LASTBRANCH_6";
     598        case 0x00000047: return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_7_FROM_IP" : "MSR_LASTBRANCH_7";
     599        case 0x00000048: return "MSR_LASTBRANCH_8"; /*??*/
     600        case 0x00000049: return "MSR_LASTBRANCH_9"; /*??*/
    599601        case 0x0000004a: return "P6_UNK_0000_004a"; /* P6_M_Dothan. */
    600602        case 0x0000004b: return "P6_UNK_0000_004b"; /* P6_M_Dothan. */
     
    608610        case 0x00000053: return "P6_UNK_0000_0053"; /* P6_M_Dothan. */
    609611        case 0x00000054: return "P6_UNK_0000_0054"; /* P6_M_Dothan. */
     612        case 0x00000060: return "MSR_LASTBRANCH_0_TO_IP"; /* Core2_Penryn */
     613        case 0x00000061: return "MSR_LASTBRANCH_1_TO_IP"; /* Core2_Penryn */
     614        case 0x00000062: return "MSR_LASTBRANCH_2_TO_IP"; /* Core2_Penryn */
     615        case 0x00000063: return "MSR_LASTBRANCH_3_TO_IP"; /* Core2_Penryn */
     616        case 0x00000064: return "MSR_LASTBRANCH_4_TO_IP"; /* Atom? */
     617        case 0x00000065: return "MSR_LASTBRANCH_5_TO_IP";
     618        case 0x00000066: return "MSR_LASTBRANCH_6_TO_IP";
     619        case 0x00000067: return "MSR_LASTBRANCH_7_TO_IP";
    610620        case 0x0000006c: return "P6_UNK_0000_006c"; /* P6_M_Dothan. */
    611621        case 0x0000006d: return "P6_UNK_0000_006d"; /* P6_M_Dothan. */
     
    623633        case 0x00000090: return "P6_UNK_0000_0090"; /* P6_M_Dothan. */
    624634        case 0x0000009b: return "IA32_SMM_MONITOR_CTL";
     635        case 0x000000a8: return "C2_EMTTM_CR_TABLES_0";
     636        case 0x000000a9: return "C2_EMTTM_CR_TABLES_1";
     637        case 0x000000aa: return "C2_EMTTM_CR_TABLES_2";
     638        case 0x000000ab: return "C2_EMTTM_CR_TABLES_3";
     639        case 0x000000ac: return "C2_EMTTM_CR_TABLES_4";
     640        case 0x000000ad: return "C2_EMTTM_CR_TABLES_5";
    625641        case 0x000000ae: return "P6_UNK_0000_00ae"; /* P6_M_Dothan. */
    626642        case 0x000000c1: return "IA32_PMC0";
     
    636652        case 0x000000cd: return "P6_UNK_0000_00cd"; /* P6_M_Dothan. */
    637653        case 0x000000ce: return "P6_UNK_0000_00ce"; /* P6_M_Dothan. */
     654        case 0x000000cf: return "C2_UNK_0000_00cf"; /* Core2_Penryn. */
     655        case 0x000000e0: return "C2_UNK_0000_00e0"; /* Core2_Penryn. */
     656        case 0x000000e1: return "C2_UNK_0000_00e1"; /* Core2_Penryn. */
    638657        case 0x000000e2: return "MSR_PKG_CST_CONFIG_CONTROL";
     658        case 0x000000e3: return "C2_SMM_CST_MISC_INFO"; /* Core2_Penryn. */
    639659        case 0x000000e4: return "MSR_PMG_IO_CAPTURE_BASE";
     660        case 0x000000e5: return "C2_UNK_0000_00e5"; /* Core2_Penryn. */
    640661        case 0x000000e7: return "IA32_MPERF";
    641662        case 0x000000e8: return "IA32_APERF";
     663        case 0x000000ee: return "C1_EXT_CONFIG"; /* Core2_Penryn. msrtool lists it for Core1 as well. */
    642664        case 0x000000fe: return "IA32_MTRRCAP";
    643665        case 0x00000102: return "I7_IB_UNK_0000_0102"; /* IvyBridge. */
     
    649671        case 0x0000011a: return "BBL_CR_TRIG";
    650672        case 0x0000011b: return "P6_UNK_0000_011b"; /* P6_M_Dothan. */
     673        case 0x0000011c: return "C2_UNK_0000_011c"; /* Core2_Penryn. */
    651674        case 0x0000011e: return "BBL_CR_CTL3";
    652675        case 0x00000130: return g_enmMicroarch == kCpumMicroarch_Intel_Core7_Westmere
     
    671694        case 0x00000154: return "P6_UNK_0000_0154"; /* P6_M_Dothan. */
    672695        case 0x0000015b: return "P6_UNK_0000_015b"; /* P6_M_Dothan. */
     696        case 0x0000015e: return "C2_UNK_0000_015e"; /* Core2_Penryn. */
     697        case 0x0000015f: return "C1_DTS_CAL_CTRL"; /* Core2_Penryn. msrtool only docs this for core1! */
    673698        case 0x00000174: return "IA32_SYSENTER_CS";
    674699        case 0x00000175: return "IA32_SYSENTER_ESP";
     
    697722        case 0x00000191: return g_fIntelNetBurst ? "MSR_MCG_R9"        : NULL;
    698723        case 0x00000192: return g_fIntelNetBurst ? "MSR_MCG_R10"       : NULL;
    699         case 0x00000193: return g_fIntelNetBurst ? "MSR_MCG_R11"       : NULL;
     724        case 0x00000193: return g_fIntelNetBurst ? "MSR_MCG_R11"       : "C2_UNK_0000_0193";
    700725        case 0x00000194: return g_fIntelNetBurst ? "MSR_MCG_R12"       : "CLOCK_FLEX_MAX";
    701726        case 0x00000195: return g_fIntelNetBurst ? "MSR_MCG_R13"       : NULL;
     
    724749        case 0x000001b1: return "IA32_PACKAGE_THERM_STATUS";
    725750        case 0x000001b2: return "IA32_PACKAGE_THERM_INTERRUPT";
     751        case 0x000001bf: return "C2_UNK_0000_01bf"; /* Core2_Penryn. */
    726752        case 0x000001c6: return "I7_UNK_0000_01c6"; /* SandyBridge*/
    727753        case 0x000001c8: return g_enmMicroarch >= kCpumMicroarch_Intel_Core7_Nehalem ? "MSR_LBR_SELECT" : NULL;
     
    870896        case 0x000003fd: return "I7_MSR_CORE_C6_RESIDENCY";
    871897        case 0x000003fe: return "I7_MSR_CORE_C7_RESIDENCY";
    872         case 0x00000478: g_enmMicroarch == kCpumMicroarch_Intel_Core2_Penryn ? "CPUID1_FEATURE_MASK" : NULL;
     898        case 0x00000478: return g_enmMicroarch == kCpumMicroarch_Intel_Core2_Penryn ? "CPUID1_FEATURE_MASK" : NULL;
    873899        case 0x00000480: return "IA32_VMX_BASIC";
    874900        case 0x00000481: return "IA32_VMX_PINBASED_CTLS";
     
    896922        case 0x000004c7: return "IA32_A_PMC6";
    897923        case 0x000004c8: return "IA32_A_PMC7";
     924        case 0x000004f8: return "C2_UNK_0000_04f8"; /* Core2_Penryn. */
     925        case 0x000004f9: return "C2_UNK_0000_04f9"; /* Core2_Penryn. */
     926        case 0x000004fa: return "C2_UNK_0000_04fa"; /* Core2_Penryn. */
     927        case 0x000004fb: return "C2_UNK_0000_04fb"; /* Core2_Penryn. */
     928        case 0x000004fc: return "C2_UNK_0000_04fc"; /* Core2_Penryn. */
     929        case 0x000004fd: return "C2_UNK_0000_04fd"; /* Core2_Penryn. */
     930        case 0x000004fe: return "C2_UNK_0000_04fe"; /* Core2_Penryn. */
     931        case 0x000004ff: return "C2_UNK_0000_04ff"; /* Core2_Penryn. */
    898932        case 0x00000502: return "I7_SB_UNK_0000_0502";
     933        case 0x00000590: return "C2_UNK_0000_0590"; /* Core2_Penryn. */
     934        case 0x00000591: return "C2_UNK_0000_0591"; /* Core2_Penryn. */
     935        case 0x000005a0: return "C2_PECI_CTL"; /* Core2_Penryn. */
     936        case 0x000005a1: return "C2_UNK_0000_05a1"; /* Core2_Penryn. */
    899937        case 0x00000600: return "IA32_DS_AREA";
    900938        case 0x00000601: return "I7_SB_MSR_VR_CURRENT_CONFIG"; /* SandyBridge, IvyBridge. */
     
    14021440    switch (uMsr)
    14031441    {
     1442        case 0x00000040:
     1443            return g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah ? "MSR_LASTBRANCH_n_FROM_IP" : "MSR_LASTBRANCH_n";
     1444        case 0x00000060:
     1445            if (g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah)
     1446                return "MSR_LASTBRANCH_n_TO_IP";
     1447            break;
     1448
    14041449        case 0x000003f8:
    14051450        case 0x000003f9:
     
    14961541        case 0x0000009b: return "Ia32SmmMonitorCtl";
    14971542
     1543        case 0x000000a8:
     1544        case 0x000000a9:
     1545        case 0x000000aa:
     1546        case 0x000000ab:
     1547        case 0x000000ac:
     1548        case 0x000000ad:
     1549            *pfTakesValue = true;
     1550            return "IntelCore2EmttmCrTablesN";
     1551
    14981552        case 0x000000c1:
    14991553        case 0x000000c2:
     
    15101564
    15111565        case 0x000000e2: return "IntelPkgCStConfigControl";
     1566        case 0x000000e3: return "IntelCore2SmmCStMiscInfo";
    15121567        case 0x000000e4: return "IntelPmgIoCaptureBase";
    15131568        case 0x000000e7: return "Ia32MPerf";
    15141569        case 0x000000e8: return "Ia32APerf";
     1570        case 0x000000ee: return "IntelCore1ExtConfig";
    15151571        case 0x000000fe: *pfTakesValue = true; return "Ia32MtrrCap";
    15161572        case 0x00000119: *pfTakesValue = true; return "IntelBblCrCtl";
     
    15301586                              ? "IntelCpuId80000001FeatureMaskEcdx" : NULL;
    15311587        case 0x0000013c: return "IntelI7SandyAesNiCtl";
     1588        case 0x0000015f: return "IntelCore1DtsCalControl";
    15321589        case 0x00000174: return "Ia32SysEnterCs";
    15331590        case 0x00000175: return "Ia32SysEnterEsp";
     
    15391596        case 0x00000186: return "Ia32PerfEvtSelN";
    15401597        case 0x00000187: return "Ia32PerfEvtSelN";
     1598        case 0x00000193: return CPUMMICROARCH_IS_INTEL_NETBURST(g_enmMicroarch) ? NULL : NULL /* Core2_Penryn. */;
    15411599        case 0x00000198: *pfTakesValue = true; return "Ia32PerfStatus";
    15421600        case 0x00000199: *pfTakesValue = true; return "Ia32PerfCtl";
     
    16301688        case 0x000003fe: return "IntelI7CoreCnResidencyN";
    16311689
    1632         case 0x00000478: g_enmMicroarch == kCpumMicroarch_Intel_Core2_Penryn ? "IntelCpuId1FeatureMaskEcdx" : NULL;
     1690        case 0x00000478: return g_enmMicroarch == kCpumMicroarch_Intel_Core2_Penryn ? "IntelCpuId1FeatureMaskEcdx" : NULL;
    16331691        case 0x00000480: *pfTakesValue = true; return "Ia32VmxBase";
    16341692        case 0x00000481: *pfTakesValue = true; return "Ia32VmxPinbasedCtls";
     
    16581716        case 0x000004c8:
    16591717            return "Ia32PmcN";
     1718
     1719        case 0x000005a0: return "IntelCore2PeciControl"; /* Core2_Penryn. */
    16601720
    16611721        case 0x00000600: return "Ia32DsArea";
     
    17061766        //case 0x000006d8: case 0x000006d9: case 0x000006da: case 0x000006db:
    17071767        //case 0x000006dc: case 0x000006dd: case 0x000006de: case 0x000006df:
    1708             return "IntelLastBranchFromN";
     1768            return "IntelLastBranchToN";
    17091769        case 0x000006e0: return "Ia32TscDeadline"; /** @todo detect this correctly! */
    17101770
     
    19582018            return UINT64_C(0xffff800000000000);
    19592019
     2020        case 0x00000060: case 0x00000061: case 0x00000062: case 0x00000063:
     2021        case 0x00000064: case 0x00000065: case 0x00000066: case 0x00000067:
     2022        case 0x00000040: case 0x00000041: case 0x00000042: case 0x00000043:
     2023        case 0x00000044: case 0x00000045: case 0x00000046: case 0x00000047:
     2024            if (g_enmMicroarch >= kCpumMicroarch_Intel_Core2_First)
     2025                return UINT64_C(0xffff800000000000);
     2026            break;
     2027
    19602028        /* Time counters - fudge them to avoid incorrect ignore masks. */
    19612029        case 0x00000010:
     
    24912559
    24922560static int reportMsr_GenRangeFunctionEx(VBCPUREPMSR const *paMsrs, uint32_t cMsrs, uint32_t cMax, const char *pszRdWrFnName,
    2493                                         uint32_t uMsrBase, bool fEarlyEndOk, uint64_t fSkipMask, uint32_t *pidxLoop)
     2561                                        uint32_t uMsrBase, bool fEarlyEndOk, bool fNoIgnMask, uint64_t fSkipMask, uint32_t *pidxLoop)
    24942562{
    24952563    uint32_t uMsr   = paMsrs[0].uMsr;
     
    25312599            return rc;
    25322600        if (   fReadOnlyN != fReadOnly0
    2533             || fIgnMaskN  != fIgnMask0
     2601            || (fIgnMaskN != fIgnMask0 && !fNoIgnMask)
    25342602            || fGpMaskN   != fGpMask0)
    25352603        {
     
    25512619    *pidxLoop += cRegs - 1;
    25522620
    2553     bool     fSimple = fIgnMask0 == 0
    2554                     && (fGpMask0 == 0 || (fGpMask0 == UINT64_MAX && fReadOnly0))
    2555                     && iRange == 0;
     2621    if (fNoIgnMask)
     2622        fIgnMask0 = 0;
     2623    bool fSimple = fIgnMask0 == 0
     2624                && (fGpMask0 == 0 || (fGpMask0 == UINT64_MAX && fReadOnly0))
     2625                && iRange == 0;
    25562626    if (cRegs == 1)
    25572627        return printMsrFunctionExtendedIdxVal(uMsr, pszRdWrFnName, fReadOnly0 ? "ReadOnly" : pszRdWrFnName,
     
    25702640                                      uint32_t *pidxLoop)
    25712641{
    2572     return reportMsr_GenRangeFunctionEx(paMsrs, cMsrs, cMax, pszRdWrFnName, paMsrs[0].uMsr, false /*fEarlyEndOk*/,
     2642    return reportMsr_GenRangeFunctionEx(paMsrs, cMsrs, cMax, pszRdWrFnName, paMsrs[0].uMsr, false /*fEarlyEndOk*/, false /*fNoIgnMask*/,
    25732643                                        getGenericSkipMask(paMsrs[0].uMsr), pidxLoop);
    25742644}
     
    34193489        else if (uMsr == 0x0000001b)
    34203490            rc = reportMsr_Ia32ApicBase(uMsr, uValue);
     3491        else if (uMsr == 0x00000040 && g_enmMicroarch <= kCpumMicroarch_Intel_P6_M_Dothan)
     3492            rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 8 /*cMax*/, "IntelLastBranchFromToN", &i);
    34213493        else if (uMsr == 0x00000040)
    3422             rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 8 /*cMax*/, "IntelLastBranchFromToN", &i);
     3494            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8 /*cMax*/, "IntelLastBranchToN", uMsr, false,
     3495                                              true, getGenericSkipMask(uMsr), &i);
     3496        else if (uMsr == 0x00000060 && g_enmMicroarch >= kCpumMicroarch_Intel_Core_Yonah)
     3497            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8 /*cMax*/, "IntelLastBranchFromN", uMsr, false,
     3498                                              true, getGenericSkipMask(uMsr), &i);
    34233499        else if (uMsr == 0x000000c1)
    34243500            rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i,
     
    34363512            rc = reportMsr_Ia32MtrrFixedOrPat(uMsr);
    34373513        else if (uMsr >= 0x00000280 && uMsr <= 0x00000295)
    3438             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 22 /*cMax*/, NULL, 0x00000280, true /*fEarlyEndOk*/, 0, &i);
     3514            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 22 /*cMax*/, NULL, 0x00000280, true /*fEarlyEndOk*/, false, 0, &i);
    34393515        else if (uMsr == 0x000002ff)
    34403516            rc = reportMsr_Ia32MtrrDefType(uMsr);
    34413517        else if (uMsr >= 0x00000309 && uMsr <= 0x0000030b)
    3442             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 3 /*cMax*/, NULL, 0x00000309, true /*fEarlyEndOk*/, 0, &i);
     3518            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 3 /*cMax*/, NULL, 0x00000309, true /*fEarlyEndOk*/, false, 0, &i);
    34433519        else if (uMsr == 0x000003f8 || uMsr == 0x000003fc || uMsr == 0x0000060a)
    3444             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 4, NULL, uMsr - 3, true, 0, &i);
     3520            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 4, NULL, uMsr - 3, true, false, 0, &i);
    34453521        else if (uMsr == 0x000003f9 || uMsr == 0x000003fd || uMsr == 0x0000060b)
    3446             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 6, true, 0, &i);
     3522            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 6, true, false, 0, &i);
    34473523        else if (uMsr == 0x000003fa || uMsr == 0x000003fe || uMsr == 0x0000060c)
    3448             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 7, true, 0, &i);
    3449         else if (uMsr >= 0x00000400 && uMsr <= 0x0000047f)
     3524            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 8, NULL, uMsr - 7, true, false, 0, &i);
     3525        else if (uMsr >= 0x00000400 && uMsr <= 0x00000477)
    34503526            rc = reportMsr_Ia32McCtlStatusAddrMiscN(&paMsrs[i], cMsrs - i, &i);
    34513527        else if (uMsr == 0x000004c1)
    34523528            rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 8, NULL, &i);
    34533529        else if (uMsr == 0x00000680 || uMsr == 0x000006c0)
    3454             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 16, NULL, uMsr, false, UINT64_C(0xffff800000000000), &i);
     3530            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 16, NULL, uMsr, false, false, UINT64_C(0xffff800000000000), &i);
    34553531        else if (uMsr >= 0x00000800 && uMsr <= 0x000008ff)
    34563532            rc = reportMsr_GenX2Apic(&paMsrs[i], cMsrs - i, &i);
     
    34943570            rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 6, "AmdK8CpuNameN", &i);
    34953571        else if (uMsr >= 0xc0010044 && uMsr <= 0xc001004a)
    3496             rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 7, "AmdK8McCtlMaskN", 0xc0010044, true /*fEarlyEndOk*/, 0, &i);
     3572            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 7, "AmdK8McCtlMaskN", 0xc0010044, true /*fEarlyEndOk*/, false, 0, &i);
    34973573        else if (uMsr == 0xc0010050)
    34983574            rc = reportMsr_GenRangeFunction(&paMsrs[i], cMsrs - i, 4, "AmdK8SmiOnIoTrapN", &i);
     
    35113587        else if (uMsr == 0xc0011019 && g_enmMicroarch >= kCpumMicroarch_AMD_15h_Piledriver)
    35123588            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 3, "AmdK7DrXAddrMaskN", 0xc0011019 - 1,
    3513                                               false /*fEarlyEndOk*/, 0, &i);
     3589                                              false /*fEarlyEndOk*/, false /*fNoIgnMask*/, 0, &i);
    35143590        else if (uMsr == 0xc0011021)
    35153591            rc = reportMsr_AmdK7InstrCacheCfg(uMsr, uValue);
     
    35183594        else if (uMsr == 0xc0011027)
    35193595            rc = reportMsr_GenRangeFunctionEx(&paMsrs[i], cMsrs - i, 1, "AmdK7DrXAddrMaskN", 0xc0011027,
    3520                                               false /*fEarlyEndOk*/, 0, &i);
     3596                                              false /*fEarlyEndOk*/, false /*fNoIgnMask*/, 0, &i);
    35213597        else if (uMsr == 0xc001102c && CPUMMICROARCH_IS_AMD_FAM_15H(g_enmMicroarch))
    35223598            rc = reportMsr_AmdFam15hExecUnitCfg(uMsr, uValue);
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