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: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Share memory between domains
From: Facoltà di informatica <ferrucci@xxxxxxxxxxxxxxx>
Date: Sun, 10 Apr 2005 12:07:27 +0200
Delivery-date: Sun, 10 Apr 2005 17:35:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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> <1112892821.5946.14.camel@xxxxxxxxxxxxxxxxxxxxx>
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

My really intention is to construct a communication channel between a daemon in a guest Os and a daemon in Dom0 without use the network.I think it's the same of the block device driver under Xen, but I don't know how Xend communicate to the frontend driver the number of the port of the event channel and the frames of the shared pages of the ring. Can you halp me?
Thanks

Ferrucci Luca

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

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