VirtualBox

Changeset 64660 in vbox


Ignore:
Timestamp:
Nov 14, 2016 2:40:34 PM (8 years ago)
Author:
vboxsync
Message:

pdmstorageifs.h,AHCI,NVMe,LsiLogic,BusLogic,DrvSCSI: Prepare for a new callback in PDMIMEDIAEXPORT which can reduce the overhead of copying data between buffers under certain circumstances

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmstorageifs.h

    r64407 r64660  
    621621
    622622    /**
     623     * Queries a pointer to the memory buffer for the request from the drive/device above.
     624     *
     625     * @returns VBox status code.
     626     * @retval  VERR_NOT_SUPPORTED if this is not supported for this request.
     627     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     628     * @param   hIoReq          The I/O request handle.
     629     * @param   pvIoReqAlloc    The allocator specific memory for this request.
     630     * @param   ppvBuf          Where to store the pointer to the guest buffer on success.
     631     * @param   pcbBuf          Where to store the size of the buffer on success.
     632     *
     633     * @note This is an optional feature of the entity implementing this interface to avoid overhead
     634     *       by copying the data between buffers. If NULL it is not supported at all and the caller
     635     *       has to resort to PDMIMEDIAEXPORT::pfnIoReqCopyToBuf and PDMIMEDIAEXPORT::pfnIoReqCopyFromBuf.
     636     *       The same holds when VERR_NOT_SUPPORTED is returned.
     637     *
     638     *       On the upside the caller of this interface might not call this method at all and just
     639     *       use the before mentioned methods to copy the data between the buffers.
     640     */
     641    DECLR3CALLBACKMEMBER(int, pfnIoReqQueryBuf, (PPDMIMEDIAEXPORT pInterface, PDMMEDIAEXIOREQ hIoReq,
     642                                                 void *pvIoReqAlloc, void **ppvBuf, size_t *pcbBuf));
     643
     644    /**
    623645     * Queries the specified amount of ranges to discard from the callee for the given I/O request.
    624646     *
     
    660682
    661683/** PDMIMEDIAAEXPORT interface ID. */
    662 #define PDMIMEDIAEXPORT_IID                  "e0a586a6-4186-40d0-8067-c754b6585b53"
     684#define PDMIMEDIAEXPORT_IID                  "0ae2e534-6c28-41d6-9a88-7f88f2cb2ff8"
    663685
    664686
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r64658 r64660  
    410410    PDMLED                          Led;
    411411
     412#if HC_ARCH_BITS == 64
    412413    uint32_t                        u32Alignment3;
     414#endif
    413415
    414416    /** Async IO Thread. */
     
    60116013        pAhciPort->IMediaExPort.pfnIoReqCopyFromBuf        = ahciR3IoReqCopyFromBuf;
    60126014        pAhciPort->IMediaExPort.pfnIoReqCopyToBuf          = ahciR3IoReqCopyToBuf;
     6015        pAhciPort->IMediaExPort.pfnIoReqQueryBuf           = NULL;
    60136016        pAhciPort->IMediaExPort.pfnIoReqQueryDiscardRanges = ahciR3IoReqQueryDiscardRanges;
    60146017        pAhciPort->IMediaExPort.pfnIoReqStateChanged       = ahciR3IoReqStateChanged;
  • trunk/src/VBox/Devices/Storage/DevBusLogic.cpp

    r64537 r64660  
    41574157        pDevice->IMediaExPort.pfnIoReqCopyFromBuf        = buslogicR3IoReqCopyFromBuf;
    41584158        pDevice->IMediaExPort.pfnIoReqCopyToBuf          = buslogicR3IoReqCopyToBuf;
     4159        pDevice->IMediaExPort.pfnIoReqQueryBuf           = NULL;
    41594160        pDevice->IMediaExPort.pfnIoReqQueryDiscardRanges = NULL;
    41604161        pDevice->IMediaExPort.pfnIoReqStateChanged       = buslogicR3IoReqStateChanged;
  • trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp

    r64443 r64660  
    55805580        pDevice->IMediaExPort.pfnIoReqCopyFromBuf        = lsilogicR3IoReqCopyFromBuf;
    55815581        pDevice->IMediaExPort.pfnIoReqCopyToBuf          = lsilogicR3IoReqCopyToBuf;
     5582        pDevice->IMediaExPort.pfnIoReqQueryBuf           = NULL;
    55825583        pDevice->IMediaExPort.pfnIoReqQueryDiscardRanges = NULL;
    55835584        pDevice->IMediaExPort.pfnIoReqStateChanged       = lsilogicR3IoReqStateChanged;
  • trunk/src/VBox/Devices/Storage/DrvSCSI.cpp

    r64657 r64660  
    13271327    pThis->IPortEx.pfnIoReqCopyFromBuf          = drvscsiIoReqCopyFromBuf;
    13281328    pThis->IPortEx.pfnIoReqCopyToBuf            = drvscsiIoReqCopyToBuf;
     1329    pThis->IPortEx.pfnIoReqQueryBuf             = NULL;
    13291330    pThis->IPortEx.pfnIoReqQueryDiscardRanges   = drvscsiIoReqQueryDiscardRanges;
    13301331    pThis->IPortEx.pfnIoReqStateChanged         = drvscsiIoReqStateChanged;
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