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

[Xen-changelog] [xen-unstable] [MINIOS] Exports a function to have all Xen ports unbound.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 97c55251047041c4636cee2290d5110e2aa0d609
# Parent  50467f56ed65e31f2f92cb57fda11be071f41fd1
[MINIOS] Exports a function to have all Xen ports unbound.

This is necessary when using mini-os as the foundation for a boot-loader.

Signed-off-by: Jacob Gorm Hansen <jacobg@xxxxxxx>
---
 extras/mini-os/events.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -r 50467f56ed65 -r 97c552510470 extras/mini-os/events.c
--- a/extras/mini-os/events.c   Mon Nov 27 10:02:24 2006 +0000
+++ b/extras/mini-os/events.c   Mon Nov 27 10:03:35 2006 +0000
@@ -35,6 +35,21 @@ static ev_action_t ev_actions[NR_EVS];
 static ev_action_t ev_actions[NR_EVS];
 void default_handler(evtchn_port_t port, struct pt_regs *regs, void *data);
 
+void unbind_all_ports(void)
+{
+    int i;
+
+       for(i=0;i<NR_EVS;i++)
+       {
+               if(ev_actions[i].handler != default_handler)
+               {
+                       struct evtchn_close close;
+                       mask_evtchn(i);
+                       close.port = i;
+                       HYPERVISOR_event_channel_op(EVTCHNOP_close, &close);
+               }
+       }
+}
 
 /*
  * Demux events to different handlers.

_______________________________________________
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®.