Changeset 23915 in vbox
- Timestamp:
- Oct 20, 2009 5:06:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
include/VBox/pdmdev.h (modified) (3 diffs)
-
include/VBox/pdmdrv.h (modified) (4 diffs)
-
include/VBox/vmapi.h (modified) (1 diff)
-
src/VBox/VMM/PDMDevHlp.cpp (modified) (6 diffs)
-
src/VBox/VMM/PDMDriver.cpp (modified) (4 diffs)
-
src/VBox/VMM/VM.cpp (modified) (3 diffs)
-
src/VBox/VMM/VMInternal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdev.h
r22480 r23915 2177 2177 2178 2178 /** 2179 * Gets the VM state. 2180 * 2181 * @returns VM state. 2182 * @param pDevIns The device instance. 2183 * @thread Any thread (just keep in mind that it's volatile info). 2184 */ 2185 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns)); 2186 2187 /** 2188 * Checks if the VM was teleported and hasn't been fully resumed yet. 2189 * 2190 * @returns true / false. 2191 * @param pDevIns The device instance. 2192 * @thread Any thread. 2193 */ 2194 DECLR3CALLBACKMEMBER(bool, pfnVMTeleportedAndNotFullyResumedYet,(PPDMDEVINS pDevIns)); 2195 2196 /** 2179 2197 * Assert that the current thread is the emulation thread. 2180 2198 * … … 2368 2386 DECLR3CALLBACKMEMBER(int, pfnPhysGCPtr2GCPhys, (PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys)); 2369 2387 2370 /**2371 * Gets the VM state.2372 *2373 * @returns VM state.2374 * @param pDevIns The device instance.2375 * @thread Any thread (just keep in mind that it's volatile info).2376 */2377 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns));2378 2379 2388 /** Space reserved for future members. 2380 2389 * @{ */ 2390 DECLR3CALLBACKMEMBER(void, pfnReserved1,(void)); 2391 DECLR3CALLBACKMEMBER(void, pfnReserved2,(void)); 2392 DECLR3CALLBACKMEMBER(void, pfnReserved3,(void)); 2381 2393 DECLR3CALLBACKMEMBER(void, pfnReserved4,(void)); 2382 2394 DECLR3CALLBACKMEMBER(void, pfnReserved5,(void)); … … 3672 3684 3673 3685 /** 3686 * @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet 3687 */ 3688 DECLINLINE(bool) PDMDevHlpVMTeleportedAndNotFullyResumedYet(PPDMDEVINS pDevIns) 3689 { 3690 return pDevIns->pDevHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDevIns); 3691 } 3692 3693 /** 3674 3694 * @copydoc PDMDEVHLPR3::pfnA20Set 3675 3695 */ -
trunk/include/VBox/pdmdrv.h
r22480 r23915 501 501 502 502 /** 503 * Gets the VM state. 504 * 505 * @returns VM state. 506 * @param pDrvIns The driver instance. 507 * @thread Any thread (just keep in mind that it's volatile info). 508 */ 509 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDRVINS pDrvIns)); 510 511 /** 512 * Checks if the VM was teleported and hasn't been fully resumed yet. 513 * 514 * @returns true / false. 515 * @param pDrvIns The driver instance. 516 * @thread Any thread. 517 */ 518 DECLR3CALLBACKMEMBER(bool, pfnVMTeleportedAndNotFullyResumedYet,(PPDMDRVINS pDrvIns)); 519 520 /** 503 521 * Create a queue. 504 522 * … … 698 716 DECLR3CALLBACKMEMBER(int, pfnPDMThreadCreate,(PPDMDRVINS pDrvIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDRV pfnThread, 699 717 PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName)); 700 701 /**702 * Gets the VM state.703 *704 * @returns VM state.705 * @param pDrvIns The driver instance.706 * @thread Any thread (just keep in mind that it's volatile info).707 */708 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDRVINS pDrvIns));709 718 710 719 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION … … 883 892 884 893 /** 894 * @copydoc PDMDRVHLP::pfnVMState 895 */ 896 DECLINLINE(VMSTATE) PDMDrvHlpVMState(PPDMDRVINS pDrvIns) 897 { 898 return pDrvIns->pDrvHlp->pfnVMState(pDrvIns); 899 } 900 901 /** 902 * @copydoc PDMDRVHLP::pfnVMTeleportedAndNotFullyResumedYet 903 */ 904 DECLINLINE(bool) PDMDrvHlpVMTeleportedAndNotFullyResumedYet(PPDMDRVINS pDrvIns) 905 { 906 return pDrvIns->pDrvHlp->pfnVMTeleportedAndNotFullyResumedYet(pDrvIns); 907 } 908 909 /** 885 910 * @copydoc PDMDRVHLP::pfnPDMQueueCreate 886 911 */ … … 1009 1034 } 1010 1035 1011 /**1012 * @copydoc PDMDRVHLP::pfnVMState1013 */1014 DECLINLINE(VMSTATE) PDMDrvHlpVMState(PPDMDRVINS pDrvIns)1015 {1016 return pDrvIns->pDrvHlp->pfnVMState(pDrvIns);1017 }1018 1019 1036 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 1020 1037 /** -
trunk/include/VBox/vmapi.h
r23801 r23915 361 361 VMMR3DECL(VMSTATE) VMR3GetState(PVM pVM); 362 362 VMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState); 363 VMMR3DECL(bool) VMR3TeleportedAndNotFullyResumedYet(PVM pVM); 363 364 VMMR3DECL(int) VMR3AtErrorRegister(PVM pVM, PFNVMATERROR pfnAtError, void *pvUser); 364 365 VMMR3DECL(int) VMR3AtErrorRegisterU(PUVM pVM, PFNVMATERROR pfnAtError, void *pvUser); -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r23011 r23915 1034 1034 1035 1035 1036 /** @copydoc PDMDEVHLPR3::pfnVMState */ 1037 static DECLCALLBACK(VMSTATE) pdmR3DevHlp_VMState(PPDMDEVINS pDevIns) 1038 { 1039 PDMDEV_ASSERT_DEVINS(pDevIns); 1040 1041 VMSTATE enmVMState = VMR3GetState(pDevIns->Internal.s.pVMR3); 1042 1043 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, 1044 enmVMState, VMR3GetStateName(enmVMState))); 1045 return enmVMState; 1046 } 1047 1048 1049 /** @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet */ 1050 static DECLCALLBACK(bool) pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet(PPDMDEVINS pDevIns) 1051 { 1052 PDMDEV_ASSERT_DEVINS(pDevIns); 1053 1054 bool fRc = VMR3TeleportedAndNotFullyResumedYet(pDevIns->Internal.s.pVMR3); 1055 1056 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %RTbool\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, 1057 fRc)); 1058 return fRc; 1059 } 1060 1061 1036 1062 /** @copydoc PDMDEVHLPR3::pfnAssertEMT */ 1037 1063 static DECLCALLBACK(bool) pdmR3DevHlp_AssertEMT(PPDMDEVINS pDevIns, const char *pszFile, unsigned iLine, const char *pszFunction) … … 2274 2300 2275 2301 return rc; 2276 }2277 2278 2279 /** @copydoc PDMDEVHLPR3::pfnVMState */2280 static DECLCALLBACK(VMSTATE) pdmR3DevHlp_VMState(PPDMDEVINS pDevIns)2281 {2282 PDMDEV_ASSERT_DEVINS(pDevIns);2283 2284 VMSTATE enmVMState = VMR3GetState(pDevIns->Internal.s.pVMR3);2285 2286 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance,2287 enmVMState, VMR3GetStateName(enmVMState)));2288 return enmVMState;2289 2302 } 2290 2303 … … 2783 2796 pdmR3DevHlp_VMSetRuntimeError, 2784 2797 pdmR3DevHlp_VMSetRuntimeErrorV, 2798 pdmR3DevHlp_VMState, 2799 pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet, 2785 2800 pdmR3DevHlp_AssertEMT, 2786 2801 pdmR3DevHlp_AssertOther, … … 2796 2811 pdmR3DevHlp_PDMThreadCreate, 2797 2812 pdmR3DevHlp_PhysGCPtr2GCPhys, 2798 pdmR3DevHlp_VMState, 2813 0, 2814 0, 2815 0, 2799 2816 0, 2800 2817 0, … … 3244 3261 pdmR3DevHlp_VMSetRuntimeError, 3245 3262 pdmR3DevHlp_VMSetRuntimeErrorV, 3263 pdmR3DevHlp_VMState, 3264 pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet, 3246 3265 pdmR3DevHlp_AssertEMT, 3247 3266 pdmR3DevHlp_AssertOther, … … 3257 3276 pdmR3DevHlp_PDMThreadCreate, 3258 3277 pdmR3DevHlp_PhysGCPtr2GCPhys, 3259 pdmR3DevHlp_VMState, 3278 0, 3279 0, 3280 0, 3260 3281 0, 3261 3282 0, -
trunk/src/VBox/VMM/PDMDriver.cpp
r22480 r23915 798 798 799 799 800 /** @copydoc PDMDEVHLPR3::pfnVMState */ 801 static DECLCALLBACK(VMSTATE) pdmR3DrvHlp_VMState(PPDMDRVINS pDrvIns) 802 { 803 PDMDRV_ASSERT_DRVINS(pDrvIns); 804 805 VMSTATE enmVMState = VMR3GetState(pDrvIns->Internal.s.pVM); 806 807 LogFlow(("pdmR3DrvHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, 808 enmVMState, VMR3GetStateName(enmVMState))); 809 return enmVMState; 810 } 811 812 813 /** @copydoc PDMDEVHLPR3::pfnVMTeleportedAndNotFullyResumedYet */ 814 static DECLCALLBACK(bool) pdmR3DrvHlp_VMTeleportedAndNotFullyResumedYet(PPDMDRVINS pDrvIns) 815 { 816 PDMDRV_ASSERT_DRVINS(pDrvIns); 817 818 bool fRc = VMR3TeleportedAndNotFullyResumedYet(pDrvIns->Internal.s.pVM); 819 820 LogFlow(("pdmR3DrvHlp_VMState: caller='%s'/%d: returns %RTbool)\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, 821 fRc)); 822 return fRc; 823 } 824 825 800 826 /** @copydoc PDMDRVHLP::pfnPDMQueueCreate */ 801 827 static DECLCALLBACK(int) pdmR3DrvHlp_PDMQueueCreate(PPDMDRVINS pDrvIns, RTUINT cbItem, RTUINT cItems, uint32_t cMilliesInterval, … … 999 1025 rc, *ppThread)); 1000 1026 return rc; 1001 }1002 1003 1004 /** @copydoc PDMDEVHLPR3::pfnVMState */1005 static DECLCALLBACK(VMSTATE) pdmR3DrvHlp_VMState(PPDMDRVINS pDrvIns)1006 {1007 PDMDRV_ASSERT_DRVINS(pDrvIns);1008 1009 VMSTATE enmVMState = VMR3GetState(pDrvIns->Internal.s.pVM);1010 1011 LogFlow(("pdmR3DrvHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance,1012 enmVMState, VMR3GetStateName(enmVMState)));1013 return enmVMState;1014 1027 } 1015 1028 … … 1051 1064 pdmR3DrvHlp_VMSetRuntimeError, 1052 1065 pdmR3DrvHlp_VMSetRuntimeErrorV, 1066 pdmR3DrvHlp_VMState, 1067 pdmR3DrvHlp_VMTeleportedAndNotFullyResumedYet, 1053 1068 pdmR3DrvHlp_PDMQueueCreate, 1054 1069 pdmR3DrvHlp_TMGetVirtualFreq, … … 1064 1079 pdmR3DrvHlp_USBRegisterHub, 1065 1080 pdmR3DrvHlp_PDMThreadCreate, 1066 pdmR3DrvHlp_VMState,1067 1081 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 1068 1082 pdmR3DrvHlp_PDMAsyncCompletionTemplateCreate, -
trunk/src/VBox/VMM/VM.cpp
r23904 r23915 1346 1346 PDMR3Resume(pVM); 1347 1347 vmR3SetState(pVM, VMSTATE_RUNNING, VMSTATE_RESUMING); 1348 pVM->vm.s.fTeleportedAndNotFullyResumedYet = false; 1348 1349 } 1349 1350 … … 1612 1613 else if (rc == 2 || enmAfter == SSMAFTER_TELEPORT) 1613 1614 { 1615 if (enmAfter == SSMAFTER_TELEPORT) 1616 pVM->vm.s.fTeleportedAndNotFullyResumedYet = true; 1614 1617 rc = SSMR3LiveSave(pVM, pszFilename, pStreamOps, pvStreamOpsUser, 1615 1618 enmAfter, pfnProgress, pvProgressUser, ppSSM); … … 3180 3183 3181 3184 /** 3185 * Checks if the VM was teleported and hasn't been fully resumed yet. 3186 * 3187 * @returns true / false. 3188 * @param pVM The VM handle. 3189 * @thread Any thread. 3190 */ 3191 VMMR3DECL(bool) VMR3TeleportedAndNotFullyResumedYet(PVM pVM) 3192 { 3193 VM_ASSERT_VALID_EXT_RETURN(pVM, false); 3194 return pVM->vm.s.fTeleportedAndNotFullyResumedYet; 3195 } 3196 3197 3198 /** 3182 3199 * Registers a VM state change callback. 3183 3200 * -
trunk/src/VBox/VMM/VMInternal.h
r23009 r23915 166 166 /** VM Runtime Error Message. */ 167 167 R3PTRTYPE(PVMRUNTIMEERROR) pRuntimeErrorR3; 168 /** The VM was/is-being teleported and has not yet been fully resumed. */ 169 bool fTeleportedAndNotFullyResumedYet; 168 170 } VMINT; 169 171 /** Pointer to the VM Internal Data (part of the VM structure). */
Note:
See TracChangeset
for help on using the changeset viewer.

