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

[Xen-changelog] [xen-unstable] [MINI-OS] Add evtchn_bind_interdomain to mini-os, allowing clients to



# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID cbfced5fcdb348f23c8727305230b638b16c92dd
# Parent  97ffb7856239a937f391583e881fae695c86fb68
[MINI-OS] Add evtchn_bind_interdomain to mini-os, allowing clients to
bind to interdomain event channels.

Signed-off-by: John D. Ramsdell <ramsdell@xxxxxxxxx>
Signed-off-by: Steven Smith <sos22@xxxxxxxxx>
---
 extras/mini-os/events.c         |   20 ++++++++++++++++++++
 extras/mini-os/include/events.h |    3 +++
 2 files changed, 23 insertions(+)

diff -r 97ffb7856239 -r cbfced5fcdb3 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Fri Jul 28 14:03:54 2006 +0100
+++ b/extras/mini-os/events.c   Fri Jul 28 14:05:02 2006 +0100
@@ -161,3 +161,23 @@ int evtchn_alloc_unbound(domid_t pal, ev
     *port = bind_evtchn(op.u.alloc_unbound.port, handler, data);
     return err;
 }
+
+/* Connect to a port so as to allow the exchange of notifications with
+   the pal. Returns the result of the hypervisor call. */
+
+int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port,
+                           evtchn_handler_t handler, void *data,
+                           evtchn_port_t *local_port)
+{
+    evtchn_op_t op;
+    op.cmd = EVTCHNOP_bind_interdomain;
+    op.u.bind_interdomain.remote_dom = pal;
+    op.u.bind_interdomain.remote_port = remote_port;
+    int err = HYPERVISOR_event_channel_op(&op);
+    if (err)
+               return err;
+       evtchn_port_t port = op.u.bind_interdomain.local_port;
+    clear_evtchn(port);              /* Without, handler gets invoked now! */
+    *local_port = bind_evtchn(port, handler, data);
+    return err;
+}
diff -r 97ffb7856239 -r cbfced5fcdb3 extras/mini-os/include/events.h
--- a/extras/mini-os/include/events.h   Fri Jul 28 14:03:54 2006 +0100
+++ b/extras/mini-os/include/events.h   Fri Jul 28 14:05:02 2006 +0100
@@ -33,6 +33,9 @@ void init_events(void);
 void init_events(void);
 int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
                                                 void *data, evtchn_port_t 
*port);
+int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port,
+                                                       evtchn_handler_t 
handler, void *data,
+                                                       evtchn_port_t 
*local_port);
 
 static inline int notify_remote_via_evtchn(evtchn_port_t port)
 {

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


 


Rackspace

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