[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Share memory between domains



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.