• David Vrabel's avatar
    xen/gntdev: add ioctl for grant copy · a4cdb556
    David Vrabel authored
    Add IOCTL_GNTDEV_GRANT_COPY to allow applications to copy between user
    space buffers and grant references.
    
    This interface is similar to the GNTTABOP_copy hypercall ABI except
    the local buffers are provided using a virtual address (instead of a
    GFN and offset).  To avoid userspace from having to page align its
    buffers the driver will use two or more ops if required.
    
    If the ioctl returns 0, the application must check the status of each
    segment with the segments status field.  If the ioctl returns a -ve
    error code (EINVAL or EFAULT), the status of individual ops is
    undefined.
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
    a4cdb556
gntdev.c 27.2 KB