VirtualBox

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


Ignore:
Timestamp:
May 31, 2010 9:56:33 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62150
Message:

Rewrote dirty page flushing in pgmR3PoolClearAllRendezvous to avoid triggering assertions.

File:
1 edited

Legend:

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

    r29704 r29887  
    753753     *       recently removed MMIO ranges around that might otherwise end up asserting in pgmPoolTracDerefGCPhysHint
    754754     */
    755     pgmPoolResetDirtyPages(pVM);
     755    for (unsigned i = 0; i < RT_ELEMENTS(pPool->aIdxDirtyPages); i++)
     756        {
     757                PPGMPOOLPAGE pPage;
     758            unsigned     idxPage;
     759
     760            if (pPool->aIdxDirtyPages[i] == NIL_PGMPOOL_IDX)
     761                        continue;
     762
     763            idxPage = pPool->aIdxDirtyPages[i];
     764                AssertRelease(idxPage != NIL_PGMPOOL_IDX);
     765                pPage = &pPool->aPages[idxPage];
     766                Assert(pPage->idx == idxPage);
     767                Assert(pPage->iMonitoredNext == NIL_PGMPOOL_IDX && pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
     768
     769            AssertMsg(pPage->fDirty, ("Page %RGp (slot=%d) not marked dirty!", pPage->GCPhys, i));
     770
     771                Log(("Reactivate dirty page %RGp\n", pPage->GCPhys));
     772
     773                /* First write protect the page again to catch all write accesses. (before checking for changes -> SMP) */
     774            int rc = PGMHandlerPhysicalReset(pVM, pPage->GCPhys);
     775                Assert(rc == VINF_SUCCESS);
     776                pPage->fDirty = false;
     777
     778        pPool->aIdxDirtyPages[i] = NIL_PGMPOOL_IDX;
     779        }
    756780
    757781    /* Clear all dirty pages. */
    758782    pPool->idxFreeDirtyPage = 0;
    759783    pPool->cDirtyPages      = 0;
    760     for (unsigned i = 0; i < RT_ELEMENTS(pPool->aIdxDirtyPages); i++)
    761         pPool->aIdxDirtyPages[i] = NIL_PGMPOOL_IDX;
    762784#endif
    763785
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette