VirtualBox

Changeset 5393 in vbox for trunk/src


Ignore:
Timestamp:
Oct 19, 2007 5:28:17 PM (17 years ago)
Author:
vboxsync
Message:

When flushing a page because it's been reused, don't emulate instructions that fail interpretation. This gets rid of the majority of the failures due to SSE2 instructions on solaris.

File:
1 edited

Legend:

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

    r5392 r5393  
    707707     * Check if it's worth dealing with.
    708708     */
     709    bool fReused = false;
    709710    if (    (   pPage->cModifications < 48   /** @todo #define */ /** @todo need to check that it's not mapping EIP. */ /** @todo adjust this! */
    710711             || pPage->fCR3Mix)
    711         &&  !pgmPoolMonitorIsReused(pPage, &Cpu, pvFault)
     712        &&  !(fReused = pgmPoolMonitorIsReused(pPage, &Cpu, pvFault))
    712713        &&  !pgmPoolMonitorIsForking(pPool, &Cpu, GCPhysFault & PAGE_OFFSET_MASK))
    713714    {
     
    752753    /*
    753754     * Not worth it, so flush it.
     755     *
     756     * If we considered it to be reused, don't to back to ring-3
     757     * to emulate failed instructions since we usually cannot
     758     * interpret then. This may be a bit risky, in which case
     759     * the reuse detection must be fixed.
    754760     */
    755761    rc = pgmPoolAccessHandlerFlush(pVM, pPool, pPage, &Cpu, pRegFrame, GCPhysFault, pvFault);
     762    if (rc == VINF_EM_RAW_EMULATE_INSTR && fReused)
     763        rc = VINF_SUCCESS;
    756764    STAM_PROFILE_STOP_EX(&pVM->pgm.s.CTXSUFF(pPool)->CTXSUFF(StatMonitor), &pPool->CTXMID(StatMonitor,FlushPage), a);
    757765    return rc;
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