VirtualBox

Changeset 32151 in vbox


Ignore:
Timestamp:
Aug 31, 2010 2:26:21 PM (14 years ago)
Author:
vboxsync
Message:

FT updates

File:
1 edited

Legend:

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

    r32146 r32151  
    10721072VMMR3DECL(int) FTMR3SetCheckpoint(PVM pVM, FTMCHECKPOINTTYPE enmCheckpoint)
    10731073{
     1074    int rc;
     1075
    10741076    if (!pVM->fFaultTolerantMaster)
    10751077        return VINF_SUCCESS;
    1076 
    1077     /** @todo handle ring-0 callbacks on EMT. */
    1078     VM_ASSERT_OTHER_THREAD(pVM);
    10791078
    10801079    switch (enmCheckpoint)
     
    10871086        STAM_REL_COUNTER_INC(&pVM->ftm.s.StatCheckpointStorage);
    10881087        break;
     1088
    10891089    default:
    10901090        break;
    10911091    }
    10921092    pVM->ftm.s.fCheckpointingActive = true;
    1093     int rc = PDMCritSectEnter(&pVM->ftm.s.CritSect, VERR_SEM_BUSY);
     1093    if (VM_IS_EMT(pVM))
     1094    {
     1095        PVMCPU pVCpu = VMMGetCpu(pVM);
     1096
     1097        /* We must take special care here as the memory sync is competing with us and requires a responsive EMT. */
     1098        while ((rc = PDMCritSectTryEnter(&pVM->ftm.s.CritSect)) == VERR_SEM_BUSY)
     1099        {
     1100            if (VM_FF_ISPENDING(pVM, VM_FF_EMT_RENDEZVOUS))
     1101            {
     1102                rc = VMMR3EmtRendezvousFF(pVM, pVCpu);
     1103                AssertRC(rc);
     1104            }
     1105
     1106            if (VM_FF_ISPENDING(pVM, VM_FF_REQUEST))
     1107            {
     1108                rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY);
     1109                AssertRC(rc);
     1110            }
     1111        }
     1112    }
     1113    else
     1114        rc = PDMCritSectEnter(&pVM->ftm.s.CritSect, VERR_SEM_BUSY);
     1115
    10941116    AssertMsg(rc == VINF_SUCCESS, ("%Rrc\n", rc));
    10951117
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