|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] help with event channels
On 11/12/06 7:54 pm, "David Richardson" <daverich04@xxxxxxxxx> wrote:
> I'd really appreciate any help with how to create a
> simple event channel between dom0 and a userspace
> program in domU. I'm running Xen3.0.3 stable. Thanks
> in advance.
Assuming userspace-to-userspace, both apps need to be linked against
libxenctrl. Then domU executes xc_evtchn_bind_unbound_port(xce_handle, 0).
The return value is a port number that dom0 can pass to
xc_evtchn_bind_interdomain(xce_handle, domU, domU_port).
The 'xce_handle' is obtained via a call to xc_evtchn_open().
You send an even to the remote end via xc_evtchn_notify().
You receive an event by, for example, read(xc_evtchn_fd(), &buffer, 2). Each
2-byte element in the read stream is a port id. You receive no further
notifications on a particular port until you write() the 2 bytes back via
the xc_evtchn_fd().
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|