VirtualBox

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


Ignore:
Timestamp:
Sep 30, 2008 2:54:51 PM (16 years ago)
Author:
vboxsync
Message:

Solved some overwritten patch instruction issues. (triggered assertions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/PATM/PATM.cpp

    r12534 r12835  
    58485848        if (!pRec || !pRec->fDirty)
    58495849            break;  /* no more dirty instructions */
     5850
     5851        /* In case of complex instructions the next guest instruction could be quite far off. */
     5852        pCurPatchInstrGC = pRec->Core.Key + pVM->patm.s.pPatchMemGC;
    58505853    }
    58515854
     
    60756078                }
    60766079            }
     6080        }
     6081        else
     6082        if (pPatch->patch.pPrivInstrGC == pNewEip)
     6083        {
     6084            /* Invalidated patch or first instruction overwritten.
     6085             * We can ignore the fPIF state in this case.
     6086             */
     6087            /* Reset the PATM stack. */
     6088            CTXSUFF(pVM->patm.s.pGCState)->Psp = PATM_STACK_SIZE;
     6089
     6090            Log(("Call to invalidated patch -> go back to the original instruction\n"));
     6091
     6092            pVM->patm.s.pGCStateHC->fPIF = 1;
     6093           
     6094            /* continue at the original instruction */
     6095            *ppNewEip = pNewEip - SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), 0);
     6096            STAM_PROFILE_ADV_STOP(&pVM->patm.s.StatHandleTrap, a);
     6097            return VINF_SUCCESS;
    60776098        }
    60786099
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