From: Jacob Gorm Hansen Subject: Re: [PATCH] Allow mini-os to unbind all evtchns Date: Tue, 28 Nov 2006 13:06:16 +0100 Message-ID: <1164715576.12587.6.camel@localhost.localdomain> References: <1164371227.3256.3.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-aJ8N0KBkAJN6Z6YKsHAW" Return-path: In-Reply-To: <1164371227.3256.3.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-aJ8N0KBkAJN6Z6YKsHAW Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2006-11-24 at 13:27 +0100, Jacob Gorm Hansen wrote: > The attached patch exports a function clients can call to have all Xen > ports unbound. This is necessary when using mini-os as the foundation > for a boot-loader. Sorry, that patch did not work as intended. The correct version is attached. Bound ports are tracked in an array, and a function to unbind all ports in the array is exported. Jacob --=-aJ8N0KBkAJN6Z6YKsHAW Content-Disposition: attachment; filename=miniosunbindall.patch Content-Type: text/x-patch; name=miniosunbindall.patch; charset=us-ascii Content-Transfer-Encoding: 7bit Signed-off-by: Jacob Gorm Hansen diff -r 52ae8dd4bc75 extras/mini-os/events.c --- a/extras/mini-os/events.c Tue Oct 17 22:09:52 2006 +0100 +++ b/extras/mini-os/events.c Tue Nov 28 13:03:52 2006 +0100 @@ -31,10 +31,26 @@ typedef struct _ev_action_t { u32 count; } ev_action_t; +evtchn_port_t bound_ports[NR_EVS]; +int num_bound_ports=0; 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