]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 May 2016 20:31:46 +0000 (22:31 +0200)
commit5152781ace98520b5f142a1188d1d02f18fcea71
tree66364d298f15da921de1cdcf0a5918b6f873fe2e
parent16348e7b62310c6b41baf7e1dbd3469d0256edc9
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>
(cherry picked from commit a4cdb556cae05cd3e7b602b3a44c01420c4e2258)
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
drivers/xen/gntdev.c
include/uapi/xen/gntdev.h