|
|
|
|
|
|
|
|
|
|
xen-devel
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
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
|
|
|
|
|