]> git.baikalelectronics.ru Git - kernel.git/commit
xen/gntdev: add ioctl for grant copy
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 2 Dec 2014 16:13:26 +0000 (16:13 +0000)
committerDavid Vrabel <david.vrabel@citrix.com>
Thu, 7 Jan 2016 13:21:53 +0000 (13:21 +0000)
commit5e018220550785131bc02fb057f5bf66d87697d9
treef21957dcd64da3d2be1a0891b523b8ff46e58d1d
parent4e64b5bd26cd234c4a91fd91a9502ccad6e82fe6
xen/gntdev: add ioctl for grant copy

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: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
drivers/xen/gntdev.c
include/uapi/xen/gntdev.h