From b9d1950675c67f10870debe164a226eef64f65d5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 18 Mar 2008 11:29:18 +0000 Subject: minios: Fix lost events evtchn_bind_interdomain used to clear any already pending event before binding a handler, because else the handler may be called before it is ready. That however leads to missed events, which I had to workaround for the HVM case. This changes the semantics of bind_evtchn, and thus of all the event channel binding functions (bind_virq, evtchn_alloc_unbound, evtchn_bind_interdomain) into not unmasking the event itself, hence letting the caller initialize properly before unmasking the port (e.g. record the port number in an appropriate place). Signed-off-by: Samuel Thibault --- extras/mini-os/events.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'extras/mini-os/events.c') diff --git a/extras/mini-os/events.c b/extras/mini-os/events.c index 9174f166ed..7c88807889 100644 --- a/extras/mini-os/events.c +++ b/extras/mini-os/events.c @@ -87,9 +87,6 @@ evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler, wmb(); ev_actions[port].handler = handler; - /* Finally unmask the port */ - unmask_evtchn(port); - return port; } @@ -191,8 +188,7 @@ int evtchn_bind_interdomain(domid_t pal, evtchn_port_t remote_port, if (err) return err; set_bit(op.local_port,bound_ports); - evtchn_port_t port = op.local_port; - clear_evtchn(port); /* Without, handler gets invoked now! */ + evtchn_port_t port = op.local_port; *local_port = bind_evtchn(port, handler, data); return err; } -- cgit v1.2.3