VirtualBox

Changeset 85970 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Sep 1, 2020 12:05:15 AM (4 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0.cpp: @todo regarding unnecessary segment field translation tables. Assertion and logging adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r85768 r85970  
    22592259    Assert(pGuestMsrLoad);
    22602260
    2261     LogFlowFunc(("pVCpu=%p idMsr=%#RX32 uGestMsrValue=%#RX64\n", pVCpu, idMsr, uGuestMsrValue));
     2261    LogFlowFunc(("pVCpu=%p idMsr=%#RX32 uGuestMsrValue=%#RX64\n", pVCpu, idMsr, uGuestMsrValue));
    22622262
    22632263    /* Check if the MSR already exists in the VM-entry MSR-load area. */
     
    72877287    Assert(iSegReg < X86_SREG_COUNT);
    72887288
     7289/** @todo r=bird: Aren't these translation tables a complete wast of time and
     7290 *        memory accesses?  As far as I can tell, the constants are in segment
     7291 *        order with a 2+ stepping.  Adding 4 macro functions to hm_vmx.h that
     7292 *        does the translation, like: @code
     7293 * #define VMX_VMCS_GUEST_SEG_BASE(a_iSegReg) \
     7294 *      (VMX_VMCS_GUEST_ES_BASE + (a_iSegReg) * 2)
     7295 *        @endcode
     7296 * The tables are in two different cache lines two, due to their size, so not
     7297 * great for locality either.
     7298 */
    72897299    uint32_t const idxSel   = g_aVmcsSegSel[iSegReg];
    72907300    uint32_t const idxLimit = g_aVmcsSegLimit[iSegReg];
     
    73057315    pSelReg->fFlags   = CPUMSELREG_FLAGS_VALID;
    73067316    pSelReg->u32Limit = u32Limit;
     7317#ifdef DEBUG_bird
     7318    if (pSelReg->u64Base != u64Base)
     7319        Log7(("HM: %.2s: base %RX64 -> %RX64\n", "ESCSSSDSFSGS" + iSegReg * 2, pSelReg->u64Base, u64Base));
     7320#endif
    73077321    pSelReg->u64Base  = u64Base;
    73087322    pSelReg->Attr.u   = u32Attr;
     
    1512615140    }
    1512715141    else
    15128         AssertMsg(rcStrict == VINF_CPUM_R3_MSR_READ, ("Unexpected IEMExecDecodedRdmsr rc (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict)));
     15142        AssertMsg(rcStrict == VINF_CPUM_R3_MSR_READ || rcStrict == VINF_EM_TRIPLE_FAULT,
     15143                  ("Unexpected IEMExecDecodedRdmsr rc (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict)));
    1512915144
    1513015145    return rcStrict;
     
    1526915284    }
    1527015285    else
    15271         AssertMsg(rcStrict == VINF_CPUM_R3_MSR_WRITE, ("Unexpected IEMExecDecodedWrmsr rc (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict)));
     15286        AssertMsg(rcStrict == VINF_CPUM_R3_MSR_WRITE || rcStrict == VINF_EM_TRIPLE_FAULT,
     15287                  ("Unexpected IEMExecDecodedWrmsr rc (%Rrc)\n", VBOXSTRICTRC_VAL(rcStrict)));
    1527215288
    1527315289    return rcStrict;
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