VirtualBox

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


Ignore:
Timestamp:
Nov 18, 2009 5:15:02 PM (15 years ago)
Author:
vboxsync
Message:

PGM: Deal with write monitored pages without involving EMT. This works around the pcnet/pgm deadlocks (#4464 an #3775).

File:
1 edited

Legend:

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

    r24723 r24767  
    438438
    439439/**
     440 * Deal with a write monitored page.
     441 *
     442 * @returns VBox strict status code.
     443 *
     444 * @param   pVM         The VM address.
     445 * @param   pPage       The physical page tracking structure.
     446 *
     447 * @remarks Called from within the PGM critical section.
     448 */
     449void pgmPhysPageMakeWriteMonitoredWritable(PVM pVM, PPGMPAGE pPage)
     450{
     451    Assert(PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED);
     452    PGM_PAGE_SET_WRITTEN_TO(pPage);
     453    PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_ALLOCATED);
     454    Assert(pVM->pgm.s.cMonitoredPages > 0);
     455    pVM->pgm.s.cMonitoredPages--;
     456    pVM->pgm.s.cWrittenToPages++;
     457}
     458
     459
     460/**
    440461 * Deal with pages that are not writable, i.e. not in the ALLOCATED state.
    441462 *
     
    456477    {
    457478        case PGM_PAGE_STATE_WRITE_MONITORED:
    458             PGM_PAGE_SET_WRITTEN_TO(pPage);
    459             PGM_PAGE_SET_STATE(pPage, PGM_PAGE_STATE_ALLOCATED);
    460             Assert(pVM->pgm.s.cMonitoredPages > 0);
    461             pVM->pgm.s.cMonitoredPages--;
    462             pVM->pgm.s.cWrittenToPages++;
     479            pgmPhysPageMakeWriteMonitoredWritable(pVM, pPage);
    463480            /* fall thru */
    464481        default: /* to shut up GCC */
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