All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 0/2] Userspace grant communication
Date: Fri, 03 Dec 2010 10:36:17 -0500	[thread overview]
Message-ID: <4CF90E71.5020909@tycho.nsa.gov> (raw)

For fast communication between userspace applications in different domains,
it is useful to be able to set up a shared memory page. This can be used to
implement device driver frontends and backends completely in userspace, or
as a faster alternative to network communication. The current gntdev is
limited to PV domains, and does not allow grants to be created. The following
patches change gntdev to remapping existing pages, allowing the same code
to be used in PV and HVM, and add a gntalloc driver to allow mappings to be
created by userspace. These changes also make the mappings more application-
friendly: the mmap() calls can be made multiple times, persist across fork(),
and allow the device to be closed without invalidating the mapped areas. This
matches the behavior of mmap() on a normal file.

API changes from the existing /dev/xen/gntdev:

The unused "pad" field in ioctl_gntdev_map_grant_ref is now used for flags
on the mapping (currently used to specify if the mapping should be writable).
This provides sufficient information to perform the mapping when the ioctl is
called. To retain compatibility with current userspace, a new ioctl number is
used for this functionality and the legacy error on first mapping is retained
when the old ioctl is used.

IOCTL_GNTDEV_SET_MAX_GRANTS is not exposed in the Xen userspace libraries,
and is not very useful: it cannot be used to raise the limit of grants per
file descriptor, and is trivial to bypass by opening the device multiple
times. This version uses a global limit specified as a module parameter
(modifiable at runtime via sysfs).

-- 
Daniel De Graaf
National Security Agency

             reply	other threads:[~2010-12-03 15:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 15:36 Daniel De Graaf [this message]
2010-12-03 15:37 ` [PATCH 1/2] xen-gntdev: support mapping in HVM domains Daniel De Graaf
2010-12-08 16:40   ` Ian Campbell
2010-12-08 18:15     ` Daniel De Graaf
2010-12-03 15:38 ` [PATCH 2/2] xen-gntalloc: Userspace grant allocation driver Daniel De Graaf
2010-12-08 16:47   ` Ian Campbell
2010-12-08 18:15     ` Daniel De Graaf
2010-12-08 20:17       ` Daniel De Graaf
2010-12-09  1:14     ` Eamon Walsh
2010-12-03 16:30 ` [PATCH 0/2] Userspace grant communication Pasi Kärkkäinen
2010-12-03 18:27   ` Daniel De Graaf
2010-12-03 18:39     ` [PATCH 0/2] Userspace grant communication / XenClient (XCI) inter-domain communication Pasi Kärkkäinen
2010-12-04 19:54       ` Ian Pratt
2010-12-04 20:32         ` Pasi Kärkkäinen
2010-12-04 21:50         ` Vasiliy G Tolstov
2010-12-04 22:04           ` Ross Philipson
2010-12-07  0:30           ` Ian Pratt

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=4CF90E71.5020909@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.