VirtualBox

Changeset 77243 in vbox for trunk/include


Ignore:
Timestamp:
Feb 10, 2019 10:44:00 PM (6 years ago)
Author:
vboxsync
Message:

HGCM,SharedFolders: Added new variation on the HGCM page list type that does not use a bounce buffer. bugref:9172

  • Added VMMDevHGCMParmType_NoBouncePageList.
  • Made VMMDevHGCMParmType_Embedded
Location:
trunk/include/VBox
Files:
5 edited

Legend:

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

    r77054 r77243  
    779779    pReq->Parms.cb32Read.u.value32          = cbToRead;
    780780
    781     pReq->Parms.pBuf.type                   = VMMDevHGCMParmType_PageList;
     781    pReq->Parms.pBuf.type                   = g_fHostFeatures & VMMDEV_HVF_HGCM_NO_BOUNCE_PAGE_LIST
     782                                            ? VMMDevHGCMParmType_NoBouncePageList : VMMDevHGCMParmType_PageList;
    782783    pReq->Parms.pBuf.u.PageList.size        = cbToRead;
    783784    pReq->Parms.pBuf.u.PageList.offset      = RT_UOFFSETOF(VBOXSFREADPGLSTREQ, PgLst) - sizeof(VBGLIOCIDCHGCMFASTCALL);
     
    925926    pReq->Parms.cb32Write.u.value32         = cbToWrite;
    926927
    927     pReq->Parms.pBuf.type                   = VMMDevHGCMParmType_PageList;
     928    pReq->Parms.pBuf.type                   = g_fHostFeatures & VMMDEV_HVF_HGCM_NO_BOUNCE_PAGE_LIST
     929                                            ? VMMDevHGCMParmType_NoBouncePageList : VMMDevHGCMParmType_PageList;;
    928930    pReq->Parms.pBuf.u.PageList.size        = cbToWrite;
    929931    pReq->Parms.pBuf.u.PageList.offset      = RT_UOFFSETOF(VBOXSFWRITEPGLSTREQ, PgLst) - sizeof(VBGLIOCIDCHGCMFASTCALL);
  • trunk/include/VBox/VMMDev.h

    r77056 r77243  
    532532/** HGCM supports the contiguous page list parameter type. */
    533533#define VMMDEV_HVF_HGCM_CONTIGUOUS_PAGE_LIST    RT_BIT_32(2)
     534/** HGCM supports the no-bounce page list parameter type. */
     535#define VMMDEV_HVF_HGCM_NO_BOUNCE_PAGE_LIST     RT_BIT_32(3)
    534536/** VMMDev supports fast IRQ acknowledgements. */
    535537#define VMMDEV_HVF_FAST_IRQ_ACK                 RT_BIT_32(31)
     
    16321634#define VBOX_HGCM_F_PARM_DIRECTION_FROM_HOST UINT32_C(0x00000002)
    16331635#define VBOX_HGCM_F_PARM_DIRECTION_BOTH      UINT32_C(0x00000003)
     1636#define VBOX_HGCM_F_PARM_DIRECTION_MASK      UINT32_C(0x00000003)
    16341637/** Macro for validating that the specified flags are valid. */
    16351638#define VBOX_HGCM_F_PARM_ARE_VALID(fFlags) \
    1636     (   (fFlags) > VBOX_HGCM_F_PARM_DIRECTION_NONE \
    1637      && (fFlags) <= VBOX_HGCM_F_PARM_DIRECTION_BOTH )
     1639    (   ((fFlags) & VBOX_HGCM_F_PARM_DIRECTION_MASK) \
     1640     && !((fFlags) & ~VBOX_HGCM_F_PARM_DIRECTION_MASK) )
    16381641/** @} */
    16391642
  • trunk/include/VBox/VMMDevCoreTypes.h

    r76693 r77243  
    279279    VMMDevHGCMParmType_Embedded           = 11, /**< Small buffer embedded in request. */
    280280    VMMDevHGCMParmType_ContiguousPageList = 12, /**< Like PageList but with physically contiguous memory, so only one page entry. */
     281    VMMDevHGCMParmType_NoBouncePageList   = 13, /**< Like PageList but host function requires no bounce buffering. */
    281282    VMMDevHGCMParmType_SizeHack           = 0x7fffffff
    282283} HGCMFunctionParameterType;
  • trunk/include/VBox/hgcmsvc.h

    r76585 r77243  
    205205
    206206#define VBOX_HGCM_SVC_PARM_INVALID (0U)
    207 #define VBOX_HGCM_SVC_PARM_32BIT (1U)
    208 #define VBOX_HGCM_SVC_PARM_64BIT (2U)
    209 #define VBOX_HGCM_SVC_PARM_PTR   (3U)
     207#define VBOX_HGCM_SVC_PARM_32BIT   (1U)
     208#define VBOX_HGCM_SVC_PARM_64BIT   (2U)
     209#define VBOX_HGCM_SVC_PARM_PTR     (3U)
     210#define VBOX_HGCM_SVC_PARM_PAGES   (4U)
     211
     212/** VBOX_HGCM_SVC_PARM_PAGES specific data. */
     213typedef struct VBOXHGCMSVCPARMPAGES
     214{
     215    uint32_t    cb;
     216    uint16_t    cPages;
     217    uint16_t    u16Padding;
     218    void      **papvPages;
     219} VBOXHGCMSVCPARMPAGES;
     220typedef VBOXHGCMSVCPARMPAGES *PVBOXHGCMSVCPARMPAGES;
    210221
    211222typedef struct VBOXHGCMSVCPARM
     
    223234            void *addr;
    224235        } pointer;
     236        /** VBOX_HGCM_SVC_PARM_PAGES */
     237        VBOXHGCMSVCPARMPAGES Pages;
    225238    } u;
    226239} VBOXHGCMSVCPARM;
  • trunk/include/VBox/shflsvc.h

    r76665 r77243  
    13491349    /** value64, in: SHFLHANDLE of object to write to. */
    13501350    HGCMFunctionParameter u64Handle;
    1351     /** value64, in: Offset to start writing at. */
     1351    /** value64, in/out: Offset to start writing at / New offset.
     1352     * @note The new offset isn't necessarily off + cb for files opened with
     1353     *       SHFL_CF_ACCESS_APPEND since other parties (host programs, other VMs,
     1354     *       other computers) could have extended the file since the last time the
     1355     *       guest got a fresh size statistic.  So, this helps the guest avoiding
     1356     *       a stat call to check the actual size. */
    13521357    HGCMFunctionParameter off64Write;
    13531358    /** value32, in/out: How much to try write / Actually written. */
     
    13721377    HGCMFunctionParameter handle;
    13731378
    1374     /** value64, in:
    1375      * Offset to write to.
     1379    /** value64, in/out:
     1380     * Offset to write to/New offset.
     1381     * @note The new offset isn't necessarily off + cb for files opened with
     1382     *       SHFL_CF_ACCESS_APPEND since other parties (host programs, other VMs,
     1383     *       other computers) could have extended the file since the last time the
     1384     *       guest got a fresh size statistic.  So, this helps the guest avoiding
     1385     *       a stat call to check the actual size.
    13761386     */
    13771387    HGCMFunctionParameter offset;
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