Changeset 32169 in vbox
- Timestamp:
- Sep 1, 2010 9:21:30 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmapi.h
r31895 r32169 332 332 typedef FNVMPROGRESS *PFNVMPROGRESS; 333 333 334 VMMR3DECL(int) VMR3Save(PVM pVM, const char *pszFilename, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);334 VMMR3DECL(int) VMR3Save(PVM pVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended); 335 335 VMMR3DECL(int) VMR3Teleport(PVM pVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended); 336 336 VMMR3DECL(int) VMR3LoadFromFile(PVM pVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser); -
trunk/src/VBox/Frontends/VBoxBFE/VMControl.cpp
r31895 r32169 133 133 rc = VMR3ReqCallWait(gpVM, VMCPUID_ANY, 134 134 (PFNRT)VMR3Save, 7, gpVM, g_pszStateFile, 135 NULL /* pStreamOps */,136 NULL /* pvStreamOpsUser */,137 135 false /*fContinueAftewards*/, &callProgressInfo, (uintptr_t)NULL); 138 136 AssertRC(rc); -
trunk/src/VBox/Main/ConsoleImpl.cpp
r32105 r32169 7811 7811 int vrc = VMR3Save(that->mpVM, 7812 7812 strSavedStateFile.c_str(), 7813 NULL /* pStreamOps */,7814 NULL /* pvStreamOpsUser */,7815 7813 true /*fContinueAfterwards*/, 7816 7814 Console::stateProgressCallback, … … 8072 8070 int vrc = VMR3Save(that->mpVM, 8073 8071 task->mSavedStateFile.c_str(), 8074 NULL /* pStreamOps */,8075 NULL /* pvStreamOpsUser */,8076 8072 false, /*fContinueAfterwards*/ 8077 8073 Console::stateProgressCallback, -
trunk/src/VBox/VMM/FTM.cpp
r32158 r32169 38 38 #include <iprt/semaphore.h> 39 39 #include <iprt/asm.h> 40 41 #include <include/internal/vm.h> 40 42 41 43 /******************************************************************************* … … 613 615 rc = VMR3Suspend(pVM); 614 616 AssertRCReturn(rc, rc); 617 /** Hack alert as EM is responsible for dealing with the suspend state. We must do this here ourselves, but only for this EMT.*/ 618 if (VM_IS_EMT(pVM)) 619 TMR3NotifySuspend(pVM, VMMGetCpu(pVM)); /* Stop the virtual time. */ 615 620 } 616 621 … … 639 644 640 645 pVM->ftm.s.fDeltaLoadSaveActive = (fFullSync == false); 641 rc = VMR3Save (pVM, NULL /* pszFilename */, &g_ftmR3TcpOps, pVM, true /* fContinueAfterwards */, NULL, NULL, &fSuspended);646 rc = VMR3SaveFT(pVM, &g_ftmR3TcpOps, pVM, &fSuspended); 642 647 pVM->ftm.s.fDeltaLoadSaveActive = false; 643 648 AssertRC(rc); … … 664 669 rc = VMR3Resume(pVM); 665 670 AssertRCReturn(rc, rc); 671 672 /** Hack alert as EM is responsible for dealing with the suspend state. We must do this here ourselves, but only for this EMT.*/ 673 if (VM_IS_EMT(pVM)) 674 TMR3NotifyResume(pVM, VMMGetCpu(pVM)); /* Stop the virtual time. */ 666 675 } 667 676 return VINF_SUCCESS; -
trunk/src/VBox/VMM/VM.cpp
r32097 r32169 1761 1761 * RunningLS+SuspeningLS+SuspendedLS+Saving+Suspended. 1762 1762 */ 1763 VMMR3DECL(int) VMR3Save(PVM pVM, const char *pszFilename, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, 1764 bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended) 1763 VMMR3DECL(int) VMR3Save(PVM pVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended) 1765 1764 { 1766 1765 LogFlow(("VMR3Save: pVM=%p pszFilename=%p:{%s} fContinueAfterwards=%RTbool pfnProgress=%p pvUser=%p pfSuspended=%p\n", … … 1774 1773 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1775 1774 VM_ASSERT_OTHER_THREAD(pVM); 1776 AssertReturn(VALID_PTR(pszFilename) || pStreamOps, VERR_INVALID_POINTER);1777 AssertReturn( pStreamOps ||*pszFilename, VERR_INVALID_PARAMETER);1775 AssertReturn(VALID_PTR(pszFilename), VERR_INVALID_POINTER); 1776 AssertReturn(*pszFilename, VERR_INVALID_PARAMETER); 1778 1777 AssertPtrNullReturn(pfnProgress, VERR_INVALID_POINTER); 1779 1778 … … 1783 1782 SSMAFTER enmAfter = fContinueAfterwards ? SSMAFTER_CONTINUE : SSMAFTER_DESTROY; 1784 1783 int rc = vmR3SaveTeleport(pVM, 250 /*cMsMaxDowntime*/, 1785 pszFilename, pStreamOps, pvStreamOpsUser,1784 pszFilename, NULL /* pStreamOps */, NULL /* pvStreamOpsUser */, 1786 1785 enmAfter, pfnProgress, pvUser, pfSuspended); 1786 LogFlow(("VMR3Save: returns %Rrc (*pfSuspended=%RTbool)\n", rc, *pfSuspended)); 1787 return rc; 1788 } 1789 1790 /** 1791 * Save current VM state (used by FTM) 1792 * 1793 * Can be used for both saving the state and creating snapshots. 1794 * 1795 * When called for a VM in the Running state, the saved state is created live 1796 * and the VM is only suspended when the final part of the saving is preformed. 1797 * The VM state will not be restored to Running in this case and it's up to the 1798 * caller to call VMR3Resume if this is desirable. (The rational is that the 1799 * caller probably wish to reconfigure the disks before resuming the VM.) 1800 * 1801 * @returns VBox status code. 1802 * 1803 * @param pVM The VM which state should be saved. 1804 * @param pStreamOps The stream methods. 1805 * @param pvStreamOpsUser The user argument to the stream methods. 1806 * @param pfSuspended Set if we suspended the VM. 1807 * 1808 * @thread Any 1809 * @vmstate Suspended or Running 1810 * @vmstateto Saving+Suspended or 1811 * RunningLS+SuspeningLS+SuspendedLS+Saving+Suspended. 1812 */ 1813 VMMR3DECL(int) VMR3SaveFT(PVM pVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, bool *pfSuspended) 1814 { 1815 LogFlow(("VMR3SaveFT: pVM=%p pStreamOps=%p pvSteamOpsUser=%p pfSuspended=%p\n", 1816 pVM, pStreamOps, pvStreamOpsUser, pfSuspended)); 1817 1818 /* 1819 * Validate input. 1820 */ 1821 AssertPtr(pfSuspended); 1822 *pfSuspended = false; 1823 VM_ASSERT_VALID_EXT_RETURN(pVM, VERR_INVALID_VM_HANDLE); 1824 AssertReturn(pStreamOps, VERR_INVALID_PARAMETER); 1825 1826 /* 1827 * Join paths with VMR3Teleport. 1828 */ 1829 int rc = vmR3SaveTeleport(pVM, 250 /*cMsMaxDowntime*/, 1830 NULL, pStreamOps, pvStreamOpsUser, 1831 SSMAFTER_CONTINUE, NULL, NULL, pfSuspended); 1787 1832 LogFlow(("VMR3Save: returns %Rrc (*pfSuspended=%RTbool)\n", rc, *pfSuspended)); 1788 1833 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.