VirtualBox

Changeset 75771 in vbox


Ignore:
Timestamp:
Nov 27, 2018 12:53:36 PM (6 years ago)
Author:
vboxsync
Message:

VMMDev,HGCM: Give access to VMMDevRequestHeader::fRequestor. [adjustments] bugref:9105

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VMMDev.h

    r75585 r75771  
    332332 * @internal Host only. */
    333333#define VMMDEV_REQUESTOR_LEGACY                     UINT32_MAX
     334/** Lowest conceivable trust level, for error situations of getters.
     335 * @internal Host only. */
     336#define VMMDEV_REQUESTOR_LOWEST                     (  VMMDEV_REQUESTOR_TRUST_UNTRUSTED | VMMDEV_REQUESTOR_USER_DEVICE \
     337                                                     | VMMDEV_REQUESTOR_CON_NO | VMMDEV_REQUESTOR_USERMODE \
     338                                                     | VMMDEV_REQUESTOR_USR_GUEST)
    334339/** Used on the host to check whether a requestor value is present or not. */
    335340#define VMMDEV_REQUESTOR_IS_PRESENT(a_fRequestor)   ((a_fRequestor) != VMMDEV_REQUESTOR_LEGACY)
  • trunk/include/VBox/hgcmsvc.h

    r75769 r75771  
    115115     * Retrieves the VMMDevRequestHeader::fRequestor value.
    116116     *
    117      * @returns The field value, 0 if invalid call.
     117     * @returns The field value, VMMDEV_REQUESTOR_LEGACY if not supported by the
     118     *          guest, VMMDEV_REQUESTOR_LOWEST if invalid call.
    118119     * @param   hCall       The call we're checking up on.
    119120     */
  • trunk/include/VBox/vmm/pdmifs.h

    r75769 r75771  
    20872087     * Gets the VMMDevRequestHeader::fRequestor value for @a pCmd.
    20882088     *
    2089      * @returns The fRequestor value, 0 if invalid parameters.
     2089     * @returns The fRequestor value, VMMDEV_REQUESTOR_LEGACY if guest does not
     2090     *          support it, VMMDEV_REQUESTOR_LOWEST if invalid parameters.
    20902091     * @param   pInterface          Pointer to this interface.
    20912092     * @param   pCmd                The command we're in checking on.
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r75770 r75771  
    15411541{
    15421542    PVMMDEV pThis = RT_FROM_MEMBER(pInterface, VMMDevState, IHGCMPort);
     1543    AssertPtrReturn(pCmd, VMMDEV_REQUESTOR_LOWEST);
    15431544    if (pThis->guestInfo2.fFeatures & VBOXGSTINFO2_F_REQUESTOR_INFO)
    1544         if (pCmd)
    1545             return pCmd->fRequestor;
    1546    return 0;
     1545        return pCmd->fRequestor;
     1546   return VMMDEV_REQUESTOR_LEGACY;
    15471547}
    15481548
  • trunk/src/VBox/Main/src-client/HGCM.cpp

    r75769 r75771  
    896896{
    897897    HGCMMsgHeader *pMsgHdr = (HGCMMsgHeader *)(hCall);
    898     AssertPtrReturn(pMsgHdr, 0);
     898    AssertPtrReturn(pMsgHdr, VMMDEV_REQUESTOR_LOWEST);
    899899
    900900    PVBOXHGCMCMD pCmd = pMsgHdr->pCmd;
    901     AssertPtrReturn(pCmd, 0);
     901    AssertPtrReturn(pCmd, VMMDEV_REQUESTOR_LOWEST);
    902902
    903903    PPDMIHGCMPORT pHgcmPort = pMsgHdr->pHGCMPort;
    904     AssertPtrReturn(pHgcmPort, 0);
     904    AssertPtrReturn(pHgcmPort, VMMDEV_REQUESTOR_LOWEST);
    905905
    906906    return pHgcmPort->pfnGetRequestor(pHgcmPort, pCmd);
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