Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/i386 When handling a defered event, unmasking i...



details:   https://anonhg.NetBSD.org/src/rev/fb8867fa07cc
branches:  trunk
changeset: 579552:fb8867fa07cc
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Mar 17 15:30:45 2005 +0000

description:
When handling a defered event, unmasking it isn't enouth, we also need to check
if the corresponding bit needs to be set in evtchn_pending_sel, and eventually
force an upcall (if we got a second event when this one what being handled).
For now to this by calling hypervisor_enable_irq(), this could be rewritten
in inline assembly by someone knowing enouth about i386 assembly :)

diffstat:

 sys/arch/xen/i386/vector.S |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 1e461cac367d -r fb8867fa07cc sys/arch/xen/i386/vector.S
--- a/sys/arch/xen/i386/vector.S        Thu Mar 17 15:26:06 2005 +0000
+++ b/sys/arch/xen/i386/vector.S        Thu Mar 17 15:30:45 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vector.S,v 1.6 2005/03/11 15:45:54 bouyer Exp $        */
+/*     $NetBSD: vector.S,v 1.7 2005/03/17 15:30:45 bouyer Exp $        */
 /*     NetBSD: 1.13 2004/03/11 11:39:26 yamt Exp       */
 
 /*
@@ -334,6 +334,7 @@
        unmask(num)                                                     ;\
        jmp     6b
 
+#if 0
 #ifdef DOM0OPS
 #define hypervisor_asm_unmask(num)                     \
        movl    irq_to_evtchn + (num) * 4,%ecx          ;\
@@ -352,6 +353,15 @@
        lock                                            ;\
        btrl    %ecx,EVENTS_MASK(%eax)
 #endif
+#else
+# Just unmasking the event isn't enouth, we also need to
+# reassert the event pending bit if needed. For now just call
+# the C function doing it, maybe rewrite in inline assembly ?
+#define hypervisor_asm_unmask(num)                     \
+       pushl $num                                      ;\
+       call _C_LABEL(hypervisor_enable_irq)            ;\
+       addl    $4,%esp
+#endif
 
 XENINTRSTUB(xenev,0,voidop,voidop,voidop,hypervisor_asm_unmask,voidop)
 XENINTRSTUB(xenev,1,voidop,voidop,voidop,hypervisor_asm_unmask,voidop)



Home | Main Index | Thread Index | Old Index