[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [MINI-OS] Fix for event initialisation in Mini-OS. All events are masked when
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID a1c0c1e797a6d84791c70a175b38dfd5f6cbf640 # Parent 4f0bc574455751ed0493f083c13911d8e01b92f0 [MINI-OS] Fix for event initialisation in Mini-OS. All events are masked when the system is started up. This prevents from getting spurious events between hypercall to bind an event-channel and registering appropriate event handler. Signed-off-by: Grzegorz Milos <gm281@xxxxxxxxx> --- extras/mini-os/events.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff -r 4f0bc5744557 -r a1c0c1e797a6 extras/mini-os/events.c --- a/extras/mini-os/events.c Thu Jun 15 13:19:04 2006 +0100 +++ b/extras/mini-os/events.c Thu Jun 15 13:20:43 2006 +0100 @@ -35,24 +35,29 @@ int do_event(u32 port, struct pt_regs *r ev_action_t *action; if (port >= NR_EVS) { printk("Port number too large: %d\n", port); - return 0; + goto out; } action = &ev_actions[port]; action->count++; if (!action->handler) + { + printk("Spurious event on port %d\n", port); goto out; + } if (action->status & EVS_DISABLED) + { + printk("Event on port %d disabled\n", port); goto out; + } /* call the handler */ action->handler(port, regs); - - clear_evtchn(port); out: + clear_evtchn(port); return 1; } @@ -135,6 +140,7 @@ void init_events(void) { ev_actions[i].status = EVS_DISABLED; ev_actions[i].handler = default_handler; + mask_evtchn(i); } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |