From: David Vrabel <david.vrabel@citrix.com>
To: Thanos Makatos <thanos.makatos@citrix.com>,
xen-devel@lists.xenproject.org
Cc: boris.ostrovsky@oracle.com, david.vrabel@citrix.com
Subject: Re: [PATCH] introduce grant copy for user land
Date: Mon, 3 Nov 2014 18:03:11 +0000 [thread overview]
Message-ID: <5457C35F.50504@citrix.com> (raw)
In-Reply-To: <1412262916-22596-1-git-send-email-thanos.makatos@citrix.com>
On 02/10/14 16:15, Thanos Makatos wrote:
> This patch introduces the interface to allow user-space applications
> execute grant-copy operations. This is done by sending an ioctl to the
> grant device. The number of grant-copy segments is currently limited to
> 16 in order to simplify the implementation, however the ABI allows an
> arbitrary number of operations.
Sorry for not responding earlier. If I haven't responded to a patch in
a week, a reminder ping is appreciated.
The arbitrary limitations in number of ops and page alignment should be
removed. I think both can be removed relatively easily by consuming
page aligned chunks of segments and doign the hypercall when a batch of
ops is filled.
> +struct gntdev_grant_copy_segment {
> + /*
> + * source address and length
> + */
> + struct iovec iov;
> +
> + /* the granted page */
> + uint32_t ref;
> +
> + /* offset in the granted page */
> + uint16_t offset;
> +
> + /* grant copy result (GNTST_XXX) */
> + int16_t status;
> +};
> +
> +#define IOCTL_GNTDEV_GRANT_COPY \
> +_IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
> +struct ioctl_gntdev_grant_copy {
> + /*
> + * copy direction: 0 to copy to guest, 1 to copy from guest
> + */
> + int dir;
I think this dir should be per-segment and use the GNTCPY_source_gref
and GNTCOPY_dest_gref flags, since per-op direction is what the
hypercall provides.
> +
> + /* domain ID */
> + uint32_t domid;
> +
> + unsigned int count;
> +
> + struct gntdev_grant_copy_segment __user *segments;
> +};
David
next prev parent reply other threads:[~2014-11-03 18:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 15:15 [PATCH] introduce grant copy for user land Thanos Makatos
2014-11-03 18:03 ` David Vrabel [this message]
2014-11-11 12:27 ` Thanos Makatos
2014-11-11 13:34 ` David Vrabel
2014-11-11 14:42 ` Thanos Makatos
2014-11-11 15:06 ` David Vrabel
2014-11-11 15:23 ` Thanos Makatos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5457C35F.50504@citrix.com \
--to=david.vrabel@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=thanos.makatos@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).