VirtualBox

Changeset 72674 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 25, 2018 10:49:34 AM (7 years ago)
Author:
vboxsync
Message:

EM: Quietly deal with IEM errors VERR_IEM_INSTR_NOT_IMPLEMENTED and VERR_IEM_ASPECT_NOT_IMPLEMENTED. bugref:9198

File:
1 edited

Legend:

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

    r72657 r72674  
    478478                     VBOXSTRICTRC_VAL(rcStrict), ExecStats.cExits, ExecStats.cMaxExitDistance, ExecStats.cInstructions));
    479479            emHistoryExecSetContinueExitRecIdx(pVCpu, rcStrict, pExitRec);
     480
     481            /* Ignore instructions IEM doesn't know about. */
     482            if (   (   rcStrict != VERR_IEM_INSTR_NOT_IMPLEMENTED
     483                    && rcStrict != VERR_IEM_ASPECT_NOT_IMPLEMENTED)
     484                || ExecStats.cInstructions == 0)
     485            { /* likely */ }
     486            else
     487                rcStrict = VINF_SUCCESS;
     488
    480489            if (ExecStats.cExits > 1)
    481490                STAM_REL_COUNTER_ADD(&pVCpu->em.s.StatHistoryExecSavedExits, ExecStats.cExits - 1);
     
    501510                     VBOXSTRICTRC_VAL(rcStrict), ExecStats.cExits, ExecStats.cMaxExitDistance, ExecStats.cInstructions));
    502511            emHistoryExecSetContinueExitRecIdx(pVCpu, rcStrict, pExitRecUnconst);
    503             if (ExecStats.cExits >= 2)
     512            if (   ExecStats.cExits >= 2
     513                && RT_SUCCESS(rcStrict))
    504514            {
    505515                Assert(ExecStats.cMaxExitDistance > 0 && ExecStats.cMaxExitDistance <= 32);
     
    510520            }
    511521#ifndef IN_RING3
    512             else if (pVCpu->em.s.idxContinueExitRec != UINT16_MAX)
     522            else if (   pVCpu->em.s.idxContinueExitRec != UINT16_MAX
     523                     && RT_SUCCESS(rcStrict))
    513524            {
    514525                STAM_REL_COUNTER_INC(&pVCpu->em.s.StatHistoryProbedToRing3);
     
    522533                LogFlow(("EMHistoryExec/EXEC_PROBE: -> PROBED\n"));
    523534                STAM_REL_COUNTER_INC(&pVCpu->em.s.StatHistoryProbedNormal);
     535                if (   rcStrict == VERR_IEM_INSTR_NOT_IMPLEMENTED
     536                    || rcStrict == VERR_IEM_ASPECT_NOT_IMPLEMENTED)
     537                    rcStrict = VINF_SUCCESS;
    524538            }
    525539            STAM_REL_COUNTER_ADD(&pVCpu->em.s.StatHistoryProbeInstructions, ExecStats.cInstructions);
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