- Timestamp:
- Jan 25, 2013 9:21:05 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vmapi.h
r44340 r44393 93 93 * VM error callback function. 94 94 * 95 * @param p VM The VM handle. Can be NULL if an error occurred before96 * successfully creating a VM.95 * @param pUVM The user mode VM handle. Can be NULL if an error 96 * occurred before successfully creating a VM. 97 97 * @param pvUser The user argument. 98 98 * @param rc VBox status code. … … 101 101 * @param args Error message arguments. 102 102 */ 103 typedef DECLCALLBACK(void) FNVMATERROR(P VM pVM, void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszError, va_list args);103 typedef DECLCALLBACK(void) FNVMATERROR(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszError, va_list args); 104 104 /** Pointer to a VM error callback. */ 105 105 typedef FNVMATERROR *PFNVMATERROR; … … 129 129 * See VMSetRuntimeError for the detailed description of parameters. 130 130 * 131 * @param p VM The VM handle.131 * @param pUVM The user mode VM handle. 132 132 * @param pvUser The user argument. 133 133 * @param fFlags The error flags. … … 136 136 * @param va Error message arguments. 137 137 */ 138 typedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(P VM pVM, void *pvUser, uint32_t fFlags, const char *pszErrorId,138 typedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(PUVM pUVM, void *pvUser, uint32_t fFlags, const char *pszErrorId, 139 139 const char *pszFormat, va_list va); 140 140 /** Pointer to a VM runtime error callback. */ … … 164 164 165 165 /** 166 * VM state c allback function.166 * VM state change callback function. 167 167 * 168 168 * You are not allowed to call any function which changes the VM state from a 169 169 * state callback, except VMR3Destroy(). 170 170 * 171 * @param p VM The VM handle.171 * @param pUVM The user mode VM handle. 172 172 * @param enmState The new state. 173 173 * @param enmOldState The old state. 174 174 * @param pvUser The user argument. 175 175 */ 176 typedef DECLCALLBACK(void) FNVMATSTATE(P VM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);176 typedef DECLCALLBACK(void) FNVMATSTATE(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 177 177 /** Pointer to a VM state callback. */ 178 178 typedef FNVMATSTATE *PFNVMATSTATE; … … 318 318 /** 319 319 * Progress callback. 320 * 320 321 * This will report the completion percentage of an operation. 321 322 * 322 323 * @returns VINF_SUCCESS. 323 324 * @returns Error code to cancel the operation with. 324 * @param p VM The VM handle.325 * @param pUVM The user mode VM handle. 325 326 * @param uPercent Completion percentage (0-100). 326 327 * @param pvUser User specified argument. 327 328 */ 328 typedef DECLCALLBACK(int) FNVMPROGRESS(P VM pVM, unsigned uPercent, void *pvUser);329 typedef DECLCALLBACK(int) FNVMPROGRESS(PUVM pUVM, unsigned uPercent, void *pvUser); 329 330 /** Pointer to a FNVMPROGRESS function. */ 330 331 typedef FNVMPROGRESS *PFNVMPROGRESS; 331 332 /**333 * VM destruction callback.334 * @param pVM The VM which is about to be destroyed.335 * @param pvUser The user parameter specified at registration.336 */337 typedef DECLCALLBACK(void) FNVMATDTOR(PVM pVM, void *pvUser);338 /** Pointer to a VM destruction callback. */339 typedef FNVMATDTOR *PFNVMATDTOR;340 332 341 333 -
trunk/src/VBox/Debugger/VBoxDbgBase.cpp
r44348 r44393 104 104 105 105 /*static*/ DECLCALLBACK(void) 106 VBoxDbgBase::atStateChange(P VM pVM, VMSTATE enmState, VMSTATE /*enmOldState*/, void *pvUser)107 { 108 VBoxDbgBase *pThis = (VBoxDbgBase *)pvUser; NOREF(p VM);106 VBoxDbgBase::atStateChange(PUVM pUVM, VMSTATE enmState, VMSTATE /*enmOldState*/, void *pvUser) 107 { 108 VBoxDbgBase *pThis = (VBoxDbgBase *)pvUser; NOREF(pUVM); 109 109 switch (enmState) 110 110 { … … 112 112 { 113 113 /** @todo need to do some locking here? */ 114 PUVM pUVM = ASMAtomicXchgPtrT(&pThis->m_pUVM, NULL, PUVM);115 if (pUVM )114 PUVM pUVM2 = ASMAtomicXchgPtrT(&pThis->m_pUVM, NULL, PUVM); 115 if (pUVM2) 116 116 { 117 Assert(pUVM2 == pUVM); 117 118 pThis->sigTerminated(); 118 VMR3ReleaseUVM(pUVM );119 VMR3ReleaseUVM(pUVM2); 119 120 } 120 121 break; -
trunk/src/VBox/Debugger/VBoxDbgBase.h
r44340 r44393 104 104 105 105 private: 106 /** 107 * VM state callback function. 108 * 109 * You are not allowed to call any function which changes the VM state from a 110 * state callback, except VMR3Destroy(). 111 * 112 * @param pVM The VM handle. 113 * @param enmState The new state. 114 * @param enmOldState The old state. 115 * @param pvUser The user argument. 116 */ 117 static DECLCALLBACK(void) atStateChange(PVM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 106 /** @callback_method_impl{FNVMATSTATE} */ 107 static DECLCALLBACK(void) atStateChange(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 118 108 119 109 private: -
trunk/src/VBox/Main/include/ConsoleImpl.h
r44387 r44393 596 596 static DECLCALLBACK(int) configGuestProperties(void *pvConsole, PUVM pUVM); 597 597 static DECLCALLBACK(int) configGuestControl(void *pvConsole); 598 static DECLCALLBACK(void) vmstateChangeCallback(PVM aVM, VMSTATE aState, 599 VMSTATE aOldState, void *aUser); 598 static DECLCALLBACK(void) vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 600 599 static DECLCALLBACK(int) unplugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); 601 600 static DECLCALLBACK(int) plugCpu(Console *pThis, PUVM pUVM, VMCPUID idCpu); … … 640 639 static DECLCALLBACK(int) fntTakeSnapshotWorker(RTTHREAD Thread, void *pvUser); 641 640 642 static DECLCALLBACK(int) stateProgressCallback(P VM pVM, unsigned uPercent, void *pvUser);643 644 static DECLCALLBACK(void) genericVMSetErrorCallback(P VM pVM, void *pvUser, int rc, RT_SRC_POS_DECL,641 static DECLCALLBACK(int) stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser); 642 643 static DECLCALLBACK(void) genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, 645 644 const char *pszErrorFmt, va_list va); 646 645 647 646 void setVMRuntimeErrorCallbackF(uint32_t fFatal, const char *pszErrorId, const char *pszFormat, ...); 648 static DECLCALLBACK(void) setVMRuntimeErrorCallback(P VM pVM, void *pvUser, uint32_t fFatal,647 static DECLCALLBACK(void) setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFatal, 649 648 const char *pszErrorId, const char *pszFormat, va_list va); 650 649 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r44374 r44393 3899 3899 { 3900 3900 /* too bad, we failed. try to sync the console state with the VMM state */ 3901 vmstateChangeCallback( VMR3GetVM(pUVM), VMSTATE_SUSPENDED, enmVMState, pConsole);3901 vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, pConsole); 3902 3902 } 3903 3903 /// @todo (r=dmik) if we failed with drive mount, then the VMR3Resume … … 4144 4144 { 4145 4145 /* too bad, we failed. try to sync the console state with the VMM state */ 4146 vmstateChangeCallback( VMR3GetVM(pUVM), VMSTATE_SUSPENDED, enmVMState, pConsole);4147 } 4148 /** @todo :if we failed with drive mount, then the VMR3Resume4146 vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, pConsole); 4147 } 4148 /** @todo if we failed with drive mount, then the VMR3Resume 4149 4149 * error (if any) will be hidden from the caller. For proper reporting 4150 4150 * of such multiple errors to the caller we need to enhance the … … 4397 4397 { 4398 4398 /* too bad, we failed. try to sync the console state with the VMM state */ 4399 vmstateChangeCallback( VMR3GetVM(pUVM), VMSTATE_SUSPENDED, enmVMState, pConsole);4399 vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, pConsole); 4400 4400 } 4401 4401 /** @todo: if we failed with drive mount, then the VMR3Resume … … 4775 4775 { 4776 4776 /* too bad, we failed. try to sync the console state with the VMM state */ 4777 vmstateChangeCallback( VMR3GetVM(pUVM), VMSTATE_SUSPENDED, enmVMState, pThis);4777 vmstateChangeCallback(pUVM, VMSTATE_SUSPENDED, enmVMState, pThis); 4778 4778 } 4779 4779 /// @todo (r=dmik) if we failed with drive mount, then the VMR3Resume … … 5751 5751 /* too bad, we failed. try to sync the console state with the VMM state */ 5752 5752 AssertLogRelRC(vrc2); 5753 vmstateChangeCallback(ptrVM.raw (), VMSTATE_SUSPENDED, enmVMState, this);5753 vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this); 5754 5754 } 5755 5755 } … … 5827 5827 { 5828 5828 /* too bad, we failed. try to sync the console state with the VMM state */ 5829 vmstateChangeCallback(ptrVM.raw (), VMSTATE_SUSPENDED, enmVMState, this);5829 vmstateChangeCallback(ptrVM.rawUVM(), VMSTATE_SUSPENDED, enmVMState, this); 5830 5830 } 5831 5831 } … … 7496 7496 } 7497 7497 7498 /** 7499 * VM state callback function. Called by the VMM 7500 * using its state machine states. 7501 * 7502 * Primarily used to handle VM initiated power off, suspend and state saving, 7503 * but also for doing termination completed work (VMSTATE_TERMINATE). 7504 * 7505 * In general this function is called in the context of the EMT. 7506 * 7507 * @param aVM The VM handle. 7508 * @param aState The new state. 7509 * @param aOldState The old state. 7510 * @param aUser The user argument (pointer to the Console object). 7511 * 7512 * @note Locks the Console object for writing. 7498 /** @callback_method_impl{FNVMATSTATE} 7499 * 7500 * @note Locks the Console object for writing. 7501 * @remarks The @a pUVM parameter can be NULL in one case where powerUpThread() 7502 * calls after the VM was destroyed. 7513 7503 */ 7514 DECLCALLBACK(void) Console::vmstateChangeCallback(PVM aVM, 7515 VMSTATE aState, 7516 VMSTATE aOldState, 7517 void *aUser) 7518 { 7519 LogFlowFunc(("Changing state from %s to %s (aVM=%p)\n", 7520 VMR3GetStateName(aOldState), VMR3GetStateName(aState), aVM)); 7521 7522 Console *that = static_cast<Console *>(aUser); 7504 DECLCALLBACK(void) Console::vmstateChangeCallback(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser) 7505 { 7506 LogFlowFunc(("Changing state from %s to %s (pUVM=%p)\n", 7507 VMR3GetStateName(enmOldState), VMR3GetStateName(enmState), pUVM)); 7508 7509 Console *that = static_cast<Console *>(pvUser); 7523 7510 AssertReturnVoid(that); 7524 7511 … … 7532 7519 || autoCaller.state() == InUninit); 7533 7520 7534 switch ( aState)7521 switch (enmState) 7535 7522 { 7536 7523 /* … … 7620 7607 break; 7621 7608 7622 /* Terminate host interface networking. If aVM is NULL, we've been7609 /* Terminate host interface networking. If pUVM is NULL, we've been 7623 7610 * manually called from powerUpThread() either before calling 7624 7611 * VMR3Create() or after VMR3Create() failed, so no need to touch 7625 7612 * networking. 7626 7613 */ 7627 if ( aVM)7614 if (pUVM) 7628 7615 that->powerDownHostInterfaces(); 7629 7616 … … 7740 7727 7741 7728 default: 7742 AssertMsgFailed(("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName( aOldState), VMR3GetStateName(aState) ));7729 AssertMsgFailed(("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) )); 7743 7730 that->setMachineState(MachineState_Paused); 7744 7731 break; … … 7749 7736 case VMSTATE_RUNNING: 7750 7737 { 7751 if ( aOldState == VMSTATE_POWERING_ON7752 || aOldState == VMSTATE_RESUMING7753 || aOldState == VMSTATE_RUNNING_FT)7738 if ( enmOldState == VMSTATE_POWERING_ON 7739 || enmOldState == VMSTATE_RESUMING 7740 || enmOldState == VMSTATE_RUNNING_FT) 7754 7741 { 7755 7742 AutoWriteLock alock(that COMMA_LOCKVAL_SRC_POS); … … 7760 7747 Assert( ( ( that->mMachineState == MachineState_Starting 7761 7748 || that->mMachineState == MachineState_Paused) 7762 && aOldState == VMSTATE_POWERING_ON)7749 && enmOldState == VMSTATE_POWERING_ON) 7763 7750 || ( ( that->mMachineState == MachineState_Restoring 7764 7751 || that->mMachineState == MachineState_TeleportingIn … … 7766 7753 || that->mMachineState == MachineState_Saving 7767 7754 ) 7768 && aOldState == VMSTATE_RESUMING)7755 && enmOldState == VMSTATE_RESUMING) 7769 7756 || ( that->mMachineState == MachineState_FaultTolerantSyncing 7770 && aOldState == VMSTATE_RUNNING_FT));7757 && enmOldState == VMSTATE_RUNNING_FT)); 7771 7758 7772 7759 that->setMachineState(MachineState_Running); … … 7779 7766 AssertMsg( that->mMachineState == MachineState_LiveSnapshotting 7780 7767 || that->mMachineState == MachineState_Teleporting, 7781 ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName( aOldState), VMR3GetStateName(aState) ));7768 ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) )); 7782 7769 break; 7783 7770 7784 7771 case VMSTATE_RUNNING_FT: 7785 7772 AssertMsg(that->mMachineState == MachineState_FaultTolerantSyncing, 7786 ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName( aOldState), VMR3GetStateName(aState) ));7773 ("%s/%s -> %s\n", Global::stringifyMachineState(that->mMachineState), VMR3GetStateName(enmOldState), VMR3GetStateName(enmState) )); 7787 7774 break; 7788 7775 … … 8408 8395 * and VMR3Teleport. 8409 8396 * 8410 * @param p VM The VM handle.8397 * @param pUVM The user mode VM handle. 8411 8398 * @param uPercent Completion percentage (0-100). 8412 8399 * @param pvUser Pointer to an IProgress instance. … … 8414 8401 */ 8415 8402 /*static*/ 8416 DECLCALLBACK(int) Console::stateProgressCallback(P VM pVM, unsigned uPercent, void *pvUser)8403 DECLCALLBACK(int) Console::stateProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser) 8417 8404 { 8418 8405 IProgress *pProgress = static_cast<IProgress *>(pvUser); … … 8422 8409 pProgress->SetCurrentOperationProgress(uPercent); 8423 8410 8411 NOREF(pUVM); 8424 8412 return VINF_SUCCESS; 8425 8413 } … … 8432 8420 */ 8433 8421 /*static*/ DECLCALLBACK(void) 8434 Console::genericVMSetErrorCallback(P VM pVM, void *pvUser, int rc, RT_SRC_POS_DECL,8422 Console::genericVMSetErrorCallback(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, 8435 8423 const char *pszErrorFmt, va_list va) 8436 8424 { … … 8450 8438 8451 8439 va_end(va2); 8440 8441 NOREF(pUVM); 8452 8442 } 8453 8443 … … 8456 8446 * See VMSetRuntimeError for the detailed description of parameters. 8457 8447 * 8458 * @param pVM The VM handle. Ignored, so passing NULL is fine. 8448 * @param pUVM The user mode VM handle. Ignored, so passing NULL 8449 * is fine. 8459 8450 * @param pvUser The user argument, pointer to the Console instance. 8460 8451 * @param fFlags The action flags. See VMSETRTERR_FLAGS_*. … … 8465 8456 */ 8466 8457 /* static */ DECLCALLBACK(void) 8467 Console::setVMRuntimeErrorCallback(P VM pVM, void *pvUser, uint32_t fFlags,8458 Console::setVMRuntimeErrorCallback(PUVM pUVM, void *pvUser, uint32_t fFlags, 8468 8459 const char *pszErrorId, 8469 8460 const char *pszFormat, va_list va) … … 8478 8469 8479 8470 LogRel(("Console: VM runtime error: fatal=%RTbool, errorID=%s message=\"%s\"\n", 8480 fFatal, pszErrorId, message.c_str())); 8481 8482 that->onRuntimeError(BOOL(fFatal), Bstr(pszErrorId).raw(), 8483 Bstr(message).raw()); 8484 8485 LogFlowFuncLeave(); 8471 fFatal, pszErrorId, message.c_str())); 8472 8473 that->onRuntimeError(BOOL(fFatal), Bstr(pszErrorId).raw(), Bstr(message).raw()); 8474 8475 LogFlowFuncLeave(); NOREF(pUVM); 8486 8476 } 8487 8477 … … 9152 9142 9153 9143 Assert(pConsole->mpUVM == NULL); 9154 vmstateChangeCallback(NULL, VMSTATE_TERMINATED, VMSTATE_CREATING, 9155 pConsole); 9144 vmstateChangeCallback(NULL, VMSTATE_TERMINATED, VMSTATE_CREATING, pConsole); 9156 9145 } 9157 9146 -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r44387 r44393 161 161 for (int i = 0; i < 2; i++) 162 162 { 163 inputStruct.key = (uint32_t)( (i == 0)? 'OSK0' : 'OSK1');163 inputStruct.key = (uint32_t)(i == 0 ? 'OSK0' : 'OSK1'); 164 164 kr = IOConnectCallStructMethod((mach_port_t)port, 165 165 (uint32_t)2, -
trunk/src/VBox/Main/src-client/ConsoleImplTeleporter.cpp
r44347 r44393 585 585 * @copydoc PFNVMPROGRESS 586 586 */ 587 static DECLCALLBACK(int) teleporterProgressCallback(P VM pVM, unsigned uPercent, void *pvUser)587 static DECLCALLBACK(int) teleporterProgressCallback(PUVM pUVM, unsigned uPercent, void *pvUser) 588 588 { 589 589 TeleporterState *pState = (TeleporterState *)pvUser; … … 604 604 } 605 605 606 NOREF(pUVM); 606 607 return VINF_SUCCESS; 607 608 } -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r44340 r44393 5 5 6 6 /* 7 * Copyright (C) 2006-201 1Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 625 625 #include "PGMInternal.h" 626 626 #include <VBox/vmm/vm.h> 627 #include <VBox/vmm/uvm.h> 627 628 #include "PGMInline.h" 628 629 … … 653 654 static DECLCALLBACK(int) pgmR3RelocateHyperVirtHandler(PAVLROGCPTRNODECORE pNode, void *pvUser); 654 655 #ifdef VBOX_STRICT 655 static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(PVM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);656 static FNVMATSTATE pgmR3ResetNoMorePhysWritesFlag; 656 657 #endif 657 658 static int pgmR3ModeDataInit(PVM pVM, bool fResolveGCAndR0); … … 2601 2602 * a snapshot has been created. 2602 2603 */ 2603 static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(P VM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser)2604 static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser) 2604 2605 { 2605 2606 if ( enmState == VMSTATE_RUNNING 2606 2607 || enmState == VMSTATE_RESUMING) 2607 p VM->pgm.s.fNoMorePhysWrites = false;2608 pUVM->pVM->pgm.s.fNoMorePhysWrites = false; 2608 2609 NOREF(enmOldState); NOREF(pvUser); 2609 2610 } -
trunk/src/VBox/VMM/VMMR3/SSM.cpp
r44347 r44393 1093 1093 pSSM->uPercent = uPct; 1094 1094 if (pSSM->pfnProgress) 1095 pSSM->pfnProgress(pVM , RT_MIN(uPct, 100 - pSSM->uPercentDone), pSSM->pvUser);1095 pSSM->pfnProgress(pVM->pUVM, RT_MIN(uPct, 100 - pSSM->uPercentDone), pSSM->pvUser); 1096 1096 } 1097 1097 } … … 2988 2988 { 2989 2989 if (pSSM->pfnProgress) 2990 pSSM->pfnProgress(pSSM->pVM , pSSM->uPercent, pSSM->pvUser);2990 pSSM->pfnProgress(pSSM->pVM->pUVM, pSSM->uPercent, pSSM->pvUser); 2991 2991 pSSM->uPercent++; 2992 2992 pSSM->offEstProgress = (pSSM->uPercent - pSSM->uPercentPrepare - pSSM->uPercentLive) * pSSM->cbEstTotal … … 4318 4318 Assert(pSSM->enmOp == SSMSTATE_SAVE_DONE); 4319 4319 if (pSSM->pfnProgress) 4320 pSSM->pfnProgress(pVM , 100, pSSM->pvUser);4320 pSSM->pfnProgress(pVM->pUVM, 100, pSSM->pvUser); 4321 4321 LogRel(("SSM: Successfully saved the VM state to '%s'\n", 4322 4322 pSSM->pszFilename ? pSSM->pszFilename : "<remote-machine>")); … … 4534 4534 ssmR3LiveControlEmit(pSSM, lrdPct, SSM_PASS_FINAL); 4535 4535 pSSM->uPercent = uPct; 4536 pSSM->pfnProgress(pSSM->pVM , uPct, pSSM->pvUser);4536 pSSM->pfnProgress(pSSM->pVM->pUVM, uPct, pSSM->pvUser); 4537 4537 } 4538 4538 } … … 4734 4734 */ 4735 4735 if (pSSM->pfnProgress) 4736 pSSM->pfnProgress(pVM , pSSM->uPercentPrepare + pSSM->uPercentLive - 1, pSSM->pvUser);4736 pSSM->pfnProgress(pVM->pUVM, pSSM->uPercentPrepare + pSSM->uPercentLive - 1, pSSM->pvUser); 4737 4737 pSSM->uPercent = pSSM->uPercentPrepare + pSSM->uPercentLive; 4738 4738 … … 5106 5106 ssmR3LiveControlEmit(pSSM, lrdPct, uPass); 5107 5107 pSSM->uPercent = uPct; 5108 pSSM->pfnProgress(pVM , uPct, pSSM->pvUser);5108 pSSM->pfnProgress(pVM->pUVM, uPct, pSSM->pvUser); 5109 5109 } 5110 5110 } … … 5370 5370 */ 5371 5371 if (pSSM->pfnProgress) 5372 pSSM->pfnProgress(pVM , 2, pSSM->pvUser);5372 pSSM->pfnProgress(pVM->pUVM, 2, pSSM->pvUser); 5373 5373 pSSM->uPercent = 2; 5374 5374 … … 8331 8331 8332 8332 if (pfnProgress) 8333 pfnProgress(pVM , Handle.uPercent, pvProgressUser);8333 pfnProgress(pVM->pUVM, Handle.uPercent, pvProgressUser); 8334 8334 8335 8335 /* … … 8384 8384 /* end of prepare % */ 8385 8385 if (pfnProgress) 8386 pfnProgress(pVM , Handle.uPercentPrepare - 1, pvProgressUser);8386 pfnProgress(pVM->pUVM, Handle.uPercentPrepare - 1, pvProgressUser); 8387 8387 Handle.uPercent = Handle.uPercentPrepare; 8388 8388 Handle.cbEstTotal = Handle.u.Read.cbLoadFile; … … 8458 8458 /* progress */ 8459 8459 if (pfnProgress) 8460 pfnProgress(pVM , 99, pvProgressUser);8460 pfnProgress(pVM->pUVM, 99, pvProgressUser); 8461 8461 8462 8462 ssmR3SetCancellable(pVM, &Handle, false); … … 8472 8472 /* progress */ 8473 8473 if (pfnProgress) 8474 pfnProgress(pVM , 100, pvProgressUser);8474 pfnProgress(pVM->pUVM, 100, pvProgressUser); 8475 8475 Log(("SSM: Load of '%s' completed!\n", pszFilename)); 8476 8476 } -
trunk/src/VBox/VMM/VMMR3/VM.cpp
r44347 r44393 3199 3199 for (PVMATSTATE pCur = pUVM->vm.s.pAtState; pCur; pCur = pCur->pNext) 3200 3200 { 3201 pCur->pfnAtState(p VM, enmStateNew, enmStateOld, pCur->pvUser);3201 pCur->pfnAtState(pUVM, enmStateNew, enmStateOld, pCur->pvUser); 3202 3202 if ( enmStateNew != VMSTATE_DESTROYING 3203 3203 && pVM->enmVMState == VMSTATE_DESTROYING) … … 3636 3636 va_list va; 3637 3637 va_start(va, pszFormat); 3638 pCur->pfnAtError(pVM , pCur->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va);3638 pCur->pfnAtError(pVM->pUVM, pCur->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va); 3639 3639 va_end(va); 3640 3640 } … … 3775 3775 va_list va2; 3776 3776 va_copy(va2, *pArgs); 3777 pCur->pfnAtError(pUVM ->pVM, pCur->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va2);3777 pCur->pfnAtError(pUVM, pCur->pvUser, rc, RT_SRC_POS_ARGS, pszFormat, va2); 3778 3778 va_end(va2); 3779 3779 fCalledSomeone = true; … … 3946 3946 { 3947 3947 LogRel(("VM: Raising runtime error '%s' (fFlags=%#x)\n", pszErrorId, fFlags)); 3948 PUVM pUVM = pVM->pUVM; 3948 3949 3949 3950 /* … … 3955 3956 vmR3SetRuntimeErrorChangeState, NULL); 3956 3957 else if (fFlags & VMSETRTERR_FLAGS_SUSPEND) 3957 rc = VMR3Suspend(p VM->pUVM);3958 rc = VMR3Suspend(pUVM); 3958 3959 else 3959 3960 rc = VINF_SUCCESS; … … 3962 3963 * Do the callback round. 3963 3964 */ 3964 PUVM pUVM = pVM->pUVM;3965 3965 RTCritSectEnter(&pUVM->vm.s.AtErrorCritSect); 3966 3966 ASMAtomicIncU32(&pUVM->vm.s.cRuntimeErrors); … … 3969 3969 va_list va; 3970 3970 va_copy(va, *pVa); 3971 pCur->pfnAtRuntimeError(p VM, pCur->pvUser, fFlags, pszErrorId, pszFormat, va);3971 pCur->pfnAtRuntimeError(pUVM, pCur->pvUser, fFlags, pszErrorId, pszFormat, va); 3972 3972 va_end(va); 3973 3973 } -
trunk/src/VBox/VMM/testcase/tstVMREQ.cpp
r44347 r44393 49 49 * Testings va_list passing in VMSetRuntimeError. 50 50 */ 51 static DECLCALLBACK(void) MyAtRuntimeError(P VM pVM, void *pvUser, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)52 { 53 NOREF(p VM);51 static DECLCALLBACK(void) MyAtRuntimeError(PUVM pUVM, void *pvUser, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va) 52 { 53 NOREF(pUVM); 54 54 if (strcmp((const char *)pvUser, "user argument")) 55 55 {
Note:
See TracChangeset
for help on using the changeset viewer.