VirtualBox

Changeset 32091 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Aug 30, 2010 12:46:17 PM (14 years ago)
Author:
vboxsync
Message:

pgmPoolTrackPhysExtInsert: Fixed missing loop advancing, caused chains to be very short. Added missing rollout.

File:
1 edited

Legend:

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

    r32043 r32091  
    37753775    PPGMPOOLPHYSEXT paPhysExts = pPool->CTX_SUFF(paPhysExts);
    37763776
    3777     /* special common case. */
     3777    /*
     3778     * Special common cases.
     3779     */
     3780    if (paPhysExts[iPhysExt].aidx[1] == NIL_PGMPOOL_IDX)
     3781    {
     3782        paPhysExts[iPhysExt].aidx[1] = iShwPT;
     3783        paPhysExts[iPhysExt].apte[1] = iPte;
     3784        STAM_COUNTER_INC(&pVM->pgm.s.CTX_SUFF(pStats)->StatTrackAliasedMany);
     3785        LogFlow(("pgmPoolTrackPhysExtInsert: %d:{,%d pte %d,}\n", iPhysExt, iShwPT, iPte));
     3786        return PGMPOOL_TD_MAKE(PGMPOOL_TD_CREFS_PHYSEXT, iPhysExt);
     3787    }
    37783788    if (paPhysExts[iPhysExt].aidx[2] == NIL_PGMPOOL_IDX)
    37793789    {
     
    37843794        return PGMPOOL_TD_MAKE(PGMPOOL_TD_CREFS_PHYSEXT, iPhysExt);
    37853795    }
    3786 
    3787     /* general treatment. */
     3796    AssertCompile(RT_ELEMENTS(paPhysExts[iPhysExt].aidx) == 3);
     3797
     3798    /*
     3799     * General treatment.
     3800     */
    37883801    const uint16_t iPhysExtStart = iPhysExt;
    37893802    unsigned cMax = 15;
     
    38073820            return PGMPOOL_TD_MAKE(PGMPOOL_TD_CREFS_PHYSEXT, PGMPOOL_TD_IDX_OVERFLOWED);
    38083821        }
    3809     }
    3810 
    3811     /* add another extent to the list. */
     3822
     3823        /* advance */
     3824        iPhysExt = paPhysExts[iPhysExt].iNext;
     3825        if (iPhysExt == NIL_PGMPOOL_IDX)
     3826            break;
     3827    }
     3828
     3829    /*
     3830     * Add another extent to the list.
     3831     */
    38123832    PPGMPOOLPHYSEXT pNew = pgmPoolTrackPhysExtAlloc(pVM, &iPhysExt);
    38133833    if (!pNew)
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