VirtualBox

Ignore:
Timestamp:
May 28, 2018 2:47:51 PM (7 years ago)
Author:
vboxsync
Message:

NEM: Sync more MSR state; don't treat unrecoverable exceptions as triple fault because checking with IEM (need more checking). bugref:9044

File:
1 edited

Legend:

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

    r72208 r72358  
    232232
    233233
     234/**
     235 * Get fixed IA32_FEATURE_CONTROL value for NEM and cpumMsrRd_Ia32FeatureControl.
     236 *
     237 * @returns Fixed IA32_FEATURE_CONTROL value.
     238 * @param   pVCpu           The cross context per CPU structure.
     239 */
     240VMM_INT_DECL(uint64_t) CPUMGetGuestIa32FeatureControl(PVMCPU pVCpu)
     241{
     242    RT_NOREF_PV(pVCpu);
     243    return 1; /* Locked, no VT-X, no SYSENTER micromanagement. */
     244}
     245
    234246/** @callback_method_impl{FNCPUMRDMSR} */
    235247static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32FeatureControl(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    236248{
    237     RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
    238     *puValue = 1; /* Locked, no VT-X, no SYSENTER micromanagement. */
     249    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     250    *puValue = CPUMGetGuestIa32FeatureControl(pVCpu);
    239251    return VINF_SUCCESS;
    240252}
     
    384396
    385397
    386 /** @callback_method_impl{FNCPUMRDMSR} */
    387 static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
    388 {
    389     RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     398/**
     399 * Get fixed IA32_MTRR_CAP value for NEM and cpumMsrRd_Ia32MtrrCap.
     400 *
     401 * @returns Fixed IA32_MTRR_CAP value.
     402 * @param   pVCpu           The cross context per CPU structure.
     403 */
     404VMM_INT_DECL(uint64_t) CPUMGetGuestIa32MtrrCap(PVMCPU pVCpu)
     405{
     406    RT_NOREF_PV(pVCpu);
    390407
    391408    /* This is currently a bit weird. :-) */
     
    394411    bool const      fFixedRangeRegisters            = false;
    395412    bool const      fWriteCombiningType             = false;
    396     *puValue = cVariableRangeRegs
    397              | (fFixedRangeRegisters            ? RT_BIT_64(8)  : 0)
    398              | (fWriteCombiningType             ? RT_BIT_64(10) : 0)
    399              | (fSystemManagementRangeRegisters ? RT_BIT_64(11) : 0);
     413    return cVariableRangeRegs
     414         | (fFixedRangeRegisters            ? RT_BIT_64(8)  : 0)
     415         | (fWriteCombiningType             ? RT_BIT_64(10) : 0)
     416         | (fSystemManagementRangeRegisters ? RT_BIT_64(11) : 0);
     417}
     418
     419/** @callback_method_impl{FNCPUMRDMSR} */
     420static DECLCALLBACK(VBOXSTRICTRC) cpumMsrRd_Ia32MtrrCap(PVMCPU pVCpu, uint32_t idMsr, PCCPUMMSRRANGE pRange, uint64_t *puValue)
     421{
     422    RT_NOREF_PV(idMsr); RT_NOREF_PV(pRange);
     423    *puValue = CPUMGetGuestIa32MtrrCap(pVCpu);
    400424    return VINF_SUCCESS;
    401425}
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