Changeset 75406 in vbox
- Timestamp:
- Nov 12, 2018 7:49:08 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
include/VBox/hgcmsvc.h (modified) (2 diffs)
-
include/VBox/vmm/pdmifs.h (modified) (1 diff)
-
src/VBox/Devices/VMMDev/VMMDev.cpp (modified) (1 diff)
-
src/VBox/Devices/VMMDev/VMMDevHGCM.cpp (modified) (7 diffs)
-
src/VBox/Devices/VMMDev/VMMDevHGCM.h (modified) (1 diff)
-
src/VBox/Main/src-client/HGCM.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/hgcmsvc.h
r69107 r75406 82 82 /** The service disconnects the client. */ 83 83 DECLR3CALLBACKMEMBER(void, pfnDisconnectClient, (void *pvInstance, uint32_t u32ClientID)); 84 85 /** 86 * Check if the @a callHandle is for a call restored and re-submitted from saved state. 87 * 88 * @returns true if restored, false if not. 89 * @param callHandle The call we're checking up on. 90 */ 91 DECLR3CALLBACKMEMBER(bool, pfnIsCallRestored, (VBOXHGCMCALLHANDLE callHandle)); 92 84 93 } VBOXHGCMSVCHELPERS; 85 94 … … 392 401 * Return code is passed to pfnCallComplete callback. 393 402 */ 394 DECLR3CALLBACKMEMBER(void, pfnCall, (void *pvService, VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])); 403 DECLR3CALLBACKMEMBER(void, pfnCall, (void *pvService, VBOXHGCMCALLHANDLE callHandle, uint32_t u32ClientID, void *pvClient, 404 uint32_t function, uint32_t cParms, VBOXHGCMSVCPARM paParms[])); 395 405 396 406 /** Host Service entry point meant for privileged features invisible to the guest. -
trunk/include/VBox/vmm/pdmifs.h
r73766 r75406 2071 2071 * @param rc The return code (VBox error code). 2072 2072 * @param pCmd A pointer that identifies the completed command. 2073 *2074 * @returns VBox status code2075 2073 */ 2076 2074 DECLR3CALLBACKMEMBER(void, pfnCompleted,(PPDMIHGCMPORT pInterface, int32_t rc, PVBOXHGCMCMD pCmd)); 2075 2076 /** 2077 * Checks if @a pCmd was restored & resubmitted from saved state. 2078 * 2079 * @returns true if restored, false if not. 2080 * @param pInterface Pointer to this interface. 2081 * @param pCmd The command we're checking on. 2082 */ 2083 DECLR3CALLBACKMEMBER(bool, pfnIsCmdRestored,(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd)); 2077 2084 2078 2085 } PDMIHGCMPORT; 2079 2086 /** PDMIHGCMPORT interface ID. */ 2080 # define PDMIHGCMPORT_IID " e00a0cbf-b75a-45c3-87f4-41cddbc5ae0b"2087 # define PDMIHGCMPORT_IID "10ca89d3-18ef-44d3-535e-ca46532e3caa" 2081 2088 2082 2089 -
trunk/src/VBox/Devices/VMMDev/VMMDev.cpp
r73698 r75406 4122 4122 /* HGCM port */ 4123 4123 pThis->IHGCMPort.pfnCompleted = hgcmCompleted; 4124 pThis->IHGCMPort.pfnIsCmdRestored = hgcmIsCmdRestored; 4124 4125 #endif 4125 4126 -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
r72054 r75406 128 128 bool fCancelled; 129 129 130 /** Whether the command was restored from saved state. */ 131 bool fRestored; 132 130 133 /** GC physical address of the guest request. */ 131 134 RTGCPHYS GCPhys; … … 137 140 VMMDevRequestType enmRequestType; 138 141 139 union { 142 union 143 { 140 144 struct 141 145 { … … 1063 1067 if (result == VINF_HGCM_SAVE_STATE) 1064 1068 { 1065 /* If the completion routine was called because HGCMsaves its state,1066 * then currently nothing to be done here. The pCmd stays in the list1067 * and will be saved later when the VMMDev state will be saved.1069 /* If the completion routine was called while the HGCM service saves its state, 1070 * then currently nothing to be done here. The pCmd stays in the list and will 1071 * be saved later when the VMMDev state will be saved and re-submitted on load. 1068 1072 * 1069 * It it assumed that VMMDev saves state after the HGCM services, 1070 * and, therefore, VBOXHGCMCMD structures are not removed by 1071 * vmmdevHGCMSaveState from the list, while HGCM uses them. 1073 * It it assumed that VMMDev saves state after the HGCM services (VMMDev driver 1074 * attached by constructor before it registers its SSM state), and, therefore, 1075 * VBOXHGCMCMD structures are not removed by vmmdevHGCMSaveState from the list, 1076 * while HGCM uses them. 1072 1077 */ 1073 1078 LogFlowFunc(("VINF_HGCM_SAVE_STATE for command %p\n", pCmd)); … … 1216 1221 (PFNRT)hgcmCompletedWorker, 3, pInterface, result, pCmd); 1217 1222 AssertRC(rc); 1223 } 1224 1225 /** 1226 * @interface_method_impl{PDMIHGCMPORT, pfnIsCmdRestored} 1227 */ 1228 DECLCALLBACK(bool) hgcmIsCmdRestored(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd) 1229 { 1230 RT_NOREF(pInterface); 1231 return pCmd && pCmd->fRestored; 1218 1232 } 1219 1233 … … 1605 1619 else 1606 1620 pCmd->fCancelled = false; 1607 1621 pCmd->fRestored = true; 1608 1622 pCmd->enmRequestType = enmRequestType; 1609 1623 … … 1649 1663 else 1650 1664 pCmd->fCancelled = false; 1651 1665 pCmd->fRestored = true; 1652 1666 pCmd->enmRequestType = enmRequestType; 1653 1667 … … 1695 1709 else 1696 1710 pCmd->fCancelled = false; 1697 1711 pCmd->fRestored = true; 1698 1712 pCmd->enmRequestType = enmRequestType; 1699 1713 -
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.h
r71891 r75406 29 29 30 30 DECLCALLBACK(void) hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmdPtr); 31 DECLCALLBACK(bool) hgcmIsCmdRestored(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd); 31 32 32 33 int vmmdevHGCMSaveState(VMMDevState *pVMMDevState, PSSMHANDLE pSSM); -
trunk/src/VBox/Main/src-client/HGCM.cpp
r75385 r75406 132 132 static DECLCALLBACK(void) svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc); 133 133 static DECLCALLBACK(void) svcHlpDisconnectClient(void *pvInstance, uint32_t u32ClientId); 134 static DECLCALLBACK(bool) svcHlpIsCallRestored(VBOXHGCMCALLHANDLE callHandle); 134 135 135 136 public: … … 755 756 } 756 757 758 /** 759 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnCallComplete} 760 */ 757 761 /* static */ DECLCALLBACK(void) HGCMService::svcHlpCallComplete(VBOXHGCMCALLHANDLE callHandle, int32_t rc) 758 762 { … … 773 777 } 774 778 779 /** 780 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnDisconnectClient} 781 */ 775 782 /* static */ DECLCALLBACK(void) HGCMService::svcHlpDisconnectClient(void *pvInstance, uint32_t u32ClientId) 776 783 { … … 781 788 pService->DisconnectClient(u32ClientId, true); 782 789 } 790 } 791 792 /** 793 * @interface_method_impl{VBOXHGCMSVCHELPERS,pfnIsCallRestored} 794 */ 795 /* static */ DECLCALLBACK(bool) HGCMService::svcHlpIsCallRestored(VBOXHGCMCALLHANDLE callHandle) 796 { 797 HGCMMsgHeader *pMsgHdr = (HGCMMsgHeader *)(callHandle); 798 AssertPtrReturn(pMsgHdr, false); 799 800 PVBOXHGCMCMD pCmd = pMsgHdr->pCmd; 801 AssertPtrReturn(pCmd, false); 802 803 PPDMIHGCMPORT pHgcmPort = pMsgHdr->pHGCMPort; 804 AssertPtrReturn(pHgcmPort, false); 805 806 return pHgcmPort->pfnIsCmdRestored(pHgcmPort, pCmd); 783 807 } 784 808 … … 836 860 m_svcHelpers.pvInstance = this; 837 861 m_svcHelpers.pfnDisconnectClient = svcHlpDisconnectClient; 862 m_svcHelpers.pfnIsCallRestored = svcHlpIsCallRestored; 838 863 839 864 /* Execute the load request on the service thread. */
Note:
See TracChangeset
for help on using the changeset viewer.

