VirtualBox

Changeset 75990 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Dec 5, 2018 7:51:01 PM (6 years ago)
Author:
vboxsync
Message:

VMMDev,HGCM: Added cancellation notification and query helper.

Location:
trunk/src/VBox/Devices/VMMDev
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDev.cpp

    r75875 r75990  
    44274427    pThis->IHGCMPort.pfnCompleted           = hgcmCompleted;
    44284428    pThis->IHGCMPort.pfnIsCmdRestored       = hgcmIsCmdRestored;
     4429    pThis->IHGCMPort.pfnIsCmdCancelled      = hgcmIsCmdCancelled;
    44294430    pThis->IHGCMPort.pfnGetRequestor        = hgcmGetRequestor;
    44304431    pThis->IHGCMPort.pfnGetVMMDevSessionId  = hgcmGetVMMDevSessionId;
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r75979 r75990  
    11691169    {
    11701170        pCmd->fCancelled = true;
     1171
    11711172        Log(("vmmdevHGCMCancel2: Cancelled pCmd=%p / GCPhys=%#x\n", pCmd, GCPhys));
     1173        if (pThis->pHGCMDrv)
     1174            pThis->pHGCMDrv->pfnCancelled(pThis->pHGCMDrv, pCmd,
     1175                                          pCmd->enmCmdType == VBOXHGCMCMDTYPE_CALL ? pCmd->u.call.u32ClientID
     1176                                          : pCmd->enmCmdType == VBOXHGCMCMDTYPE_CONNECT ? pCmd->u.connect.u32ClientID
     1177                                          : pCmd->enmCmdType == VBOXHGCMCMDTYPE_DISCONNECT ? pCmd->u.disconnect.u32ClientID
     1178                                          : 0);
    11721179    }
    11731180    else
     
    15371544
    15381545/**
     1546 * @interface_method_impl{PDMIHGCMPORT,pfnIsCmdCancelled}
     1547 */
     1548DECLCALLBACK(bool) hgcmIsCmdCancelled(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd)
     1549{
     1550    RT_NOREF(pInterface);
     1551    return pCmd && pCmd->fCancelled;
     1552}
     1553
     1554/**
    15391555 * @interface_method_impl{PDMIHGCMPORT,pfnGetRequestor}
    15401556 */
     
    15891605            LogFlowFunc(("Saving %RGp, size %d\n", pCmd->GCPhys, pCmd->cbRequest));
    15901606
     1607            /** @todo Don't save cancelled requests! It serves no purpose.  See restore and
     1608             *        @bugref{4032#c4} for details. */
    15911609            SSMR3PutU32     (pSSM, (uint32_t)pCmd->enmCmdType);
    15921610            SSMR3PutBool    (pSSM, pCmd->fCancelled);
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.h

    r75853 r75990  
    3131DECLCALLBACK(int)  hgcmCompleted(PPDMIHGCMPORT pInterface, int32_t result, PVBOXHGCMCMD pCmdPtr);
    3232DECLCALLBACK(bool) hgcmIsCmdRestored(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd);
     33DECLCALLBACK(bool) hgcmIsCmdCancelled(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd);
    3334DECLCALLBACK(uint32_t) hgcmGetRequestor(PPDMIHGCMPORT pInterface, PVBOXHGCMCMD pCmd);
    3435DECLCALLBACK(uint64_t) hgcmGetVMMDevSessionId(PPDMIHGCMPORT pInterface);
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r75855 r75990  
    156156    /** LUN\#0: HGCM port interface. */
    157157    PDMIHGCMPORT IHGCMPort;
    158 # if HC_ARCH_BITS == 32
    159     RTR3PTR      R3PtrAlignment1;
    160 # endif
     158//# if HC_ARCH_BITS == 32
     159//    RTR3PTR      R3PtrAlignment1;
     160//# endif
    161161#endif
    162162    /** Pointer to base interface of the driver. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette