VirtualBox

Changeset 49972 in vbox


Ignore:
Timestamp:
Dec 18, 2013 1:10:58 PM (11 years ago)
Author:
vboxsync
Message:

CPUM: More msr hacking.

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

Legend:

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

    r49966 r49972  
    7878 * @param   idMsr       The MSR we're writing.
    7979 * @param   pRange      The MSR range descriptor.
    80  * @param   uValue      The value to set.
     80 * @param   uValue      The value to set, ignored bits masked.
     81 * @param   uRawValue   The raw value with the ignored bits not masked.
    8182 */
    82 typedef DECLCALLBACK(int) FNCPUMWRMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue);
     83typedef DECLCALLBACK(int) FNCPUMWRMSR(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue);
    8384/** Pointer to a WRMSR worker for a specific MSR or range of MSRs.  */
    8485typedef FNCPUMWRMSR *PFNCPUMWRMSR;
     
    9697static DECLCALLBACK(int) cpumMsrRd_FixedValue(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    9798{
    98     *puValue = pRange->uInitOrReadValue;
    99     return VINF_SUCCESS;
    100 }
    101 
    102 
    103 /** @callback_method_impl{FNCPUMWRMSR} */
    104 static DECLCALLBACK(int) cpumMsrWr_IgnoreWrite(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     99    *puValue = pRange->uValue;
     100    return VINF_SUCCESS;
     101}
     102
     103
     104/** @callback_method_impl{FNCPUMWRMSR} */
     105static DECLCALLBACK(int) cpumMsrWr_IgnoreWrite(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    105106{
    106107    Log(("CPUM: Ignoring WRMSR %#x (%s), %#llx\n", idMsr, pRange->szName, uValue));
     
    117118
    118119/** @callback_method_impl{FNCPUMWRMSR} */
    119 static DECLCALLBACK(int) cpumMsrWr_ReadOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     120static DECLCALLBACK(int) cpumMsrWr_ReadOnly(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    120121{
    121122    Assert(pRange->fWrGpMask == UINT64_MAX);
     
    141142
    142143/** @callback_method_impl{FNCPUMWRMSR} */
    143 static DECLCALLBACK(int) cpumMsrWr_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     144static DECLCALLBACK(int) cpumMsrWr_Ia32P5McAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    144145{
    145146    /** @todo implement machine check injection. */
     
    157158
    158159/** @callback_method_impl{FNCPUMWRMSR} */
    159 static DECLCALLBACK(int) cpumMsrWr_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     160static DECLCALLBACK(int) cpumMsrWr_Ia32P5McType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    160161{
    161162    /** @todo implement machine check injection. */
     
    173174
    174175/** @callback_method_impl{FNCPUMWRMSR} */
    175 static DECLCALLBACK(int) cpumMsrWr_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     176static DECLCALLBACK(int) cpumMsrWr_Ia32TimestampCounter(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    176177{
    177178    TMCpuTickSet(pVCpu->CTX_SUFF(pVM), pVCpu, uValue);
     
    197198
    198199/** @callback_method_impl{FNCPUMWRMSR} */
    199 static DECLCALLBACK(int) cpumMsrWr_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     200static DECLCALLBACK(int) cpumMsrWr_Ia32ApicBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    200201{
    201202    int rc = PDMApicSetBase(pVCpu, uValue);
     
    215216
    216217/** @callback_method_impl{FNCPUMWRMSR} */
    217 static DECLCALLBACK(int) cpumMsrWr_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     218static DECLCALLBACK(int) cpumMsrWr_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    218219{
    219220    return VERR_CPUM_RAISE_GP_0;
     
    225226{
    226227    /** @todo fake microcode update. */
    227     *puValue = pRange->uInitOrReadValue;
    228     return VINF_SUCCESS;
    229 }
    230 
    231 
    232 /** @callback_method_impl{FNCPUMWRMSR} */
    233 static DECLCALLBACK(int) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     228    *puValue = pRange->uValue;
     229    return VINF_SUCCESS;
     230}
     231
     232
     233/** @callback_method_impl{FNCPUMWRMSR} */
     234static DECLCALLBACK(int) cpumMsrWr_Ia32BiosSignId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    234235{
    235236    return VERR_CPUM_RAISE_GP_0;
     
    238239
    239240/** @callback_method_impl{FNCPUMWRMSR} */
    240 static DECLCALLBACK(int) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     241static DECLCALLBACK(int) cpumMsrWr_Ia32BiosUpdateTrigger(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    241242{
    242243    /** @todo Fake bios update trigger better.  The value is the address to an
     
    256257
    257258/** @callback_method_impl{FNCPUMWRMSR} */
    258 static DECLCALLBACK(int) cpumMsrWr_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     259static DECLCALLBACK(int) cpumMsrWr_Ia32SmmMonitorCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    259260{
    260261    /** @todo SMM. */
     
    273274
    274275/** @callback_method_impl{FNCPUMWRMSR} */
    275 static DECLCALLBACK(int) cpumMsrWr_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     276static DECLCALLBACK(int) cpumMsrWr_Ia32PmcN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    276277{
    277278    /** @todo check CPUID leaf 0ah. */
     
    290291
    291292/** @callback_method_impl{FNCPUMWRMSR} */
    292 static DECLCALLBACK(int) cpumMsrWr_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     293static DECLCALLBACK(int) cpumMsrWr_Ia32MonitorFilterLineSize(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    293294{
    294295    /** @todo should remember writes, though it's supposedly something only a BIOS
     
    308309
    309310/** @callback_method_impl{FNCPUMWRMSR} */
    310 static DECLCALLBACK(int) cpumMsrWr_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     311static DECLCALLBACK(int) cpumMsrWr_Ia32MPerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    311312{
    312313    /** @todo Write MPERF: Calc adjustment. */
     
    326327
    327328/** @callback_method_impl{FNCPUMWRMSR} */
    328 static DECLCALLBACK(int) cpumMsrWr_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     329static DECLCALLBACK(int) cpumMsrWr_Ia32APerf(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    329330{
    330331    /** @todo Write APERF: Calc adjustment. */
     
    353354{
    354355    /** @todo Implement variable MTRR storage. */
    355     Assert(pRange->uInitOrReadValue == (idMsr - 0x200) / 2);
    356     *puValue = 0;
    357     return VINF_SUCCESS;
    358 }
    359 
    360 
    361 /** @callback_method_impl{FNCPUMWRMSR} */
    362 static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     356    Assert(pRange->uValue == (idMsr - 0x200) / 2);
     357    *puValue = 0;
     358    return VINF_SUCCESS;
     359}
     360
     361
     362/** @callback_method_impl{FNCPUMWRMSR} */
     363static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrPhysBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    363364{
    364365    /*
    365366     * Validate the value.
    366367     */
    367     Assert(pRange->uInitOrReadValue == (idMsr - 0x200) / 2);
     368    Assert(pRange->uValue == (idMsr - 0x200) / 2);
    368369
    369370    if ((uValue & 0xff) >= 7)
     
    393394{
    394395    /** @todo Implement variable MTRR storage. */
    395     Assert(pRange->uInitOrReadValue == (idMsr - 0x200) / 2);
    396     *puValue = 0;
    397     return VINF_SUCCESS;
    398 }
    399 
    400 
    401 /** @callback_method_impl{FNCPUMWRMSR} */
    402 static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     396    Assert(pRange->uValue == (idMsr - 0x200) / 2);
     397    *puValue = 0;
     398    return VINF_SUCCESS;
     399}
     400
     401
     402/** @callback_method_impl{FNCPUMWRMSR} */
     403static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrPhysMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    403404{
    404405    /*
    405406     * Validate the value.
    406407     */
    407     Assert(pRange->uInitOrReadValue == (idMsr - 0x200) / 2);
     408    Assert(pRange->uValue == (idMsr - 0x200) / 2);
    408409
    409410    uint64_t fInvPhysMask = ~(RT_BIT_64(pVCpu->CTX_SUFF(pVM)->cpum.s.GuestFeatures.cMaxPhysAddrWidth) - 1U);
     
    433434
    434435/** @callback_method_impl{FNCPUMWRMSR} */
    435 static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     436static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrFixed(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    436437{
    437438    CPUM_MSR_ASSERT_CPUMCPU_OFFSET_RETURN(pVCpu, pRange, uint64_t, puFixedMtrr);
     
    460461
    461462/** @callback_method_impl{FNCPUMWRMSR} */
    462 static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     463static DECLCALLBACK(int) cpumMsrWr_Ia32MtrrDefType(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    463464{
    464465    if ((uValue & 0xff) >= 7)
     
    482483
    483484/** @callback_method_impl{FNCPUMWRMSR} */
    484 static DECLCALLBACK(int) cpumMsrWr_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     485static DECLCALLBACK(int) cpumMsrWr_Ia32Pat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    485486{
    486487    pVCpu->cpum.s.Guest.msrPAT = uValue;
     
    498499
    499500/** @callback_method_impl{FNCPUMWRMSR} */
    500 static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     501static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterCs(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    501502{
    502503    /* Note! We used to mask this by 0xffff, but turns out real HW doesn't and
     
    516517
    517518/** @callback_method_impl{FNCPUMWRMSR} */
    518 static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterEsp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     519static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterEsp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    519520{
    520521    if (X86_IS_CANONICAL(uValue))
     
    537538
    538539/** @callback_method_impl{FNCPUMWRMSR} */
    539 static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterEip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     540static DECLCALLBACK(int) cpumMsrWr_Ia32SysEnterEip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    540541{
    541542    if (X86_IS_CANONICAL(uValue))
     
    553554{
    554555#if 0 /** @todo implement machine checks. */
    555     *puValue = pRange->uInitOrReadValue & (RT_BIT_64(8) | 0);
     556    *puValue = pRange->uValue & (RT_BIT_64(8) | 0);
    556557#else
    557558    *puValue = 0;
     
    571572
    572573/** @callback_method_impl{FNCPUMWRMSR} */
    573 static DECLCALLBACK(int) cpumMsrWr_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     574static DECLCALLBACK(int) cpumMsrWr_Ia32McgStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    574575{
    575576    /** @todo implement machine checks. */
     
    588589
    589590/** @callback_method_impl{FNCPUMWRMSR} */
    590 static DECLCALLBACK(int) cpumMsrWr_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     591static DECLCALLBACK(int) cpumMsrWr_Ia32McgCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    591592{
    592593    /** @todo implement machine checks. */
     
    605606
    606607/** @callback_method_impl{FNCPUMWRMSR} */
    607 static DECLCALLBACK(int) cpumMsrWr_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     608static DECLCALLBACK(int) cpumMsrWr_Ia32DebugCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    608609{
    609610    /** @todo implement IA32_DEBUGCTL. */
     
    622623
    623624/** @callback_method_impl{FNCPUMWRMSR} */
    624 static DECLCALLBACK(int) cpumMsrWr_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     625static DECLCALLBACK(int) cpumMsrWr_Ia32SmrrPhysBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    625626{
    626627    /** @todo implement intel SMM. */
     
    639640
    640641/** @callback_method_impl{FNCPUMWRMSR} */
    641 static DECLCALLBACK(int) cpumMsrWr_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     642static DECLCALLBACK(int) cpumMsrWr_Ia32SmrrPhysMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    642643{
    643644    /** @todo implement intel SMM. */
     
    656657
    657658/** @callback_method_impl{FNCPUMWRMSR} */
    658 static DECLCALLBACK(int) cpumMsrWr_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     659static DECLCALLBACK(int) cpumMsrWr_Ia32PlatformDcaCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    659660{
    660661    /** @todo implement intel direct cache access (DCA)?? */
     
    682683
    683684/** @callback_method_impl{FNCPUMWRMSR} */
    684 static DECLCALLBACK(int) cpumMsrWr_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     685static DECLCALLBACK(int) cpumMsrWr_Ia32Dca0Cap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    685686{
    686687    /** @todo implement intel direct cache access (DCA)?? */
     
    699700
    700701/** @callback_method_impl{FNCPUMWRMSR} */
    701 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     702static DECLCALLBACK(int) cpumMsrWr_Ia32PerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    702703{
    703704    /** @todo implement IA32_PERFEVTSEL0+. */
     
    710711{
    711712    /** @todo implement IA32_PERFSTATUS. */
    712     *puValue = pRange->uInitOrReadValue;
    713     return VINF_SUCCESS;
    714 }
    715 
    716 
    717 /** @callback_method_impl{FNCPUMWRMSR} */
    718 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     713    *puValue = pRange->uValue;
     714    return VINF_SUCCESS;
     715}
     716
     717
     718/** @callback_method_impl{FNCPUMWRMSR} */
     719static DECLCALLBACK(int) cpumMsrWr_Ia32PerfStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    719720{
    720721    /* Pentium4 allows writing, but all bits are ignored. */
     
    733734
    734735/** @callback_method_impl{FNCPUMWRMSR} */
    735 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     736static DECLCALLBACK(int) cpumMsrWr_Ia32PerfCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    736737{
    737738    /** @todo implement IA32_PERFCTL. */
     
    750751
    751752/** @callback_method_impl{FNCPUMWRMSR} */
    752 static DECLCALLBACK(int) cpumMsrWr_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     753static DECLCALLBACK(int) cpumMsrWr_Ia32FixedCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    753754{
    754755    /** @todo implement IA32_FIXED_CTRn (fixed performance counters). */
     
    767768
    768769/** @callback_method_impl{FNCPUMWRMSR} */
    769 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     770static DECLCALLBACK(int) cpumMsrWr_Ia32PerfCapabilities(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    770771{
    771772    /** @todo implement performance counters. */
     
    784785
    785786/** @callback_method_impl{FNCPUMWRMSR} */
    786 static DECLCALLBACK(int) cpumMsrWr_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     787static DECLCALLBACK(int) cpumMsrWr_Ia32FixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    787788{
    788789    /** @todo implement performance counters. */
     
    801802
    802803/** @callback_method_impl{FNCPUMWRMSR} */
    803 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     804static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    804805{
    805806    /** @todo implement performance counters. */
     
    818819
    819820/** @callback_method_impl{FNCPUMWRMSR} */
    820 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     821static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    821822{
    822823    /** @todo implement performance counters. */
     
    835836
    836837/** @callback_method_impl{FNCPUMWRMSR} */
    837 static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     838static DECLCALLBACK(int) cpumMsrWr_Ia32PerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    838839{
    839840    /** @todo implement performance counters. */
     
    852853
    853854/** @callback_method_impl{FNCPUMWRMSR} */
    854 static DECLCALLBACK(int) cpumMsrWr_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     855static DECLCALLBACK(int) cpumMsrWr_Ia32PebsEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    855856{
    856857    /** @todo implement performance counters. */
     
    869870
    870871/** @callback_method_impl{FNCPUMWRMSR} */
    871 static DECLCALLBACK(int) cpumMsrWr_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     872static DECLCALLBACK(int) cpumMsrWr_Ia32ClockModulation(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    872873{
    873874    /** @todo implement IA32_CLOCK_MODULATION. */
     
    886887
    887888/** @callback_method_impl{FNCPUMWRMSR} */
    888 static DECLCALLBACK(int) cpumMsrWr_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     889static DECLCALLBACK(int) cpumMsrWr_Ia32ThermInterrupt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    889890{
    890891    /** @todo implement IA32_THERM_STATUS. */
     
    903904
    904905/** @callback_method_impl{FNCPUMWRMSR} */
    905 static DECLCALLBACK(int) cpumMsrWr_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     906static DECLCALLBACK(int) cpumMsrWr_Ia32ThermStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    906907{
    907908    /** @todo implement IA32_THERM_INTERRUPT. */
     
    920921
    921922/** @callback_method_impl{FNCPUMWRMSR} */
    922 static DECLCALLBACK(int) cpumMsrWr_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     923static DECLCALLBACK(int) cpumMsrWr_Ia32Therm2Ctl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    923924{
    924925    /** @todo implement IA32_THERM2_CTL. */
     
    936937
    937938/** @callback_method_impl{FNCPUMWRMSR} */
    938 static DECLCALLBACK(int) cpumMsrWr_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     939static DECLCALLBACK(int) cpumMsrWr_Ia32MiscEnable(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    939940{
    940941#ifdef LOG_ENABLED
     
    982983
    983984/** @callback_method_impl{FNCPUMWRMSR} */
    984 static DECLCALLBACK(int) cpumMsrWr_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     985static DECLCALLBACK(int) cpumMsrWr_Ia32McCtlStatusAddrMiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    985986{
    986987    switch (idMsr & 3)
     
    10361037
    10371038/** @callback_method_impl{FNCPUMWRMSR} */
    1038 static DECLCALLBACK(int) cpumMsrWr_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1039static DECLCALLBACK(int) cpumMsrWr_Ia32McNCtl2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    10391040{
    10401041    /** @todo Implement machine check exception injection. */
     
    10531054
    10541055/** @callback_method_impl{FNCPUMWRMSR} */
    1055 static DECLCALLBACK(int) cpumMsrWr_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1056static DECLCALLBACK(int) cpumMsrWr_Ia32DsArea(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    10561057{
    10571058    return VINF_SUCCESS;
     
    10691070
    10701071/** @callback_method_impl{FNCPUMWRMSR} */
    1071 static DECLCALLBACK(int) cpumMsrWr_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1072static DECLCALLBACK(int) cpumMsrWr_Ia32TscDeadline(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    10721073{
    10731074    /** @todo implement TSC deadline timer. */
     
    10901091
    10911092/** @callback_method_impl{FNCPUMWRMSR} */
    1092 static DECLCALLBACK(int) cpumMsrWr_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1093static DECLCALLBACK(int) cpumMsrWr_Ia32X2ApicN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    10931094{
    10941095    int rc = PDMApicWriteMSR(pVCpu->CTX_SUFF(pVM), pVCpu->idCpu, idMsr, uValue);
     
    11121113
    11131114/** @callback_method_impl{FNCPUMWRMSR} */
    1114 static DECLCALLBACK(int) cpumMsrWr_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1115static DECLCALLBACK(int) cpumMsrWr_Ia32DebugInterface(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    11151116{
    11161117    /** @todo IA32_DEBUG_INTERFACE (no docs)  */
     
    12791280
    12801281/** @callback_method_impl{FNCPUMWRMSR} */
    1281 static DECLCALLBACK(int) cpumMsrWr_Amd64Efer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1282static DECLCALLBACK(int) cpumMsrWr_Amd64Efer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    12821283{
    12831284    PVM             pVM          = pVCpu->CTX_SUFF(pVM);
     
    13381339
    13391340/** @callback_method_impl{FNCPUMWRMSR} */
    1340 static DECLCALLBACK(int) cpumMsrWr_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1341static DECLCALLBACK(int) cpumMsrWr_Amd64SyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    13411342{
    13421343    pVCpu->cpum.s.Guest.msrSTAR = uValue;
     
    13541355
    13551356/** @callback_method_impl{FNCPUMWRMSR} */
    1356 static DECLCALLBACK(int) cpumMsrWr_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1357static DECLCALLBACK(int) cpumMsrWr_Amd64LongSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    13571358{
    13581359    if (!X86_IS_CANONICAL(uValue))
     
    13751376
    13761377/** @callback_method_impl{FNCPUMWRMSR} */
    1377 static DECLCALLBACK(int) cpumMsrWr_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1378static DECLCALLBACK(int) cpumMsrWr_Amd64CompSyscallTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    13781379{
    13791380    if (!X86_IS_CANONICAL(uValue))
     
    13961397
    13971398/** @callback_method_impl{FNCPUMWRMSR} */
    1398 static DECLCALLBACK(int) cpumMsrWr_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1399static DECLCALLBACK(int) cpumMsrWr_Amd64SyscallFlagMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    13991400{
    14001401    pVCpu->cpum.s.Guest.msrSFMASK = uValue;
     
    14121413
    14131414/** @callback_method_impl{FNCPUMWRMSR} */
    1414 static DECLCALLBACK(int) cpumMsrWr_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1415static DECLCALLBACK(int) cpumMsrWr_Amd64FsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    14151416{
    14161417    pVCpu->cpum.s.Guest.fs.u64Base = uValue;
     
    14271428
    14281429/** @callback_method_impl{FNCPUMWRMSR} */
    1429 static DECLCALLBACK(int) cpumMsrWr_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1430static DECLCALLBACK(int) cpumMsrWr_Amd64GsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    14301431{
    14311432    pVCpu->cpum.s.Guest.gs.u64Base = uValue;
     
    14431444
    14441445/** @callback_method_impl{FNCPUMWRMSR} */
    1445 static DECLCALLBACK(int) cpumMsrWr_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1446static DECLCALLBACK(int) cpumMsrWr_Amd64KernelGsBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    14461447{
    14471448    pVCpu->cpum.s.Guest.msrKERNELGSBASE = uValue;
     
    14581459
    14591460/** @callback_method_impl{FNCPUMWRMSR} */
    1460 static DECLCALLBACK(int) cpumMsrWr_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1461static DECLCALLBACK(int) cpumMsrWr_Amd64TscAux(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    14611462{
    14621463    pVCpu->cpum.s.GuestMsrs.msr.TscAux = uValue;
     
    14751476{
    14761477    /** @todo recalc clock frequency ratio? */
    1477     *puValue = pRange->uInitOrReadValue;
    1478     return VINF_SUCCESS;
    1479 }
    1480 
    1481 
    1482 /** @callback_method_impl{FNCPUMWRMSR} */
    1483 static DECLCALLBACK(int) cpumMsrWr_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1478    *puValue = pRange->uValue;
     1479    return VINF_SUCCESS;
     1480}
     1481
     1482
     1483/** @callback_method_impl{FNCPUMWRMSR} */
     1484static DECLCALLBACK(int) cpumMsrWr_IntelEblCrPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    14841485{
    14851486    /** @todo Write EBL_CR_POWERON: Remember written bits. */
     
    14921493{
    14931494    /** @todo P4 hard power on config */
    1494     *puValue = pRange->uInitOrReadValue;
    1495     return VINF_SUCCESS;
    1496 }
    1497 
    1498 
    1499 /** @callback_method_impl{FNCPUMWRMSR} */
    1500 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1495    *puValue = pRange->uValue;
     1496    return VINF_SUCCESS;
     1497}
     1498
     1499
     1500/** @callback_method_impl{FNCPUMWRMSR} */
     1501static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcHardPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    15011502{
    15021503    /** @todo P4 hard power on config */
     
    15091510{
    15101511    /** @todo P4 soft power on config  */
    1511     *puValue = pRange->uInitOrReadValue;
    1512     return VINF_SUCCESS;
    1513 }
    1514 
    1515 
    1516 /** @callback_method_impl{FNCPUMWRMSR} */
    1517 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1512    *puValue = pRange->uValue;
     1513    return VINF_SUCCESS;
     1514}
     1515
     1516
     1517/** @callback_method_impl{FNCPUMWRMSR} */
     1518static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcSoftPowerOn(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    15181519{
    15191520    /** @todo P4 soft power on config */
     
    15261527{
    15271528    /** @todo P4 bus frequency config  */
    1528     *puValue = pRange->uInitOrReadValue;
    1529     return VINF_SUCCESS;
    1530 }
    1531 
    1532 
    1533 /** @callback_method_impl{FNCPUMWRMSR} */
    1534 static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1529    *puValue = pRange->uValue;
     1530    return VINF_SUCCESS;
     1531}
     1532
     1533
     1534/** @callback_method_impl{FNCPUMWRMSR} */
     1535static DECLCALLBACK(int) cpumMsrWr_IntelP4EbcFrequencyId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    15351536{
    15361537    /** @todo P4 bus frequency config  */
     
    15791580
    15801581/** @callback_method_impl{FNCPUMWRMSR} */
    1581 static DECLCALLBACK(int) cpumMsrWr_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1582static DECLCALLBACK(int) cpumMsrWr_IntelPkgCStConfigControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    15821583{
    15831584    if (pVCpu->cpum.s.GuestMsrs.msr.PkgCStateCfgCtrl & RT_BIT_64(15))
     
    16081609
    16091610/** @callback_method_impl{FNCPUMWRMSR} */
    1610 static DECLCALLBACK(int) cpumMsrWr_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1611static DECLCALLBACK(int) cpumMsrWr_IntelPmgIoCaptureBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    16111612{
    16121613    /** @todo implement I/O mwait wakeup. */
     
    16251626
    16261627/** @callback_method_impl{FNCPUMWRMSR} */
    1627 static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1628static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchFromToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    16281629{
    16291630    /** @todo implement last branch records. */
     
    16421643
    16431644/** @callback_method_impl{FNCPUMWRMSR} */
    1644 static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1645static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchFromN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    16451646{
    16461647    /** @todo implement last branch records. */
     
    16671668
    16681669/** @callback_method_impl{FNCPUMWRMSR} */
    1669 static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1670static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchToN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    16701671{
    16711672    /** @todo implement last branch records. */
     
    16921693
    16931694/** @callback_method_impl{FNCPUMWRMSR} */
    1694 static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1695static DECLCALLBACK(int) cpumMsrWr_IntelLastBranchTos(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    16951696{
    16961697    /** @todo implement last branch records. */
     
    17021703static DECLCALLBACK(int) cpumMsrRd_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    17031704{
    1704     *puValue = pRange->uInitOrReadValue;
    1705     return VINF_SUCCESS;
    1706 }
    1707 
    1708 
    1709 /** @callback_method_impl{FNCPUMWRMSR} */
    1710 static DECLCALLBACK(int) cpumMsrWr_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1705    *puValue = pRange->uValue;
     1706    return VINF_SUCCESS;
     1707}
     1708
     1709
     1710/** @callback_method_impl{FNCPUMWRMSR} */
     1711static DECLCALLBACK(int) cpumMsrWr_IntelBblCrCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17111712{
    17121713    return VINF_SUCCESS;
     
    17171718static DECLCALLBACK(int) cpumMsrRd_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    17181719{
    1719     *puValue = pRange->uInitOrReadValue;
    1720     return VINF_SUCCESS;
    1721 }
    1722 
    1723 
    1724 /** @callback_method_impl{FNCPUMWRMSR} */
    1725 static DECLCALLBACK(int) cpumMsrWr_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1720    *puValue = pRange->uValue;
     1721    return VINF_SUCCESS;
     1722}
     1723
     1724
     1725/** @callback_method_impl{FNCPUMWRMSR} */
     1726static DECLCALLBACK(int) cpumMsrWr_IntelBblCrCtl3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17261727{
    17271728    return VINF_SUCCESS;
     
    17321733static DECLCALLBACK(int) cpumMsrRd_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    17331734{
    1734     *puValue = pRange->uInitOrReadValue;
    1735     return VINF_SUCCESS;
    1736 }
    1737 
    1738 
    1739 /** @callback_method_impl{FNCPUMWRMSR} */
    1740 static DECLCALLBACK(int) cpumMsrWr_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1735    *puValue = pRange->uValue;
     1736    return VINF_SUCCESS;
     1737}
     1738
     1739
     1740/** @callback_method_impl{FNCPUMWRMSR} */
     1741static DECLCALLBACK(int) cpumMsrWr_IntelI7TemperatureTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17411742{
    17421743    return VINF_SUCCESS;
     
    17481749{
    17491750    /** @todo machine check. */
    1750     *puValue = pRange->uInitOrReadValue;
    1751     return VINF_SUCCESS;
    1752 }
    1753 
    1754 
    1755 /** @callback_method_impl{FNCPUMWRMSR} */
    1756 static DECLCALLBACK(int) cpumMsrWr_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1751    *puValue = pRange->uValue;
     1752    return VINF_SUCCESS;
     1753}
     1754
     1755
     1756/** @callback_method_impl{FNCPUMWRMSR} */
     1757static DECLCALLBACK(int) cpumMsrWr_IntelI7MsrOffCoreResponseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17571758{
    17581759    /** @todo machine check. */
     
    17701771
    17711772/** @callback_method_impl{FNCPUMWRMSR} */
    1772 static DECLCALLBACK(int) cpumMsrWr_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1773static DECLCALLBACK(int) cpumMsrWr_IntelI7MiscPwrMgmt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17731774{
    17741775    return VINF_SUCCESS;
     
    17791780static DECLCALLBACK(int) cpumMsrRd_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    17801781{
    1781     int rc = CPUMGetGuestCRx(pVCpu, pRange->uInitOrReadValue, puValue);
     1782    int rc = CPUMGetGuestCRx(pVCpu, pRange->uValue, puValue);
    17821783    AssertRC(rc);
    17831784    return VINF_SUCCESS;
     
    17861787
    17871788/** @callback_method_impl{FNCPUMWRMSR} */
    1788 static DECLCALLBACK(int) cpumMsrWr_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1789static DECLCALLBACK(int) cpumMsrWr_IntelP6CrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    17891790{
    17901791    /* This CRx interface differs from the MOV CRx, GReg interface in that
     
    18071808
    18081809/** @callback_method_impl{FNCPUMWRMSR} */
    1809 static DECLCALLBACK(int) cpumMsrWr_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1810static DECLCALLBACK(int) cpumMsrWr_IntelCpuId1FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18101811{
    18111812    /** @todo implement CPUID masking.  */
     
    18231824
    18241825/** @callback_method_impl{FNCPUMWRMSR} */
    1825 static DECLCALLBACK(int) cpumMsrWr_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1826static DECLCALLBACK(int) cpumMsrWr_IntelCpuId1FeatureMaskEax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18261827{
    18271828    /** @todo implement CPUID masking.  */
     
    18411842
    18421843/** @callback_method_impl{FNCPUMWRMSR} */
    1843 static DECLCALLBACK(int) cpumMsrWr_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1844static DECLCALLBACK(int) cpumMsrWr_IntelCpuId80000001FeatureMaskEcdx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18441845{
    18451846    /** @todo implement CPUID masking.  */
     
    18591860
    18601861/** @callback_method_impl{FNCPUMWRMSR} */
    1861 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1862static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyAesNiCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18621863{
    18631864    /** @todo implement AES-NI.  */
     
    18701871{
    18711872    /** @todo implement intel C states.  */
    1872     *puValue = pRange->uInitOrReadValue;
    1873     return VINF_SUCCESS;
    1874 }
    1875 
    1876 
    1877 /** @callback_method_impl{FNCPUMWRMSR} */
    1878 static DECLCALLBACK(int) cpumMsrWr_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1873    *puValue = pRange->uValue;
     1874    return VINF_SUCCESS;
     1875}
     1876
     1877
     1878/** @callback_method_impl{FNCPUMWRMSR} */
     1879static DECLCALLBACK(int) cpumMsrWr_IntelI7TurboRatioLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18791880{
    18801881    /** @todo implement intel C states.  */
     
    18931894
    18941895/** @callback_method_impl{FNCPUMWRMSR} */
    1895 static DECLCALLBACK(int) cpumMsrWr_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1896static DECLCALLBACK(int) cpumMsrWr_IntelI7LbrSelect(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    18961897{
    18971898    /** @todo implement last-branch-records.  */
     
    19101911
    19111912/** @callback_method_impl{FNCPUMWRMSR} */
    1912 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1913static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyErrorControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    19131914{
    19141915    /** @todo implement memory error injection (MSR_ERROR_CONTROL).  */
     
    19211922{
    19221923    /** @todo implement memory VLW?  */
    1923     *puValue = pRange->uInitOrReadValue;
     1924    *puValue = pRange->uValue;
    19241925    /* Note: A20M is known to be bit 1 as this was disclosed in spec update
    19251926       AAJ49/AAK51/????, which documents the inversion of this bit.  The
     
    19441945
    19451946/** @callback_method_impl{FNCPUMWRMSR} */
    1946 static DECLCALLBACK(int) cpumMsrWr_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1947static DECLCALLBACK(int) cpumMsrWr_IntelI7PowerCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    19471948{
    19481949    /** @todo intel power management  */
     
    19611962
    19621963/** @callback_method_impl{FNCPUMWRMSR} */
    1963 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1964static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyPebsNumAlt(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    19641965{
    19651966    /** @todo intel performance counters.  */
     
    19781979
    19791980/** @callback_method_impl{FNCPUMWRMSR} */
    1980 static DECLCALLBACK(int) cpumMsrWr_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     1981static DECLCALLBACK(int) cpumMsrWr_IntelI7PebsLdLat(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    19811982{
    19821983    /** @todo intel performance counters.  */
     
    20132014
    20142015/** @callback_method_impl{FNCPUMWRMSR} */
    2015 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2016static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyVrCurrentConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    20162017{
    20172018    /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     
    20302031
    20312032/** @callback_method_impl{FNCPUMWRMSR} */
    2032 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2033static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyVrMiscConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    20332034{
    20342035    /** @todo Figure out what MSR_VR_CURRENT_CONFIG & MSR_VR_MISC_CONFIG are.  */
     
    20412042{
    20422043    /** @todo intel RAPL.  */
    2043     *puValue = pRange->uInitOrReadValue;
     2044    *puValue = pRange->uValue;
    20442045    return VINF_SUCCESS;
    20452046}
     
    20562057
    20572058/** @callback_method_impl{FNCPUMWRMSR} */
    2058 static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2059static DECLCALLBACK(int) cpumMsrWr_IntelI7SandyPkgCnIrtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    20592060{
    20602061    /** @todo intel power management.  */
     
    20822083
    20832084/** @callback_method_impl{FNCPUMWRMSR} */
    2084 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2085static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPkgPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    20852086{
    20862087    /** @todo intel RAPL.  */
     
    21262127
    21272128/** @callback_method_impl{FNCPUMWRMSR} */
    2128 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2129static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplDramPowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    21292130{
    21302131    /** @todo intel RAPL.  */
     
    21702171
    21712172/** @callback_method_impl{FNCPUMWRMSR} */
    2172 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2173static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp0PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    21732174{
    21742175    /** @todo intel RAPL.  */
     
    21962197
    21972198/** @callback_method_impl{FNCPUMWRMSR} */
    2198 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2199static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp0Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    21992200{
    22002201    /** @todo intel RAPL.  */
     
    22222223
    22232224/** @callback_method_impl{FNCPUMWRMSR} */
    2224 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2225static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp1PowerLimit(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    22252226{
    22262227    /** @todo intel RAPL.  */
     
    22482249
    22492250/** @callback_method_impl{FNCPUMWRMSR} */
    2250 static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2251static DECLCALLBACK(int) cpumMsrWr_IntelI7RaplPp1Policy(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    22512252{
    22522253    /** @todo intel RAPL.  */
     
    22592260{
    22602261    /** @todo intel power management.  */
    2261     *puValue = pRange->uInitOrReadValue;
     2262    *puValue = pRange->uValue;
    22622263    return VINF_SUCCESS;
    22632264}
     
    22682269{
    22692270    /** @todo intel power management.  */
    2270     *puValue = pRange->uInitOrReadValue;
     2271    *puValue = pRange->uValue;
    22712272    return VINF_SUCCESS;
    22722273}
     
    22772278{
    22782279    /** @todo intel power management.  */
    2279     *puValue = pRange->uInitOrReadValue;
     2280    *puValue = pRange->uValue;
    22802281    return VINF_SUCCESS;
    22812282}
     
    22922293
    22932294/** @callback_method_impl{FNCPUMWRMSR} */
    2294 static DECLCALLBACK(int) cpumMsrWr_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2295static DECLCALLBACK(int) cpumMsrWr_IntelI7IvyConfigTdpControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    22952296{
    22962297    /** @todo intel power management.  */
     
    23092310
    23102311/** @callback_method_impl{FNCPUMWRMSR} */
    2311 static DECLCALLBACK(int) cpumMsrWr_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2312static DECLCALLBACK(int) cpumMsrWr_IntelI7IvyTurboActivationRatio(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23122313{
    23132314    /** @todo intel power management.  */
     
    23262327
    23272328/** @callback_method_impl{FNCPUMWRMSR} */
    2328 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2329static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23292330{
    23302331    /** @todo uncore msrs.  */
     
    23432344
    23442345/** @callback_method_impl{FNCPUMWRMSR} */
    2345 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2346static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23462347{
    23472348    /** @todo uncore msrs.  */
     
    23602361
    23612362/** @callback_method_impl{FNCPUMWRMSR} */
    2362 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2363static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfGlobalOvfCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23632364{
    23642365    /** @todo uncore msrs.  */
     
    23772378
    23782379/** @callback_method_impl{FNCPUMWRMSR} */
    2379 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2380static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfFixedCtrCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23802381{
    23812382    /** @todo uncore msrs.  */
     
    23942395
    23952396/** @callback_method_impl{FNCPUMWRMSR} */
    2396 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2397static DECLCALLBACK(int) cpumMsrWr_IntelI7UncPerfFixedCtr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    23972398{
    23982399    /** @todo uncore msrs.  */
     
    24202421
    24212422/** @callback_method_impl{FNCPUMWRMSR} */
    2422 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2423static DECLCALLBACK(int) cpumMsrWr_IntelI7UncArbPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    24232424{
    24242425    /** @todo uncore msrs.  */
     
    24372438
    24382439/** @callback_method_impl{FNCPUMWRMSR} */
    2439 static DECLCALLBACK(int) cpumMsrWr_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2440static DECLCALLBACK(int) cpumMsrWr_IntelI7UncArbPerfEvtSelN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    24402441{
    24412442    /** @todo uncore msrs.  */
     
    24482449{
    24492450    /** @todo implement enhanced multi thread termal monitoring? */
    2450     *puValue = pRange->uInitOrReadValue;
    2451     return VINF_SUCCESS;
    2452 }
    2453 
    2454 
    2455 /** @callback_method_impl{FNCPUMWRMSR} */
    2456 static DECLCALLBACK(int) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2451    *puValue = pRange->uValue;
     2452    return VINF_SUCCESS;
     2453}
     2454
     2455
     2456/** @callback_method_impl{FNCPUMWRMSR} */
     2457static DECLCALLBACK(int) cpumMsrWr_IntelCore2EmttmCrTablesN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    24572458{
    24582459    /** @todo implement enhanced multi thread termal monitoring? */
     
    24712472
    24722473/** @callback_method_impl{FNCPUMWRMSR} */
    2473 static DECLCALLBACK(int) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2474static DECLCALLBACK(int) cpumMsrWr_IntelCore2SmmCStMiscInfo(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    24742475{
    24752476    /** @todo SMM & C-states? */
     
    24882489
    24892490/** @callback_method_impl{FNCPUMWRMSR} */
    2490 static DECLCALLBACK(int) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2491static DECLCALLBACK(int) cpumMsrWr_IntelCore1ExtConfig(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    24912492{
    24922493    /** @todo Core1&2 EXT_CONFIG (whatever that is)? */
     
    25052506
    25062507/** @callback_method_impl{FNCPUMWRMSR} */
    2507 static DECLCALLBACK(int) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2508static DECLCALLBACK(int) cpumMsrWr_IntelCore1DtsCalControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    25082509{
    25092510    /** @todo Core1&2(?) DTS_CAL_CTRL (whatever that is)? */
     
    25222523
    25232524/** @callback_method_impl{FNCPUMWRMSR} */
    2524 static DECLCALLBACK(int) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2525static DECLCALLBACK(int) cpumMsrWr_IntelCore2PeciControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    25252526{
    25262527    /** @todo Core2+ platform environment control interface control register? */
     
    25702571
    25712572/** @callback_method_impl{FNCPUMWRMSR} */
    2572 static DECLCALLBACK(int) cpumMsrWr_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2573static DECLCALLBACK(int) cpumMsrWr_P6LastIntFromIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    25732574{
    25742575    /** @todo implement last exception records. */
     
    25872588
    25882589/** @callback_method_impl{FNCPUMWRMSR} */
    2589 static DECLCALLBACK(int) cpumMsrWr_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2590static DECLCALLBACK(int) cpumMsrWr_P6LastIntToIp(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    25902591{
    25912592    /** @todo implement last exception records. */
     
    26122613
    26132614/** @callback_method_impl{FNCPUMWRMSR} */
    2614 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2615static DECLCALLBACK(int) cpumMsrWr_AmdFam15hTscRate(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    26152616{
    26162617    /** @todo Implement TscRateMsr */
     
    26302631
    26312632/** @callback_method_impl{FNCPUMWRMSR} */
    2632 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2633static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLwpCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    26332634{
    26342635    /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     
    26482649
    26492650/** @callback_method_impl{FNCPUMWRMSR} */
    2650 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2651static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLwpCbAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    26512652{
    26522653    /** @todo Implement AMD LWP? (Instructions: LWPINS, LWPVAL, LLWPCB, SLWPCB) */
     
    26652666
    26662667/** @callback_method_impl{FNCPUMWRMSR} */
    2667 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2668static DECLCALLBACK(int) cpumMsrWr_AmdFam10hMc4MiscN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    26682669{
    26692670    /** @todo machine check. */
     
    26822683
    26832684/** @callback_method_impl{FNCPUMWRMSR} */
    2684 static DECLCALLBACK(int) cpumMsrWr_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2685static DECLCALLBACK(int) cpumMsrWr_AmdK8PerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    26852686{
    26862687    /** @todo AMD performance events. */
     
    26992700
    27002701/** @callback_method_impl{FNCPUMWRMSR} */
    2701 static DECLCALLBACK(int) cpumMsrWr_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2702static DECLCALLBACK(int) cpumMsrWr_AmdK8PerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27022703{
    27032704    /** @todo AMD performance events. */
     
    27102711{
    27112712    /** @todo AMD SYS_CFG */
    2712     *puValue = pRange->uInitOrReadValue;
    2713     return VINF_SUCCESS;
    2714 }
    2715 
    2716 
    2717 /** @callback_method_impl{FNCPUMWRMSR} */
    2718 static DECLCALLBACK(int) cpumMsrWr_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2713    *puValue = pRange->uValue;
     2714    return VINF_SUCCESS;
     2715}
     2716
     2717
     2718/** @callback_method_impl{FNCPUMWRMSR} */
     2719static DECLCALLBACK(int) cpumMsrWr_AmdK8SysCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27192720{
    27202721    /** @todo AMD SYS_CFG */
     
    27332734
    27342735/** @callback_method_impl{FNCPUMWRMSR} */
    2735 static DECLCALLBACK(int) cpumMsrWr_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2736static DECLCALLBACK(int) cpumMsrWr_AmdK8HwCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27362737{
    27372738    /** @todo AMD HW_CFG */
     
    27502751
    27512752/** @callback_method_impl{FNCPUMWRMSR} */
    2752 static DECLCALLBACK(int) cpumMsrWr_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2753static DECLCALLBACK(int) cpumMsrWr_AmdK8IorrBaseN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27532754{
    27542755    /** @todo AMD IorrMask/IorrBase */
     
    27672768
    27682769/** @callback_method_impl{FNCPUMWRMSR} */
    2769 static DECLCALLBACK(int) cpumMsrWr_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2770static DECLCALLBACK(int) cpumMsrWr_AmdK8IorrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27702771{
    27712772    /** @todo AMD IorrMask/IorrBase */
     
    27802781    /** @todo return 4GB - RamHoleSize here for TOPMEM. Figure out what to return
    27812782     *        for TOPMEM2. */
    2782     //if (pRange->uInitOrReadValue == 0)
     2783    //if (pRange->uValue == 0)
    27832784    //    *puValue = _4G - RamHoleSize;
    27842785    return VINF_SUCCESS;
     
    27872788
    27882789/** @callback_method_impl{FNCPUMWRMSR} */
    2789 static DECLCALLBACK(int) cpumMsrWr_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2790static DECLCALLBACK(int) cpumMsrWr_AmdK8TopOfMemN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    27902791{
    27912792    /** @todo AMD TOPMEM and TOPMEM2/TOM2. */
     
    28042805
    28052806/** @callback_method_impl{FNCPUMWRMSR} */
    2806 static DECLCALLBACK(int) cpumMsrWr_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2807static DECLCALLBACK(int) cpumMsrWr_AmdK8NbCfg1(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    28072808{
    28082809    /** @todo AMD NB_CFG1 */
     
    28212822
    28222823/** @callback_method_impl{FNCPUMWRMSR} */
    2823 static DECLCALLBACK(int) cpumMsrWr_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2824static DECLCALLBACK(int) cpumMsrWr_AmdK8McXcptRedir(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    28242825{
    28252826    /** @todo machine check. */
     
    28312832static DECLCALLBACK(int) cpumMsrRd_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    28322833{
    2833     PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), pRange->uInitOrReadValue / 2 + 0x80000001, 0);
     2834    PCPUMCPUIDLEAF pLeaf = cpumCpuIdGetLeaf(pVCpu->CTX_SUFF(pVM), pRange->uValue / 2 + 0x80000001, 0);
    28342835    if (pLeaf)
    28352836    {
    2836         if (!(pRange->uInitOrReadValue & 1))
     2837        if (!(pRange->uValue & 1))
    28372838            *puValue = RT_MAKE_U64(pLeaf->uEax, pLeaf->uEbx);
    28382839        else
     
    28462847
    28472848/** @callback_method_impl{FNCPUMWRMSR} */
    2848 static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2849static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuNameN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    28492850{
    28502851    /** @todo Remember guest programmed CPU name. */
     
    28572858{
    28582859    /** @todo AMD HTC. */
    2859     *puValue = pRange->uInitOrReadValue;
    2860     return VINF_SUCCESS;
    2861 }
    2862 
    2863 
    2864 /** @callback_method_impl{FNCPUMWRMSR} */
    2865 static DECLCALLBACK(int) cpumMsrWr_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2860    *puValue = pRange->uValue;
     2861    return VINF_SUCCESS;
     2862}
     2863
     2864
     2865/** @callback_method_impl{FNCPUMWRMSR} */
     2866static DECLCALLBACK(int) cpumMsrWr_AmdK8HwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    28662867{
    28672868    /** @todo AMD HTC. */
     
    28802881
    28812882/** @callback_method_impl{FNCPUMWRMSR} */
    2882 static DECLCALLBACK(int) cpumMsrWr_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2883static DECLCALLBACK(int) cpumMsrWr_AmdK8SwThermalCtrl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    28832884{
    28842885    /** @todo AMD STC. */
     
    28912892{
    28922893    /** @todo AMD FIDVID_CTL. */
    2893     *puValue = pRange->uInitOrReadValue;
    2894     return VINF_SUCCESS;
    2895 }
    2896 
    2897 
    2898 /** @callback_method_impl{FNCPUMWRMSR} */
    2899 static DECLCALLBACK(int) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2894    *puValue = pRange->uValue;
     2895    return VINF_SUCCESS;
     2896}
     2897
     2898
     2899/** @callback_method_impl{FNCPUMWRMSR} */
     2900static DECLCALLBACK(int) cpumMsrWr_AmdK8FidVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29002901{
    29012902    /** @todo AMD FIDVID_CTL. */
     
    29082909{
    29092910    /** @todo AMD FIDVID_STATUS. */
    2910     *puValue = pRange->uInitOrReadValue;
     2911    *puValue = pRange->uValue;
    29112912    return VINF_SUCCESS;
    29122913}
     
    29232924
    29242925/** @callback_method_impl{FNCPUMWRMSR} */
    2925 static DECLCALLBACK(int) cpumMsrWr_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2926static DECLCALLBACK(int) cpumMsrWr_AmdK8McCtlMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29262927{
    29272928    /** @todo AMD MC. */
     
    29402941
    29412942/** @callback_method_impl{FNCPUMWRMSR} */
    2942 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2943static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiOnIoTrapN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29432944{
    29442945    /** @todo AMD SMM/SMI and I/O trap. */
     
    29572958
    29582959/** @callback_method_impl{FNCPUMWRMSR} */
    2959 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2960static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiOnIoTrapCtlSts(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29602961{
    29612962    /** @todo AMD SMM/SMI and I/O trap. */
     
    29742975
    29752976/** @callback_method_impl{FNCPUMWRMSR} */
    2976 static DECLCALLBACK(int) cpumMsrWr_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2977static DECLCALLBACK(int) cpumMsrWr_AmdK8IntPendingMessage(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29772978{
    29782979    /** @todo Interrupt pending message. */
     
    29912992
    29922993/** @callback_method_impl{FNCPUMWRMSR} */
    2993 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     2994static DECLCALLBACK(int) cpumMsrWr_AmdK8SmiTriggerIoCycle(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    29942995{
    29952996    /** @todo AMD SMM/SMI and trigger I/O cycle. */
     
    30083009
    30093010/** @callback_method_impl{FNCPUMWRMSR} */
    3010 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3011static DECLCALLBACK(int) cpumMsrWr_AmdFam10hMmioCfgBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    30113012{
    30123013    /** @todo AMD MMIO Configuration base address. */
     
    30253026
    30263027/** @callback_method_impl{FNCPUMWRMSR} */
    3027 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3028static DECLCALLBACK(int) cpumMsrWr_AmdFam10hTrapCtlMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    30283029{
    30293030    /** @todo AMD 0xc0010059. */
     
    30363037{
    30373038    /** @todo AMD P-states. */
    3038     *puValue = pRange->uInitOrReadValue;
     3039    *puValue = pRange->uValue;
    30393040    return VINF_SUCCESS;
    30403041}
     
    30453046{
    30463047    /** @todo AMD P-states. */
    3047     *puValue = pRange->uInitOrReadValue;
    3048     return VINF_SUCCESS;
    3049 }
    3050 
    3051 
    3052 /** @callback_method_impl{FNCPUMWRMSR} */
    3053 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3048    *puValue = pRange->uValue;
     3049    return VINF_SUCCESS;
     3050}
     3051
     3052
     3053/** @callback_method_impl{FNCPUMWRMSR} */
     3054static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    30543055{
    30553056    /** @todo AMD P-states. */
     
    30623063{
    30633064    /** @todo AMD P-states. */
    3064     *puValue = pRange->uInitOrReadValue;
    3065     return VINF_SUCCESS;
    3066 }
    3067 
    3068 
    3069 /** @callback_method_impl{FNCPUMWRMSR} */
    3070 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3065    *puValue = pRange->uValue;
     3066    return VINF_SUCCESS;
     3067}
     3068
     3069
     3070/** @callback_method_impl{FNCPUMWRMSR} */
     3071static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    30713072{
    30723073    /** @todo AMD P-states. */
     
    30793080{
    30803081    /** @todo AMD P-states. */
    3081     *puValue = pRange->uInitOrReadValue;
    3082     return VINF_SUCCESS;
    3083 }
    3084 
    3085 
    3086 /** @callback_method_impl{FNCPUMWRMSR} */
    3087 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3082    *puValue = pRange->uValue;
     3083    return VINF_SUCCESS;
     3084}
     3085
     3086
     3087/** @callback_method_impl{FNCPUMWRMSR} */
     3088static DECLCALLBACK(int) cpumMsrWr_AmdFam10hPStateN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    30883089{
    30893090    /** @todo AMD P-states. */
     
    30963097{
    30973098    /** @todo AMD P-states. */
    3098     *puValue = pRange->uInitOrReadValue;
    3099     return VINF_SUCCESS;
    3100 }
    3101 
    3102 
    3103 /** @callback_method_impl{FNCPUMWRMSR} */
    3104 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3099    *puValue = pRange->uValue;
     3100    return VINF_SUCCESS;
     3101}
     3102
     3103
     3104/** @callback_method_impl{FNCPUMWRMSR} */
     3105static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCofVidControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31053106{
    31063107    /** @todo AMD P-states. */
     
    31133114{
    31143115    /** @todo AMD P-states. */
    3115     *puValue = pRange->uInitOrReadValue;
    3116     return VINF_SUCCESS;
    3117 }
    3118 
    3119 
    3120 /** @callback_method_impl{FNCPUMWRMSR} */
    3121 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3116    *puValue = pRange->uValue;
     3117    return VINF_SUCCESS;
     3118}
     3119
     3120
     3121/** @callback_method_impl{FNCPUMWRMSR} */
     3122static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCofVidStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31223123{
    31233124    /* Note! Writing 0 seems to not GP, not sure if it does anything to the value... */
     
    31373138
    31383139/** @callback_method_impl{FNCPUMWRMSR} */
    3139 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3140static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCStateIoBaseAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31403141{
    31413142    /** @todo AMD C-states. */
     
    31543155
    31553156/** @callback_method_impl{FNCPUMWRMSR} */
    3156 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3157static DECLCALLBACK(int) cpumMsrWr_AmdFam10hCpuWatchdogTimer(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31573158{
    31583159    /** @todo AMD machine checks. */
     
    31713172
    31723173/** @callback_method_impl{FNCPUMWRMSR} */
    3173 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3174static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmBase(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31743175{
    31753176    /** @todo AMD SMM. */
     
    31883189
    31893190/** @callback_method_impl{FNCPUMWRMSR} */
    3190 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3191static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    31913192{
    31923193    /** @todo AMD SMM. */
     
    32063207
    32073208/** @callback_method_impl{FNCPUMWRMSR} */
    3208 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3209static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmMask(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32093210{
    32103211    /** @todo AMD SMM. */
     
    32233224
    32243225/** @callback_method_impl{FNCPUMWRMSR} */
    3225 static DECLCALLBACK(int) cpumMsrWr_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3226static DECLCALLBACK(int) cpumMsrWr_AmdK8VmCr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32263227{
    32273228    /** @todo AMD SVM. */
     
    32403241
    32413242/** @callback_method_impl{FNCPUMWRMSR} */
    3242 static DECLCALLBACK(int) cpumMsrWr_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3243static DECLCALLBACK(int) cpumMsrWr_AmdK8IgnNe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32433244{
    32443245    /** @todo AMD IGNNE\# control. */
     
    32573258
    32583259/** @callback_method_impl{FNCPUMWRMSR} */
    3259 static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3260static DECLCALLBACK(int) cpumMsrWr_AmdK8SmmCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32603261{
    32613262    /** @todo AMD SMM. */
     
    32743275
    32753276/** @callback_method_impl{FNCPUMWRMSR} */
    3276 static DECLCALLBACK(int) cpumMsrWr_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3277static DECLCALLBACK(int) cpumMsrWr_AmdK8VmHSavePa(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32773278{
    32783279    /** @todo AMD SVM. */
     
    32913292
    32923293/** @callback_method_impl{FNCPUMWRMSR} */
    3293 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3294static DECLCALLBACK(int) cpumMsrWr_AmdFam10hVmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    32943295{
    32953296    /** @todo AMD SVM. */
     
    33083309
    33093310/** @callback_method_impl{FNCPUMWRMSR} */
    3310 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3311static DECLCALLBACK(int) cpumMsrWr_AmdFam10hSmmLockKey(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33113312{
    33123313    /** @todo AMD SMM. */
     
    33253326
    33263327/** @callback_method_impl{FNCPUMWRMSR} */
    3327 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3328static DECLCALLBACK(int) cpumMsrWr_AmdFam10hLocalSmiStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33283329{
    33293330    /** @todo AMD SMM/SMI. */
     
    33363337{
    33373338    /** @todo AMD OS visible workaround. */
    3338     *puValue = pRange->uInitOrReadValue;
    3339     return VINF_SUCCESS;
    3340 }
    3341 
    3342 
    3343 /** @callback_method_impl{FNCPUMWRMSR} */
    3344 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3339    *puValue = pRange->uValue;
     3340    return VINF_SUCCESS;
     3341}
     3342
     3343
     3344/** @callback_method_impl{FNCPUMWRMSR} */
     3345static DECLCALLBACK(int) cpumMsrWr_AmdFam10hOsVisWrkIdLength(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33453346{
    33463347    /** @todo AMD OS visible workaround. */
     
    33593360
    33603361/** @callback_method_impl{FNCPUMWRMSR} */
    3361 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3362static DECLCALLBACK(int) cpumMsrWr_AmdFam10hOsVisWrkStatus(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33623363{
    33633364    /** @todo AMD OS visible workaround. */
     
    33763377
    33773378/** @callback_method_impl{FNCPUMWRMSR} */
    3378 static DECLCALLBACK(int) cpumMsrWr_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3379static DECLCALLBACK(int) cpumMsrWr_AmdFam16hL2IPerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33793380{
    33803381    /** @todo AMD L2I performance counters. */
     
    33933394
    33943395/** @callback_method_impl{FNCPUMWRMSR} */
    3395 static DECLCALLBACK(int) cpumMsrWr_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3396static DECLCALLBACK(int) cpumMsrWr_AmdFam16hL2IPerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    33963397{
    33973398    /** @todo AMD L2I performance counters. */
     
    34103411
    34113412/** @callback_method_impl{FNCPUMWRMSR} */
    3412 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3413static DECLCALLBACK(int) cpumMsrWr_AmdFam15hNorthbridgePerfCtlN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    34133414{
    34143415    /** @todo AMD Northbridge performance counters. */
     
    34273428
    34283429/** @callback_method_impl{FNCPUMWRMSR} */
    3429 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3430static DECLCALLBACK(int) cpumMsrWr_AmdFam15hNorthbridgePerfCtrN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    34303431{
    34313432    /** @todo AMD Northbridge performance counters. */
     
    34403441     *  cpus. Need to be explored and verify K7 presence. */
    34413442    /** @todo Undocumented register only seen mentioned in fam15h erratum \#608. */
    3442     *puValue = pRange->uInitOrReadValue;
    3443     return VINF_SUCCESS;
    3444 }
    3445 
    3446 
    3447 /** @callback_method_impl{FNCPUMWRMSR} */
    3448 static DECLCALLBACK(int) cpumMsrWr_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3443    *puValue = pRange->uValue;
     3444    return VINF_SUCCESS;
     3445}
     3446
     3447
     3448/** @callback_method_impl{FNCPUMWRMSR} */
     3449static DECLCALLBACK(int) cpumMsrWr_AmdK7MicrocodeCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    34493450{
    34503451    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    34623463    /** @todo Undocumented register only seen mentioned in fam16h BKDG r3.00 when
    34633464     *        describing EBL_CR_POWERON. */
    3464     *puValue = pRange->uInitOrReadValue;
    3465     return VINF_SUCCESS;
    3466 }
    3467 
    3468 
    3469 /** @callback_method_impl{FNCPUMWRMSR} */
    3470 static DECLCALLBACK(int) cpumMsrWr_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3465    *puValue = pRange->uValue;
     3466    return VINF_SUCCESS;
     3467}
     3468
     3469
     3470/** @callback_method_impl{FNCPUMWRMSR} */
     3471static DECLCALLBACK(int) cpumMsrWr_AmdK7ClusterIdMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    34713472{
    34723473    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    34913492
    34923493/** @callback_method_impl{FNCPUMWRMSR} */
    3493 static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3494static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd07hEbax(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    34943495{
    34953496    /** @todo Changing CPUID leaf 7/0. */
     
    35113512
    35123513/** @callback_method_impl{FNCPUMWRMSR} */
    3513 static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3514static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd06hEcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    35143515{
    35153516    /** @todo Changing CPUID leaf 6. */
     
    35313532
    35323533/** @callback_method_impl{FNCPUMWRMSR} */
    3533 static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3534static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlStd01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    35343535{
    35353536    /** @todo Changing CPUID leaf 0x80000001. */
     
    35513552
    35523553/** @callback_method_impl{FNCPUMWRMSR} */
    3553 static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3554static DECLCALLBACK(int) cpumMsrWr_AmdK8CpuIdCtlExt01hEdcx(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    35543555{
    35553556    /** @todo Changing CPUID leaf 0x80000001. */
     
    35623563{
    35633564    /** @todo Fake AMD microcode patching.  */
    3564     *puValue = pRange->uInitOrReadValue;
    3565     return VINF_SUCCESS;
    3566 }
    3567 
    3568 
    3569 /** @callback_method_impl{FNCPUMWRMSR} */
    3570 static DECLCALLBACK(int) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3565    *puValue = pRange->uValue;
     3566    return VINF_SUCCESS;
     3567}
     3568
     3569
     3570/** @callback_method_impl{FNCPUMWRMSR} */
     3571static DECLCALLBACK(int) cpumMsrWr_AmdK8PatchLoader(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    35713572{
    35723573    /** @todo Fake AMD microcode patching.  */
     
    35873588
    35883589/** @callback_method_impl{FNCPUMWRMSR} */
    3589 static DECLCALLBACK(int) cpumMsrWr_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3590static DECLCALLBACK(int) cpumMsrWr_AmdK7DebugStatusMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    35903591{
    35913592    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    36083609
    36093610/** @callback_method_impl{FNCPUMWRMSR} */
    3610 static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3611static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTraceBaseMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    36113612{
    36123613    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    36293630
    36303631/** @callback_method_impl{FNCPUMWRMSR} */
    3631 static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3632static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTracePtrMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    36323633{
    36333634    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    36503651
    36513652/** @callback_method_impl{FNCPUMWRMSR} */
    3652 static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3653static DECLCALLBACK(int) cpumMsrWr_AmdK7BHTraceLimitMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    36533654{
    36543655    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    36713672
    36723673/** @callback_method_impl{FNCPUMWRMSR} */
    3673 static DECLCALLBACK(int) cpumMsrWr_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3674static DECLCALLBACK(int) cpumMsrWr_AmdK7HardwareDebugToolCfgMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    36743675{
    36753676    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    36923693
    36933694/** @callback_method_impl{FNCPUMWRMSR} */
    3694 static DECLCALLBACK(int) cpumMsrWr_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3695static DECLCALLBACK(int) cpumMsrWr_AmdK7FastFlushCountMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    36953696{
    36963697    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    37133714
    37143715/** @callback_method_impl{FNCPUMWRMSR} */
    3715 static DECLCALLBACK(int) cpumMsrWr_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3716static DECLCALLBACK(int) cpumMsrWr_AmdK7NodeId(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    37163717{
    37173718    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    37343735
    37353736/** @callback_method_impl{FNCPUMWRMSR} */
    3736 static DECLCALLBACK(int) cpumMsrWr_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3737static DECLCALLBACK(int) cpumMsrWr_AmdK7DrXAddrMaskN(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    37373738{
    37383739    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    37553756
    37563757/** @callback_method_impl{FNCPUMWRMSR} */
    3757 static DECLCALLBACK(int) cpumMsrWr_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3758static DECLCALLBACK(int) cpumMsrWr_AmdK7Dr0DataMatchMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    37583759{
    37593760    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    37763777
    37773778/** @callback_method_impl{FNCPUMWRMSR} */
    3778 static DECLCALLBACK(int) cpumMsrWr_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3779static DECLCALLBACK(int) cpumMsrWr_AmdK7Dr0DataMaskMaybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    37793780{
    37803781    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    37973798
    37983799/** @callback_method_impl{FNCPUMWRMSR} */
    3799 static DECLCALLBACK(int) cpumMsrWr_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3800static DECLCALLBACK(int) cpumMsrWr_AmdK7LoadStoreCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    38003801{
    38013802    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    38183819
    38193820/** @callback_method_impl{FNCPUMWRMSR} */
    3820 static DECLCALLBACK(int) cpumMsrWr_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3821static DECLCALLBACK(int) cpumMsrWr_AmdK7InstrCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    38213822{
    38223823    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    38393840
    38403841/** @callback_method_impl{FNCPUMWRMSR} */
    3841 static DECLCALLBACK(int) cpumMsrWr_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3842static DECLCALLBACK(int) cpumMsrWr_AmdK7DataCacheCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    38423843{
    38433844    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    38603861
    38613862/** @callback_method_impl{FNCPUMWRMSR} */
    3862 static DECLCALLBACK(int) cpumMsrWr_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3863static DECLCALLBACK(int) cpumMsrWr_AmdK7BusUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    38633864{
    38643865    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    38813882
    38823883/** @callback_method_impl{FNCPUMWRMSR} */
    3883 static DECLCALLBACK(int) cpumMsrWr_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3884static DECLCALLBACK(int) cpumMsrWr_AmdK7DebugCtl2Maybe(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    38843885{
    38853886    /** @todo Allegedly requiring edi=0x9c5a203a when execuing rdmsr/wrmsr on older
     
    39003901
    39013902/** @callback_method_impl{FNCPUMWRMSR} */
    3902 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3903static DECLCALLBACK(int) cpumMsrWr_AmdFam15hFpuCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39033904{
    39043905    /** @todo AMD FPU config. */
     
    39173918
    39183919/** @callback_method_impl{FNCPUMWRMSR} */
    3919 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3920static DECLCALLBACK(int) cpumMsrWr_AmdFam15hDecoderCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39203921{
    39213922    /** @todo AMD decoder config. */
     
    39353936
    39363937/** @callback_method_impl{FNCPUMWRMSR} */
    3937 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3938static DECLCALLBACK(int) cpumMsrWr_AmdFam10hBusUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39383939{
    39393940    /* Note! 10h and 16h */
     
    39533954
    39543955/** @callback_method_impl{FNCPUMWRMSR} */
    3955 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3956static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39563957{
    39573958    /** @todo AMD unit config. */
     
    39703971
    39713972/** @callback_method_impl{FNCPUMWRMSR} */
    3972 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3973static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39733974{
    39743975    /** @todo AMD unit config 2. */
     
    39873988
    39883989/** @callback_method_impl{FNCPUMWRMSR} */
    3989 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     3990static DECLCALLBACK(int) cpumMsrWr_AmdFam15hCombUnitCfg3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    39903991{
    39913992    /** @todo AMD combined unit config 3. */
     
    40044005
    40054006/** @callback_method_impl{FNCPUMWRMSR} */
    4006 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4007static DECLCALLBACK(int) cpumMsrWr_AmdFam15hExecUnitCfg(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40074008{
    40084009    /** @todo AMD execution unit config. */
     
    40214022
    40224023/** @callback_method_impl{FNCPUMWRMSR} */
    4023 static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4024static DECLCALLBACK(int) cpumMsrWr_AmdFam15hLoadStoreCfg2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40244025{
    40254026    /** @todo AMD load-store config 2. */
     
    40384039
    40394040/** @callback_method_impl{FNCPUMWRMSR} */
    4040 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4041static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40414042{
    40424043    /** @todo AMD IBS. */
     
    40554056
    40564057/** @callback_method_impl{FNCPUMWRMSR} */
    4057 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4058static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40584059{
    40594060    /** @todo AMD IBS. */
     
    40724073
    40734074/** @callback_method_impl{FNCPUMWRMSR} */
    4074 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4075static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsFetchPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40754076{
    40764077    /** @todo AMD IBS. */
     
    40894090
    40904091/** @callback_method_impl{FNCPUMWRMSR} */
    4091 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4092static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpExecCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    40924093{
    40934094    /** @todo AMD IBS. */
     
    41064107
    41074108/** @callback_method_impl{FNCPUMWRMSR} */
    4108 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4109static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpRip(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    41094110{
    41104111    /** @todo AMD IBS. */
     
    41284129
    41294130/** @callback_method_impl{FNCPUMWRMSR} */
    4130 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4131static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    41314132{
    41324133    /** @todo AMD IBS. */
     
    41454146
    41464147/** @callback_method_impl{FNCPUMWRMSR} */
    4147 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4148static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData2(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    41484149{
    41494150    /** @todo AMD IBS. */
     
    41624163
    41634164/** @callback_method_impl{FNCPUMWRMSR} */
    4164 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4165static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsOpData3(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    41654166{
    41664167    /** @todo AMD IBS. */
     
    41794180
    41804181/** @callback_method_impl{FNCPUMWRMSR} */
    4181 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4182static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsDcLinAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    41824183{
    41834184    /** @todo AMD IBS. */
     
    42014202
    42024203/** @callback_method_impl{FNCPUMWRMSR} */
    4203 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4204static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsDcPhysAddr(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    42044205{
    42054206    /** @todo AMD IBS. */
     
    42184219
    42194220/** @callback_method_impl{FNCPUMWRMSR} */
    4220 static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4221static DECLCALLBACK(int) cpumMsrWr_AmdFam10hIbsCtl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    42214222{
    42224223    /** @todo AMD IBS. */
     
    42354236
    42364237/** @callback_method_impl{FNCPUMWRMSR} */
    4237 static DECLCALLBACK(int) cpumMsrWr_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue)
     4238static DECLCALLBACK(int) cpumMsrWr_AmdFam14hIbsBrTarget(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t uValue, uint64_t uRawValue)
    42384239{
    42394240    /** @todo AMD IBS. */
     
    48594860            }
    48604861
    4861             rc = pfnWrMsr(pVCpu, idMsr, pRange, uValueAdjusted);
     4862            rc = pfnWrMsr(pVCpu, idMsr, pRange, uValueAdjusted, uValue);
    48624863            if (RT_SUCCESS(rc))
    48634864            {
  • trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp

    r49893 r49972  
    22652265            pLeaf = cpumCpuIdGetLeaf(pVM, UINT32_C(0x00000001), 0);
    22662266            if (pLeaf)
    2267                 pVM->cpum.s.aGuestCpuIdStd[1].ecx |= X86_CPUID_FEATURE_ECX_HVP;
     2267                pVM->cpum.s.aGuestCpuIdStd[1].ecx = pLeaf->uEcx |= X86_CPUID_FEATURE_ECX_HVP;
    22682268            pVM->cpum.s.GuestFeatures.fHypervisorPresent = 1;
    22692269            LogRel(("CPUM: SetGuestCpuIdFeature: Enabled Hypervisor Present bit\n"));
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r49954 r49972  
    753753            MsrRange.enmWrFn = kCpumMsrWrFn_IgnoreWrite;
    754754
    755             rc = CFGMR3QueryU64Def(pNode, "Value", &MsrRange.uInitOrReadValue, 0);
     755            rc = CFGMR3QueryU64Def(pNode, "Value", &MsrRange.uValue, 0);
    756756            if (RT_FAILURE(rc))
    757757                return VMSetError(pVM, rc, RT_SRC_POS, "Invalid MSR entry '%s': Error querying 'Value' value: %Rrc\n",
  • trunk/src/VBox/VMM/VMMR3/CPUMR3Db.cpp

    r49966 r49972  
    627627    STAM_REL_REG(pVM, &pCpum->cMsrWrites,               STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/Writes",
    628628                 STAMUNIT_OCCURENCES, "All RDMSRs making it to CPUM.");
    629     STAM_REL_REG(pVM, &pCpum->cMsrWritesToIgnoredBits,  STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/WritesRaisingGP",
     629    STAM_REL_REG(pVM, &pCpum->cMsrWritesRaiseGp,        STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/WritesRaisingGP",
    630630                 STAMUNIT_OCCURENCES, "WRMSR raising #GPs, except unknown MSRs.");
    631     STAM_REL_REG(pVM, &pCpum->cMsrWritesRaiseGp,        STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/WritesToIgnoredBits",
     631    STAM_REL_REG(pVM, &pCpum->cMsrWritesToIgnoredBits,  STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/WritesToIgnoredBits",
    632632                 STAMUNIT_OCCURENCES, "Writing of ignored bits.");
    633633    STAM_REL_REG(pVM, &pCpum->cMsrWritesUnknown,        STAMTYPE_COUNTER,   "/CPUM/MSR-Totals/WritesUnknown",
  • trunk/src/VBox/VMM/VMMR3/cpus/AMD_Athlon_64_3200.h

    r49966 r49972  
    113113    MFZ(0x000002ff, "IA32_MTRR_DEF_TYPE", Ia32MtrrDefType, Ia32MtrrDefType, GuestMsrs.msr.MtrrDefType, 0, UINT64_C(0xfffffffffffff3f8)),
    114114    RFN(0x00000400, 0x00000413, "IA32_MCi_CTL_STATUS_ADDR_MISC", Ia32McCtlStatusAddrMiscN, Ia32McCtlStatusAddrMiscN),
    115     MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x800, 0xfe, UINT64_C(0xfffffffffffff600)),
     115    MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x800, 0xfe, UINT64_C(0xfffffffffffff200)),
    116116    MFN(0xc0000081, "AMD64_STAR", Amd64SyscallTarget, Amd64SyscallTarget), /* value=0x0 */
    117117    MFN(0xc0000082, "AMD64_STAR64", Amd64LongSyscallTarget, Amd64LongSyscallTarget), /* value=0x0 */
  • trunk/src/VBox/VMM/VMMR3/cpus/AMD_FX_8150_Eight_Core.h

    r49922 r49972  
    137137    MFZ(0x000002ff, "IA32_MTRR_DEF_TYPE", Ia32MtrrDefType, Ia32MtrrDefType, GuestMsrs.msr.MtrrDefType, 0, UINT64_C(0xfffffffffffff3f8)),
    138138    RFN(0x00000400, 0x0000041b, "IA32_MCi_CTL_STATUS_ADDR_MISC", Ia32McCtlStatusAddrMiscN, Ia32McCtlStatusAddrMiscN),
    139     MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x4d01, 0xfe, UINT64_C(0xffffffffffff8600)),
     139    MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x4d01, 0xfe, UINT64_C(0xffffffffffff8200)),
    140140    MFN(0xc0000081, "AMD64_STAR", Amd64SyscallTarget, Amd64SyscallTarget), /* value=0x230010`00000000 */
    141141    MFN(0xc0000082, "AMD64_STAR64", Amd64LongSyscallTarget, Amd64LongSyscallTarget), /* value=0xfffff800`02ed0bc0 */
  • trunk/src/VBox/VMM/VMMR3/cpus/AMD_Phenom_II_X6_1100T.h

    r49952 r49972  
    122122    MFZ(0x000002ff, "IA32_MTRR_DEF_TYPE", Ia32MtrrDefType, Ia32MtrrDefType, GuestMsrs.msr.MtrrDefType, 0, UINT64_C(0xfffffffffffff3f8)),
    123123    RFN(0x00000400, 0x00000417, "IA32_MCi_CTL_STATUS_ADDR_MISC", Ia32McCtlStatusAddrMiscN, Ia32McCtlStatusAddrMiscN),
    124     MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0xd01, 0xfe, UINT64_C(0xffffffffffff8600)),
     124    MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0xd01, 0xfe, UINT64_C(0xffffffffffff8200)),
    125125    MFN(0xc0000081, "AMD64_STAR", Amd64SyscallTarget, Amd64SyscallTarget), /* value=0x230010`00000000 */
    126126    MFN(0xc0000082, "AMD64_STAR64", Amd64LongSyscallTarget, Amd64LongSyscallTarget), /* value=0xffffffff`8174b4f0 */
  • trunk/src/VBox/VMM/VMMR3/cpus/Quad_Core_AMD_Opteron_2384.h

    r49922 r49972  
    119119    MFZ(0x000002ff, "IA32_MTRR_DEF_TYPE", Ia32MtrrDefType, Ia32MtrrDefType, GuestMsrs.msr.MtrrDefType, 0, UINT64_C(0xfffffffffffff3f8)),
    120120    RFN(0x00000400, 0x00000417, "IA32_MCi_CTL_STATUS_ADDR_MISC", Ia32McCtlStatusAddrMiscN, Ia32McCtlStatusAddrMiscN),
    121     MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x4d01, 0xfe, UINT64_C(0xffffffffffff8600)),
     121    MFX(0xc0000080, "AMD64_EFER", Amd64Efer, Amd64Efer, 0x4d01, 0xfe, UINT64_C(0xffffffffffff8200)),
    122122    MFN(0xc0000081, "AMD64_STAR", Amd64SyscallTarget, Amd64SyscallTarget), /* value=0x230010`00000000 */
    123123    MFN(0xc0000082, "AMD64_STAR64", Amd64LongSyscallTarget, Amd64LongSyscallTarget), /* value=0xfffff800`0245dd00 */
  • trunk/src/VBox/VMM/include/CPUMInternal.h

    r49966 r49972  
    118118    /** Invalid zero value. */
    119119    kCpumMsrRdFn_Invalid = 0,
    120     /** Return the CPUMMSRRANGE::uInitOrReadValue. */
     120    /** Return the CPUMMSRRANGE::uValue. */
    121121    kCpumMsrRdFn_FixedValue,
    122122    /** Alias to the MSR range starting at the MSR given by
    123      * CPUMMSRRANGE::uInitOrReadValue.  Must be used in pair with
     123     * CPUMMSRRANGE::uValue.  Must be used in pair with
    124124     * kCpumMsrWrFn_MsrAlias. */
    125125    kCpumMsrRdFn_MsrAlias,
     
    388388    kCpumMsrWrFn_ReadOnly,
    389389    /** Alias to the MSR range starting at the MSR given by
    390      * CPUMMSRRANGE::uInitOrReadValue.  Must be used in pair with
     390     * CPUMMSRRANGE::uValue.  Must be used in pair with
    391391     * kCpumMsrRdFn_MsrAlias. */
    392392    kCpumMsrWrFn_MsrAlias,
     
    619619     * offCpumCpu must be UINT16_MAX in that case, otherwise it must be a valid
    620620     * offset into CPUM. */
    621     uint64_t    uInitOrReadValue;
     621    uint64_t    uValue;
    622622    /** The bits to ignore when writing. [24]   */
    623623    uint64_t    fWrIgnMask;
  • trunk/src/VBox/VMM/tools/VBoxCpuReport.cpp

    r49966 r49972  
    27752775
    27762776
     2777/**
     2778 * Generic report for an MSR implemented by functions, extended version.
     2779 *
     2780 * @returns VBox status code.
     2781 * @param   uMsr            The MSR.
     2782 * @param   pszRdWrFnName   The read/write function name, optional.
     2783 * @param   uValue          The MSR range value.
     2784 * @param   fSkipMask       Mask of bits to skip.
     2785 * @param   fNoGpMask       Mask of bits to remove from the GP mask after
     2786 *                          probing
     2787 * @param   pszAnnotate     Annotation.
     2788 */
    27772789static int reportMsr_GenFunctionEx(uint32_t uMsr, const char *pszRdWrFnName, uint32_t uValue,
    2778                                    uint64_t fSkipMask, const char *pszAnnotate)
     2790                                   uint64_t fSkipMask, uint64_t fNoGpMask, const char *pszAnnotate)
    27792791{
    27802792    /* Resolve default function name. */
     
    27922804    if (RT_SUCCESS(rc))
    27932805    {
     2806        fGpMask &= ~fNoGpMask;
     2807
    27942808        if (fGpMask == UINT64_MAX && uValue == 0 && !msrProberModifyZero(uMsr))
    27952809            rc = printMsrFunctionReadOnly(uMsr, pszRdWrFnName, pszAnnotate);
     
    28222836    if (vbCpuRepSupportsX2Apic())
    28232837        fSkipMask |= RT_BIT_64(10);
    2824     return reportMsr_GenFunctionEx(uMsr, "Ia32ApicBase", uValue, fSkipMask, NULL);
     2838    return reportMsr_GenFunctionEx(uMsr, "Ia32ApicBase", uValue, fSkipMask, 0, NULL);
    28252839}
    28262840
     
    31443158    }
    31453159
    3146     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, NULL);
     3160    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, MSR_K6_EFER_LMA, NULL);
    31473161}
    31483162
     
    33223336                  |  RT_BIT(0)   /* SysAckLimit */;
    33233337
    3324     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3338    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    33253339}
    33263340
     
    33543368    fSkipMask |= RT_BIT(0);      /* SMMLOCK */
    33553369
    3356     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3370    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    33573371}
    33583372
     
    33703384    uint64_t fSkipMask = RT_BIT(4) | RT_BIT(3);
    33713385    fSkipMask |= (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & X86_PAGE_4K_BASE_MASK;
    3372     return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010016) / 2, fSkipMask, annotateValue(uValue));
     3386    return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010016) / 2, fSkipMask, 0, annotateValue(uValue));
    33733387}
    33743388
     
    33863400    uint64_t fSkipMask = RT_BIT(11);
    33873401    fSkipMask |= (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & X86_PAGE_4K_BASE_MASK;
    3388     return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010017) / 2, fSkipMask, annotateValue(uValue));
     3402    return reportMsr_GenFunctionEx(uMsr, NULL, (uMsr - 0xc0010017) / 2, fSkipMask, 0, annotateValue(uValue));
    33893403}
    33903404
     
    34013415    /* Skip know bits here, as harm seems to come from messing with them. */
    34023416    uint64_t fSkipMask = (RT_BIT_64(vbCpuRepGetPhysAddrWidth()) - 1) & ~(RT_BIT_64(23) - 1);
    3403     return reportMsr_GenFunctionEx(uMsr, NULL, uMsr == 0xc001001d, fSkipMask, annotateValue(uValue));
     3417    return reportMsr_GenFunctionEx(uMsr, NULL, uMsr == 0xc001001d, fSkipMask, 0, annotateValue(uValue));
    34043418}
    34053419
     
    34863500    fSkipMask |= UINT32_C(0x0000003f);              /* CpuFid */
    34873501
    3488     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3502    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    34893503}
    34903504
     
    35563570        fSkipMask |= RT_BIT_64(28); /* Unknown killer bit, possibly applicable to other microarchs. */
    35573571    }
    3558     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3572    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    35593573}
    35603574
     
    35773591                       | RT_BIT_64(10) /* DcacheAggressivePriority */;
    35783592    fSkipMask |= RT_BIT_64(46) | RT_BIT_64(45); /* Killer field. Seen bit 46 set, 45 clear. Messing with either means reboot/BSOD. */
    3579     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3593    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    35803594}
    35813595
     
    35933607    uint64_t fSkipMask = RT_BIT_64(54) /* LateSbzResync  */;
    35943608    fSkipMask |= RT_BIT_64(35); /* Undocumented killer bit. */
    3595     return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, annotateValue(uValue));
     3609    return reportMsr_GenFunctionEx(uMsr, NULL, uValue, fSkipMask, 0, annotateValue(uValue));
    35963610}
    35973611
     
    36833697            rc = reportMsr_GenX2Apic(&paMsrs[i], cMsrs - i, &i);
    36843698        else if (uMsr == 0x00002000 && g_enmVendor == CPUMCPUVENDOR_INTEL)
    3685             rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 0, X86_CR0_PE | X86_CR0_PG,
     3699            rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 0, X86_CR0_PE | X86_CR0_PG, 0,
    36863700                                         annotateIfMissingBits(uValue, X86_CR0_PE | X86_CR0_PE | X86_CR0_ET));
    36873701        else if (uMsr == 0x00002002 && g_enmVendor == CPUMCPUVENDOR_INTEL)
    3688             rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 2, 0, annotateValue(uValue));
     3702            rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 2, 0, 0, annotateValue(uValue));
    36893703        else if (uMsr == 0x00002003 && g_enmVendor == CPUMCPUVENDOR_INTEL)
    36903704        {
     
    36923706            if (!vbCpuRepSupportsPae())
    36933707                fCr3Mask &= X86_CR3_PAGE_MASK | X86_CR3_AMD64_PAGE_MASK;
    3694             rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 3, fCr3Mask, annotateValue(uValue));
     3708            rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 3, fCr3Mask, 0, annotateValue(uValue));
    36953709        }
    36963710        else if (uMsr == 0x00002004 && g_enmVendor == CPUMCPUVENDOR_INTEL)
    36973711            rc = reportMsr_GenFunctionEx(uMsr, "IntelP6CrN", 4,
    3698                                          X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE | X86_CR4_SMXE,
     3712                                         X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE | X86_CR4_SMXE, 0,
    36993713                                         annotateValue(uValue));
    37003714        else if (uMsr == 0xc0000080)
    37013715            rc = reportMsr_Amd64Efer(uMsr, uValue);
    37023716        else if (uMsr == 0xc0000082 || uMsr == 0xc0000083 || uMsr == 0xc0000100 || uMsr == 0xc0000101 || uMsr == 0xc0000102)
    3703             rc = reportMsr_GenFunctionEx(uMsr, NULL, 0, UINT64_C(0xffff800000000000), annotateValue(uValue)); /* Canoncial address hack. */
     3717            rc = reportMsr_GenFunctionEx(uMsr, NULL, 0, UINT64_C(0xffff800000000000), 0, annotateValue(uValue)); /* Canoncial address hack. */
    37043718        else if (uMsr >= 0xc0000408 && uMsr <= 0xc000040f)
    37053719            rc = reportMsr_AmdFam10hMc4MiscN(&paMsrs[i], cMsrs - i, &i);
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