All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Userspace grant communication
@ 2010-12-03 15:36 Daniel De Graaf
  2010-12-03 15:37 ` [PATCH 1/2] xen-gntdev: support mapping in HVM domains Daniel De Graaf
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Daniel De Graaf @ 2010-12-03 15:36 UTC (permalink / raw)
  To: xen-devel

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-12-09  1:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-03 15:36 [PATCH 0/2] Userspace grant communication Daniel De Graaf
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

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.