From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCHv4] xen/gntdev: add ioctl for grant copy Date: Mon, 14 Dec 2015 10:28:05 -0500 Message-ID: <566EE005.9050305@oracle.com> References: <1448988229-16092-1-git-send-email-david.vrabel@citrix.com> <566ED083.1010501@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1a8V2j-0007O2-N1 for xen-devel@lists.xenproject.org; Mon, 14 Dec 2015 15:28:05 +0000 In-Reply-To: <566ED083.1010501@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 12/14/2015 09:21 AM, David Vrabel wrote: > On 01/12/15 16:43, David Vrabel wrote: >> 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. > Konrad, Boris, any comments? Reviewed-by: Boris Ostrovsky (You could use xen_offset_in_page(), which I didn't know existed)