VirtualBox

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


Ignore:
Timestamp:
Oct 5, 2022 9:06:53 AM (2 years ago)
Author:
vboxsync
Message:

VMM/HMVMX,EM: Experiment with EMHistoryExec for vmread optimizations. bugref:10092

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

Legend:

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

    r96983 r96999  
    91519151    VBOXSTRICTRC rcStrict = IEMExecDecodedVmread(pVCpu, &ExitInfo);
    91529152    if (RT_LIKELY(rcStrict == VINF_SUCCESS))
     9153    {
    91539154        ASMAtomicUoOrU64(&VCPU_2_VMXSTATE(pVCpu).fCtxChanged, HM_CHANGED_GUEST_RIP | HM_CHANGED_GUEST_RFLAGS);
     9155
     9156# if 0 //ndef IN_NEM_DARWIN /** @todo this needs serious tuning still, slows down things enormously. */
     9157        /* Try for exit optimization.  This is on the following instruction
     9158           because it would be a waste of time to have to reinterpret the
     9159           already decoded vmwrite instruction. */
     9160        PCEMEXITREC pExitRec = EMHistoryUpdateFlagsAndType(pVCpu, EMEXIT_MAKE_FT(EMEXIT_F_KIND_EM, EMEXITTYPE_VMREAD));
     9161        if (pExitRec)
     9162        {
     9163            /* Frequent access or probing. */
     9164            rc = vmxHCImportGuestState(pVCpu, pVmxTransient->pVmcsInfo, HMVMX_CPUMCTX_EXTRN_ALL);
     9165            AssertRCReturn(rc, rc);
     9166
     9167            rcStrict = EMHistoryExec(pVCpu, pExitRec, 0);
     9168            Log4(("vmread/%u: %04x:%08RX64: EMHistoryExec -> %Rrc + %04x:%08RX64\n",
     9169                  pVCpu->idCpu, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip,
     9170                  VBOXSTRICTRC_VAL(rcStrict), pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip));
     9171            ASMAtomicUoOrU64(&VCPU_2_VMXSTATE(pVCpu).fCtxChanged, HM_CHANGED_ALL_GUEST);
     9172        }
     9173# endif
     9174    }
    91549175    else if (rcStrict == VINF_IEM_RAISED_XCPT)
    91559176    {
  • trunk/src/VBox/VMM/VMMR3/EMR3Dbg.cpp

    r96407 r96999  
    106106        case EMEXITTYPE_MOV_CRX:            return "MOV CRx";
    107107        case EMEXITTYPE_MOV_DRX:            return "MOV DRx";
     108        case EMEXITTYPE_VMREAD:             return "VMREAD";
     109        case EMEXITTYPE_VMWRITE:            return "VMWRITE";
    108110
    109111        /* Raw-mode only: */
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