VirtualBox

Changeset 24918 in vbox for trunk/src


Ignore:
Timestamp:
Nov 24, 2009 4:16:49 PM (15 years ago)
Author:
vboxsync
Message:

VM,PGM: Fixed handling of VM reset during teleporation / live save.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

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

    r24767 r24918  
    11421142{
    11431143    Assert(PGMIsLockOwner(pVM));
    1144     /*
    1145      * We batch up pages before freeing them.
     1144
     1145    /*
     1146     * We batch up pages that should be freed instead of calling GMM for
     1147     * each and every one of them.
    11461148     */
    11471149    uint32_t            cPendingPages = 0;
     
    32253227    pVM->pgm.s.cZeroPages++;
    32263228
     3229    /* Deal with write monitored pages. */
     3230    if (PGM_PAGE_GET_STATE(pPage) == PGM_PAGE_STATE_WRITE_MONITORED)
     3231    {
     3232        PGM_PAGE_SET_WRITTEN_TO(pPage);
     3233        pVM->pgm.s.cWrittenToPages++;
     3234    }
     3235
    32273236    /*
    32283237     * pPage = ZERO page.
  • trunk/src/VBox/VMM/VM.cpp

    r24874 r24918  
    15021502 * @param   pVM             The VM handle.
    15031503 * @param   pVCpu           The VMCPU handle of the EMT.
    1504  * @param   pvUser          Ignored.
     1504 * @param   pvUser          The pfSuspended argument of vmR3SaveTeleport.
    15051505 */
    15061506static DECLCALLBACK(VBOXSTRICTRC) vmR3LiveDoStep1Cleanup(PVM pVM, PVMCPU pVCpu, void *pvUser)
    15071507{
    15081508    LogFlow(("vmR3LiveDoStep1Cleanup: pVM=%p pVCpu=%p/#%u\n", pVM, pVCpu, pVCpu->idCpu));
    1509     NOREF(pvUser); NOREF(pVCpu);
     1509    bool *pfSuspended = (bool *)pvUser;
     1510    NOREF(pVCpu);
    15101511
    15111512    int rc = vmR3TrySetState(pVM, "vmR3LiveDoStep1Cleanup", 6,
    1512                              VMSTATE_OFF,               VMSTATE_OFF_LS,
    1513                              VMSTATE_FATAL_ERROR,       VMSTATE_FATAL_ERROR_LS,
    1514                              VMSTATE_GURU_MEDITATION,   VMSTATE_GURU_MEDITATION_LS,
     1513                             VMSTATE_OFF,               VMSTATE_OFF_LS,                     /* 1 */
     1514                             VMSTATE_FATAL_ERROR,       VMSTATE_FATAL_ERROR_LS,             /* 2 */
     1515                             VMSTATE_GURU_MEDITATION,   VMSTATE_GURU_MEDITATION_LS,         /* 3 */
     1516                             VMSTATE_SUSPENDED,         VMSTATE_SUSPENDED_LS,               /* 4 */
     1517                             VMSTATE_SUSPENDED,         VMSTATE_SUSPENDED_EXT_LS,
    15151518                             VMSTATE_RUNNING,           VMSTATE_RUNNING_LS,
    1516                              VMSTATE_SUSPENDED,         VMSTATE_SUSPENDED_EXT_LS,
    15171519                             VMSTATE_DEBUGGING,         VMSTATE_DEBUGGING_LS);
    15181520    if (rc == 1)
     
    15221524    else if (rc == 3)
    15231525        rc = VERR_SSM_LIVE_GURU_MEDITATION;
     1526    else if (rc == 4)
     1527    {
     1528        *pfSuspended = true;
     1529        rc = VINF_SUCCESS;
     1530    }
    15241531    else if (rc > 0)
    15251532        rc = VINF_SUCCESS;
     
    17051712            AssertMsg(rc2 == rc, ("%Rrc != %Rrc\n", rc2, rc));
    17061713
    1707             rc2 = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, vmR3LiveDoStep1Cleanup, NULL);
     1714            rc2 = VMMR3EmtRendezvous(pVM, VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE, vmR3LiveDoStep1Cleanup, pfSuspended);
    17081715            if (RT_FAILURE(rc2) && rc == VERR_SSM_CANCELLED)
    17091716                rc = rc2;
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