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-changelog

[Xen-changelog] [xen-unstable] [MINI-OS] Extend alloc_unbound so that th

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [MINI-OS] Extend alloc_unbound so that the remote domain isn't always dom0.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Jul 2006 21:50:46 +0000
Delivery-date: Fri, 28 Jul 2006 14:53:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 97ffb7856239a937f391583e881fae695c86fb68
# Parent  98a802d258482b4d8e462493eb981741c82a713c
[MINI-OS] Extend alloc_unbound so that the remote domain isn't always dom0.

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

diff -r 98a802d25848 -r 97ffb7856239 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Fri Jul 28 14:02:49 2006 +0100
+++ b/extras/mini-os/events.c   Fri Jul 28 14:03:54 2006 +0100
@@ -141,25 +141,23 @@ void default_handler(evtchn_port_t port,
     printk("[Port %d] - event received\n", port);
 }
 
+/* Create a port available to the pal for exchanging notifications.
+   Returns the result of the hypervisor call. */
+
 /* Unfortunate confusion of terminology: the port is unbound as far
    as Xen is concerned, but we automatically bind a handler to it
    from inside mini-os. */
-evtchn_port_t evtchn_alloc_unbound(evtchn_handler_t handler, void *data)
+
+int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
+                                                void *data, evtchn_port_t 
*port)
 {
-       evtchn_port_t port;
-       evtchn_op_t op;
-       int err;
-
-       op.cmd = EVTCHNOP_alloc_unbound;
-       op.u.alloc_unbound.dom = DOMID_SELF;
-       op.u.alloc_unbound.remote_dom = 0;
-
-       err = HYPERVISOR_event_channel_op(&op);
-       if (err) {
-               printk("Failed to alloc unbound evtchn: %d.\n", err);
-               return -1;
-       }
-       port = op.u.alloc_unbound.port;
-       bind_evtchn(port, handler, data);
-       return port;
+    evtchn_op_t op;
+    op.cmd = EVTCHNOP_alloc_unbound;
+    op.u.alloc_unbound.dom = DOMID_SELF;
+    op.u.alloc_unbound.remote_dom = pal;
+    int err = HYPERVISOR_event_channel_op(&op);
+    if (err)
+               return err;
+    *port = bind_evtchn(op.u.alloc_unbound.port, handler, data);
+    return err;
 }
diff -r 98a802d25848 -r 97ffb7856239 extras/mini-os/include/events.h
--- a/extras/mini-os/include/events.h   Fri Jul 28 14:02:49 2006 +0100
+++ b/extras/mini-os/include/events.h   Fri Jul 28 14:03:54 2006 +0100
@@ -31,8 +31,8 @@ evtchn_port_t bind_evtchn(evtchn_port_t 
                                                  void *data);
 void unbind_evtchn(evtchn_port_t port);
 void init_events(void);
-evtchn_port_t evtchn_alloc_unbound(evtchn_handler_t handler,
-                                                                  void *data);
+int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler,
+                                                void *data, evtchn_port_t 
*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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [MINI-OS] Extend alloc_unbound so that the remote domain isn't always dom0., Xen patchbot-unstable <=