WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Share memory between domains

To: Facoltà di informatica <ferrucci@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Share memory between domains
From: Christopher Clark <christopher.clark@xxxxxxxxxxxx>
Date: Thu, 07 Apr 2005 17:53:41 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 07 Apr 2005 16:47:57 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <003b01c53b8c$7d0580a0$0100a8c0@Casa1>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <003b01c53b8c$7d0580a0$0100a8c0@Casa1>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
You can share memory between the kernels of two domains by using the
grant table "grant access" mechanism. This is described with example
code in docs/misc/grant-tables.txt. The gist of it is:

domA creates a grant reference, and then communicates it to domB somehow
(for example, over a network connection would be one option).
see: gnttab_grant_foreign_access

domB uses the grant reference to map the foreign frame into its address
space.
see: HYPERVISOR_grant_table_op( GNTTABOP_map_grant_ref, ...)

The block device front and back drivers in xen-unstable use this to
communicate.

To share memory between user space processes in different domains would
require an extension to the grant table mapping mechanism to allow a
domain to specify the PTE it wishes to put the foreign frame number
into, rather than using the linear page table.

There is an alternative grant table mode used to transfer frames from
one domain to another; this wouldn't help you out with shared memory.

The grant table code currently in libxc is disabled, of debugging
interest only and unlikely to be of use to you.

Event channels are a way for one domain to notify the other that an
event of interest has occurred. This is an extremely low bandwidth
channel and should be used to trigger inspection of shared memory for
the actual communication. "ring.h" provides macros to assist with
building a structured communication channel between domains using shared
memory.

Christopher


On Thu, 2005-04-07 at 17:11, Facoltà di informatica wrote:
> How can I share memory between two domains using the functions of the
> libxc and the event channels? How can I use the grant table to do it?
> Thanks.
>  
> Ferrucci Luca
> 
> ______________________________________________________________________
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>