Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/arch/xen/i386 Pull up revision 1.7 (requested by bouy...



details:   https://anonhg.NetBSD.org/src/rev/c2dba49ea7f5
branches:  netbsd-3
changeset: 574950:c2dba49ea7f5
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Mar 20 14:30:22 2005 +0000

description:
Pull up revision 1.7 (requested by bouyer in ticket #30):
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 ca1e5363137a -r c2dba49ea7f5 sys/arch/xen/i386/vector.S
--- a/sys/arch/xen/i386/vector.S        Sun Mar 20 14:28:23 2005 +0000
+++ b/sys/arch/xen/i386/vector.S        Sun Mar 20 14:30:22 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.6.2.1 2005/03/20 14:30:22 tron 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