VirtualBox

Changeset 27778 in vbox


Ignore:
Timestamp:
Mar 29, 2010 11:24:13 AM (15 years ago)
Author:
vboxsync
Message:

Must take the pgm lock during PGMSyncCR3; guest SMP can cause an inconsistent state due to pending flushes.

File:
1 edited

Legend:

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

    r27408 r27778  
    18151815    int rc;
    18161816
     1817    pgmLock(pVM);
     1818
    18171819    /*
    18181820     * The pool may have pending stuff and even require a return to ring-3 to
     
    18211823    rc = pgmPoolSyncCR3(pVCpu);
    18221824    if (rc != VINF_SUCCESS)
     1825    {
     1826        pgmUnlock(pVM);
    18231827        return rc;
     1828    }
    18241829
    18251830    /*
     
    18361841        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_PGM_SYNC_CR3);
    18371842        VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL);
     1843        pgmUnlock(pVM);
    18381844        return VINF_SUCCESS;
    18391845    }
     
    18851891            if (rc == VINF_PGM_SYNC_CR3)
    18861892                pVCpu->pgm.s.GCPhysCR3 = GCPhysCR3Old;
     1893            pgmUnlock(pVM);
    18871894            return VINF_PGM_SYNC_CR3;
    18881895#endif
    18891896        }
    1890         AssertRCReturn(rc, rc);
    1891         AssertRCSuccessReturn(rc, VERR_INTERNAL_ERROR);
     1897        if (rc != VINF_SUCCESS)
     1898        {
     1899            pgmUnlock(pVM);
     1900            AssertFailed();
     1901            return RT_FAILURE(rc) ? rc : VERR_INTERNAL_ERROR;
     1902        }
    18921903    }
    18931904
     
    19221933    if (rc == VINF_SUCCESS)
    19231934        PGM_INVL_VCPU_TLBS(pVCpu);
     1935
     1936    pgmUnlock(pVM);
    19241937    return rc;
    19251938}
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