Changeset 23011 in vbox for trunk/src/VBox/VMM/VM.cpp
- Timestamp:
- Sep 14, 2009 3:57:38 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VM.cpp
r23009 r23011 764 764 for (VMCPUID idCpu = 1; idCpu < pVM->cCpus; idCpu++) 765 765 { 766 PVMREQ pReq; 767 rc = VMR3ReqCallU(pUVM, idCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 768 (PFNRT)vmR3RegisterEMT, 2, pVM, idCpu); 769 if (RT_SUCCESS(rc)) 770 rc = pReq->iStatus; 771 VMR3ReqFree(pReq); 766 rc = VMR3ReqCallWaitU(pUVM, idCpu, (PFNRT)vmR3RegisterEMT, 2, pVM, idCpu); 772 767 if (RT_FAILURE(rc)) 773 768 return rc; … … 1196 1191 * work upfront). 1197 1192 */ 1198 PVMREQ pReq; 1199 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ALL, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1200 (PFNRT)vmR3PowerOn, 1, pVM); 1201 if (RT_SUCCESS(rc)) 1202 { 1203 rc = pReq->iStatus; 1204 VMR3ReqFree(pReq); 1205 } 1206 1193 int rc = VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ALL, (PFNRT)vmR3PowerOn, 1, pVM); 1207 1194 LogFlow(("VMR3PowerOn: returns %Rrc\n", rc)); 1208 1195 return rc; … … 1289 1276 * actual suspending after the other ones have stopped running guest code. 1290 1277 */ 1291 PVMREQ pReq; 1292 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ALL_REVERSE, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1293 (PFNRT)vmR3Suspend, 2, pVM, fFatal); 1294 if (RT_SUCCESS(rc)) 1295 { 1296 rc = pReq->iStatus; 1297 VMR3ReqFree(pReq); 1298 } 1299 1300 return rc; 1278 return VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Suspend, 2, pVM, fFatal); 1301 1279 } 1302 1280 … … 1387 1365 * work upfront). 1388 1366 */ 1389 PVMREQ pReq; 1390 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ALL, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1391 (PFNRT)vmR3Resume, 1, pVM); 1392 if (RT_SUCCESS(rc)) 1393 { 1394 rc = pReq->iStatus; 1395 VMR3ReqFree(pReq); 1396 } 1397 1367 int rc = VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ALL, (PFNRT)vmR3Resume, 1, pVM); 1398 1368 LogFlow(("VMR3Resume: returns %Rrc\n", rc)); 1399 1369 return rc; … … 1513 1483 SSMAFTER enmAfter = fContinueAfterwards ? SSMAFTER_CONTINUE : SSMAFTER_DESTROY; 1514 1484 PSSMHANDLE pSSM; 1515 PVMREQ pReq; 1516 int rc = VMR3ReqCallU(pVM->pUVM, 0 /*idDstCpu*/, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1517 (PFNRT)vmR3Save, 6, pVM, pszFilename, enmAfter, pfnProgress, pvUser, &pSSM); 1518 if (RT_SUCCESS(rc)) 1519 { 1520 rc = pReq->iStatus; 1521 VMR3ReqFree(pReq); 1522 } 1485 int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, 1486 (PFNRT)vmR3Save, 6, pVM, pszFilename, enmAfter, pfnProgress, pvUser, &pSSM); 1523 1487 if ( RT_SUCCESS(rc) 1524 1488 && pSSM) … … 1533 1497 rc = vmR3SuspendCommon(pVM, false /*fFatal*/); 1534 1498 if (RT_SUCCESS(rc)) 1535 { 1536 rc = VMR3ReqCallU(pVM->pUVM, 0 /*idDstCpu*/, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1537 (PFNRT)vmR3SaveLiveStep2, 2, pVM, pSSM); 1538 if (RT_SUCCESS(rc)) 1539 { 1540 rc = pReq->iStatus; 1541 VMR3ReqFree(pReq); 1542 } 1543 } 1499 rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, (PFNRT)vmR3SaveLiveStep2, 2, pVM, pSSM); 1544 1500 } 1545 1501 else … … 1677 1633 * Request the operation in EMT. 1678 1634 */ 1679 PVMREQ pReq; 1680 int rc = VMR3ReqCallU(pVM->pUVM, 0 /*idDstCpu*/, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1681 (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser); 1682 if (RT_SUCCESS(rc)) 1683 { 1684 rc = pReq->iStatus; 1685 VMR3ReqFree(pReq); 1686 } 1687 1635 int rc = VMR3ReqCallWaitU(pVM->pUVM, 0 /*idDstCpu*/, 1636 (PFNRT)vmR3Load, 4, pVM, pszFilename, pfnProgress, pvUser); 1688 1637 LogFlow(("VMR3Load: returns %Rrc\n", rc)); 1689 1638 return rc; … … 1859 1808 * Request the operation in EMT. (in reverse order as VCPU 0 does the actual work) 1860 1809 */ 1861 PVMREQ pReq = NULL; 1862 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ALL_REVERSE, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1863 (PFNRT)vmR3PowerOff, 1, pVM); 1864 if (RT_SUCCESS(rc)) 1865 { 1866 rc = pReq->iStatus; 1867 VMR3ReqFree(pReq); 1868 } 1869 else 1870 Assert(pReq == NULL); 1871 1810 int rc = VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3PowerOff, 1, pVM); 1872 1811 LogFlow(("VMR3PowerOff: returns %Rrc\n", rc)); 1873 1812 return rc; … … 1944 1883 for (VMCPUID idCpu = 1; idCpu < pVM->cCpus; idCpu++) 1945 1884 { 1946 PVMREQ pReq = NULL; 1947 int rc = VMR3ReqCallU(pUVM, idCpu, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1948 (PFNRT)vmR3Destroy, 1, pVM); 1949 if (RT_SUCCESS(rc)) 1950 rc = pReq->iStatus; 1885 int rc = VMR3ReqCallWaitU(pUVM, idCpu, (PFNRT)vmR3Destroy, 1, pVM); 1951 1886 AssertLogRelRC(rc); 1952 VMR3ReqFree(pReq);1953 1887 } 1954 1888 } … … 1956 1890 { 1957 1891 /* vmR3Destroy on all EMTs, ending with EMT(0). */ 1958 PVMREQ pReq = NULL; 1959 int rc = VMR3ReqCallU(pUVM, VMCPUID_ALL_REVERSE, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 1960 (PFNRT)vmR3Destroy, 1, pVM); 1961 if (RT_SUCCESS(rc)) 1962 rc = pReq->iStatus; 1892 int rc = VMR3ReqCallWaitU(pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Destroy, 1, pVM); 1963 1893 AssertLogRelRC(rc); 1964 VMR3ReqFree(pReq);1965 1894 1966 1895 /* Wait for EMTs and destroy the UVM. */ … … 2536 2465 * and wait for it to be processed. (in reverse order as VCPU 0 does the real cleanup) 2537 2466 */ 2538 PVMREQ pReq = NULL; 2539 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ALL_REVERSE, &pReq, RT_INDEFINITE_WAIT, VMREQFLAGS_VBOX_STATUS, 2540 (PFNRT)vmR3Reset, 1, pVM); 2541 if (RT_SUCCESS(rc)) 2542 rc = pReq->iStatus; 2467 int rc = VMR3ReqCallWaitU(pVM->pUVM, VMCPUID_ALL_REVERSE, (PFNRT)vmR3Reset, 1, pVM); 2543 2468 AssertLogRelRC(rc); 2544 VMR3ReqFree(pReq);2545 2546 2469 return rc; 2547 2470 }
Note:
See TracChangeset
for help on using the changeset viewer.