VirtualBox

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


Ignore:
Timestamp:
Sep 2, 2009 11:46:18 AM (15 years ago)
Author:
vboxsync
Message:

Also check for dirty pages

File:
1 edited

Legend:

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

    r22701 r22709  
    16091609
    16101610/**
     1611 * Check if the specified page is dirty (not write monitored)
     1612 *
     1613 * @return dirty or not
     1614 * @param   pVM             VM Handle.
     1615 * @param   GCPhys          Guest physical address
     1616 */
     1617bool pgmPoolIsDirtyPage(PVM pVM, RTGCPHYS GCPhys)
     1618{
     1619    if (!pPool->cDirtyPages)
     1620        return false;
     1621
     1622    for (unsigned i = 0; i < RT_ELEMENTS(pPool->aIdxDirtyPages); i++)
     1623    {
     1624        if (pPool->aIdxDirtyPages[idxSlot] != NIL_PGMPOOL_IDX)
     1625        {
     1626            PPGMPOOLPAGE pPage;
     1627            unsigned     idxPage = pPool->aIdxDirtyPages[idxSlot];
     1628            AssertRelease(idxPage != NIL_PGMPOOL_IDX);
     1629
     1630            pPage = &pPool->aPages[idxPage];
     1631            if (pPage->GCPhys == GCPhys)
     1632                return true;
     1633        }
     1634    }
     1635    return false;
     1636}
     1637
     1638/**
    16111639 * Reset all dirty pages by reinstating page monitoring.
    16121640 *
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