Changeset 20880 in vbox
- Timestamp:
- Jun 24, 2009 8:10:25 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49026
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/types.h
r20804 r20880 109 109 * Intended for scheduling a VM request or some other task. */ 110 110 #define VMCPUID_ANY UINT32_C(0xfffffff4) 111 /** Any virtual CPU except the current one.111 /** Any virtual CPU; always queue for future execution. 112 112 * Intended for scheduling a VM request or some other task. */ 113 #define VMCPUID_ OTHERUINT32_C(0xfffffff5)113 #define VMCPUID_ANY_QUEUE UINT32_C(0xfffffff5) 114 114 /** The NIL value. */ 115 115 #define NIL_VMCPUID UINT32_C(0xfffffffd) -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r20687 r20880 2335 2335 { 2336 2336 PDMDEV_ASSERT_DEVINS(pDevIns); 2337 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 2337 PVM pVM = pDevIns->Internal.s.pVMR3; 2338 VM_ASSERT_EMT(pVM); 2338 2339 LogFlow(("pdmR3DevHlp_VMSuspend: caller='%s'/%d:\n", 2339 2340 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance)); 2340 2341 2341 int rc = VMR3Suspend(pDevIns->Internal.s.pVMR3); 2342 if (pVM->cCPUs > 1) 2343 { 2344 /* We own the IOM lock here and could cause a deadlock by waiting for a VCPU that is blocking on the IOM lock. */ 2345 PVMREQ pReq; 2346 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY_QUEUE, &pReq, 0, VMREQFLAGS_NO_WAIT, 2347 (PFNRT)VMR3Suspend, 1, pVM); 2348 AssertRC(rc); 2349 rc = VINF_EM_SUSPEND; 2350 } 2351 else 2352 rc = VMR3Suspend(pVM); 2342 2353 2343 2354 LogFlow(("pdmR3DevHlp_VMSuspend: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); … … 2350 2361 { 2351 2362 PDMDEV_ASSERT_DEVINS(pDevIns); 2352 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 2363 PVM pVM = pDevIns->Internal.s.pVMR3; 2364 VM_ASSERT_EMT(pVM); 2353 2365 LogFlow(("pdmR3DevHlp_VMPowerOff: caller='%s'/%d:\n", 2354 2366 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance)); 2355 2367 2356 int rc = VMR3PowerOff(pDevIns->Internal.s.pVMR3); 2368 if (pVM->cCPUs > 1) 2369 { 2370 /* We own the IOM lock here and could cause a deadlock by waiting for a VCPU that is blocking on the IOM lock. */ 2371 PVMREQ pReq; 2372 int rc = VMR3ReqCallU(pVM->pUVM, VMCPUID_ANY_QUEUE, &pReq, 0, VMREQFLAGS_NO_WAIT, 2373 (PFNRT)VMR3PowerOff, 1, pVM); 2374 AssertRC(rc); 2375 rc = VINF_EM_OFF; 2376 } 2377 else 2378 rc = VMR3PowerOff(pVM); 2357 2379 2358 2380 LogFlow(("pdmR3DevHlp_VMPowerOff: caller='%s'/%d: returns %Rrc\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, rc)); -
trunk/src/VBox/VMM/VMEmt.cpp
r20864 r20880 137 137 if (RT_FAILURE(rc)) 138 138 { 139 Assert Failed();139 AssertMsgFailed(("VMR3WaitU failed with %Rrc\n", rc)); 140 140 break; 141 141 } … … 201 201 if (RT_FAILURE(rc)) 202 202 { 203 Assert Failed();203 AssertMsgFailed(("VMR3WaitU failed with %Rrc\n", rc)); 204 204 break; 205 205 } -
trunk/src/VBox/VMM/VMReq.cpp
r20806 r20880 63 63 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 64 64 * one of the following special values: 65 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.65 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 66 66 * @param ppReq Where to store the pointer to the request. 67 67 * This will be NULL or a valid request pointer not matter what happends. … … 99 99 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 100 100 * one of the following special values: 101 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.101 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 102 102 * @param ppReq Where to store the pointer to the request. 103 103 * This will be NULL or a valid request pointer not matter what happends. … … 135 135 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 136 136 * one of the following special values: 137 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.137 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 138 138 * @param ppReq Where to store the pointer to the request. 139 139 * This will be NULL or a valid request pointer not matter what happends. … … 171 171 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 172 172 * one of the following special values: 173 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.173 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 174 174 * @param ppReq Where to store the pointer to the request. 175 175 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 209 209 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 210 210 * one of the following special values: 211 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.211 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 212 212 * @param ppReq Where to store the pointer to the request. 213 213 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 247 247 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 248 248 * one of the following special values: 249 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.249 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 250 250 * @param ppReq Where to store the pointer to the request. 251 251 * This will be NULL or a valid request pointer not matter what happends, unless fFlags … … 386 386 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 387 387 * one of the following special values: 388 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.388 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 389 389 */ 390 390 VMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu) … … 407 407 * @param idDstCpu The destination CPU(s). Either a specific CPU ID or 408 408 * one of the following special values: 409 * VMCPUID_ANY, VMCPUID_ OTHER, VMCPUID_ALL or VMCPUID_ALL_REVERSE.409 * VMCPUID_ANY, VMCPUID_ANY_QUEUE, VMCPUID_ALL or VMCPUID_ALL_REVERSE. 410 410 */ 411 411 VMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMCPUID idDstCpu) … … 420 420 AssertPtrReturn(ppReq, VERR_INVALID_POINTER); 421 421 AssertMsgReturn( idDstCpu == VMCPUID_ANY 422 || idDstCpu == VMCPUID_ OTHER422 || idDstCpu == VMCPUID_ANY_QUEUE 423 423 || idDstCpu < pUVM->cCpus 424 424 || idDstCpu == VMCPUID_ALL … … 676 676 } 677 677 else if ( pReq->idDstCpu != VMCPUID_ANY /* for a specific VMCPU? */ 678 && pReq->idDstCpu != VMCPUID_ OTHER678 && pReq->idDstCpu != VMCPUID_ANY_QUEUE 679 679 && ( !pUVCpu /* and it's not the current thread. */ 680 680 || pUVCpu->idCpu != pReq->idDstCpu)) … … 715 715 else if ( ( pReq->idDstCpu == VMCPUID_ANY 716 716 && !pUVCpu /* only EMT threads have a valid pointer stored in the TLS slot. */) 717 || pReq->idDstCpu == VMCPUID_ OTHER)717 || pReq->idDstCpu == VMCPUID_ANY_QUEUE) 718 718 { 719 719 unsigned fFlags = ((VMREQ volatile *)pReq)->fFlags; /* volatile paranoia */ 720 720 721 Assert(pReq->idDstCpu != VMCPUID_ OTHER|| pUVCpu);721 Assert(pReq->idDstCpu != VMCPUID_ANY_QUEUE || pUVCpu); 722 722 723 723 /*
Note:
See TracChangeset
for help on using the changeset viewer.