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] help with event channels

To: David Richardson <daverich04@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] help with event channels
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 12 Dec 2006 07:24:18 +0000
Delivery-date: Mon, 11 Dec 2006 23:24:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <262848.62107.qm@xxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AccdvojUxwkQNomxEduj9wANk04WTA==
Thread-topic: [Xen-devel] help with event channels
User-agent: Microsoft-Entourage/11.2.5.060620
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

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