From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: [PATCH 0/2] Userspace grant communication / XenClient (XCI) inter-domain communication Date: Fri, 3 Dec 2010 20:39:41 +0200 Message-ID: <20101203183941.GC2754@reaktio.net> References: <4CF90E71.5020909@tycho.nsa.gov> <20101203163054.GA2754@reaktio.net> <4CF936AA.3010805@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <4CF936AA.3010805@tycho.nsa.gov> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Daniel De Graaf Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, Dec 03, 2010 at 01:27:54PM -0500, Daniel De Graaf wrote: > On 12/03/2010 11:30 AM, Pasi K=E4rkk=E4inen wrote: > > On Fri, Dec 03, 2010 at 10:36:17AM -0500, Daniel De Graaf wrote: > >> For fast communication between userspace applications in different d= omains, > >> 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 userspa= ce, 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 mapping= s to be > >> created by userspace. These changes also make the mappings more appl= ication- > >> friendly: the mmap() calls can be made multiple times, persist acros= s fork(), > >> and allow the device to be closed without invalidating the mapped ar= eas. This > >> matches the behavior of mmap() on a normal file. > >> > >=20 > > Btw are you aware of the new fast inter-domain communication method i= n XenClient ? > >=20 > > -- Pasi > >=20 >=20 > No, I have not looked at that; is there a whitepaper or some informatio= n on it? > If not, a pointer to the relevant source would be of interest. >=20 Unfortunately I can't remember the name of the feature..=20 hopefully someone from Citrix working with XCI can help out. -- Pasi > - Daniel >=20 > >=20 > >> 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 w= ritable). > >> 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 libr= aries, > >> and is not very useful: it cannot be used to raise the limit of gran= ts per > >> file descriptor, and is trivial to bypass by opening the device mult= iple > >> times. This version uses a global limit specified as a module parame= ter > >> (modifiable at runtime via sysfs). > >> > >> --=20 > >> Daniel De Graaf > >> National Security Agency > >> > >=20