From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH v2] introduce grant copy for user land Date: Mon, 8 Dec 2014 11:02:07 +0000 Message-ID: <5485852F.3080600@citrix.com> References: <1417536806-22562-1-git-send-email-thanos.makatos@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xxw4x-0001za-C3 for xen-devel@lists.xenproject.org; Mon, 08 Dec 2014 11:02:11 +0000 In-Reply-To: <1417536806-22562-1-git-send-email-thanos.makatos@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: Thanos Makatos , xen-devel@lists.xenproject.org Cc: boris.ostrovsky@oracle.com, david.vrabel@citrix.com List-Id: xen-devel@lists.xenproject.org On 02/12/14 16:13, Thanos Makatos wrote: > > +struct gntdev_grant_copy_segment { > + > + union { > + /* copy from (to) self to (from) guest */ > + struct { > + /* > + * source address and length > + */ > + struct iovec iov; > + > + /* the granted page */ > + uint32_t ref; > + > + /* offset in the granted page */ > + uint16_t offset; > + } self; > + > + /* copy from guest to guest */ > + struct { > + uint16_t len; > + > + struct { > + /* the granted page */ > + uint32_t ref; > + > + /* offset in the granted page */ > + uint16_t offset; > + } src, dst; > + } g2g; > + }; > + > + /* grant copy result (GNTST_XXX) */ > + int16_t status; > +}; I asked for this ioctl to mirror the hypercall. Which looks like: struct gnttab_copy { /* IN parameters. */ struct { union { grant_ref_t ref; xen_pfn_t gmfn; } u; domid_t domid; uint16_t offset; } source, dest; uint16_t len; uint16_t flags; /* GNTCOPY_* */ /* OUT parameters. */ int16_t status; }; i.e., each operation specifies the domid of the source and destination and whether it includes a ref or a virtual address. David