WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] IPI problems

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] IPI problems
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Fri, 12 Jan 2007 17:45:03 -0600
Delivery-date: Fri, 12 Jan 2007 15:44:57 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Reply-to: Hollis Blanchard <hollisb@xxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
I mentioned that I accidentally pushed an upstream merge to
xenppc-unstable while it's still broken. There are a couple broken
things. First, DomU console stops mid-string early in boot. Could be an
event channel problem with the ring buffer; haven't investigated.

We seem to have an IPI problem, which causes vcpu_pause() to hang the
system. The following patch, tested on JS20 and JS21, illustrates it.
Before dom0 starts, IPIs work fine. After Linux's mpic_init(), IPIs (as
triggered by the 'I' keyhandler) lock the machine. Actually, it looks
like a message is trying to get out, because after a while we see a '('
emitted (presumably the first character in "(XEN)").

(When I comment out mpic_init() in dom0, Xen IPIs continue to work but
real IRQs (e.g. the IDE controller) fail in dom0.)

Why is this problem occurring only after an upstream merge? I don't
know. It's possible that some common IRQ code has changed to no longer
call the same arch-specific code, but I'm just speculating.



diff -r d6481755ade6 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Thu Jan 11 13:39:27 2007 -0600
+++ b/xen/arch/powerpc/setup.c  Fri Jan 12 17:12:27 2007 -0600
@@ -438,7 +438,9 @@ static void __init __start_xen(multiboot
 
     domain_unpause_by_systemcontroller(dom0);
 #ifdef DEBUG_IPI
-    ipi_torture_test();
+    //ipi_torture_test();
+    extern void do_ipi_test(char c);
+    do_ipi_test(0);
 #endif
     startup_cpu_idle_loop();
 }
diff -r d6481755ade6 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Thu Jan 11 13:39:27 2007 -0600
+++ b/xen/common/keyhandler.c   Fri Jan 12 17:44:46 2007 -0600
@@ -260,6 +260,16 @@ static void do_debug_key(unsigned char k
                              bit. */
 }
 
+static void got_ipi(void *info)
+{
+    printk("CPU %u got IPI\n", smp_processor_id());
+}
+
+void do_ipi_test(unsigned char key)
+{
+    smp_call_function(got_ipi, NULL, 0, 0);
+}
+
 void initialize_keytable(void)
 {
     open_softirq(KEYPRESS_SOFTIRQ, keypress_softirq);
@@ -286,6 +296,8 @@ void initialize_keytable(void)
 #endif
 
     register_irq_keyhandler('%', do_debug_key,   "Trap to xendbg");
+
+    register_keyhandler('I', do_ipi_test, "IPI test");
 }
 
 /*
diff -r d6481755ade6 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Thu Jan 11 13:39:27 2007 -0600
+++ b/xen/drivers/char/console.c        Fri Jan 12 17:09:01 2007 -0600
@@ -246,7 +246,7 @@ static void sercon_puts(const char *s)
 
 /* CTRL-<switch_char> switches input direction between Xen and DOM0. */
 #define SWITCH_CODE (opt_conswitch[0]-'a'+1)
-static int xen_rx = 1; /* FALSE => serial input passed to domain 0. */
+static int xen_rx = 0; /* FALSE => serial input passed to domain 0. */
 
 static void switch_serial_input(void)
 {
diff -r d6481755ade6 xen/include/asm-powerpc/smp.h
--- a/xen/include/asm-powerpc/smp.h     Thu Jan 11 13:39:27 2007 -0600
+++ b/xen/include/asm-powerpc/smp.h     Fri Jan 12 17:03:59 2007 -0600
@@ -52,7 +52,7 @@ void smp_event_check_interrupt(void);
 void smp_event_check_interrupt(void);
 void send_IPI_mask(cpumask_t mask, int vector);
 
-#undef DEBUG_IPI
+#define DEBUG_IPI
 #ifdef DEBUG_IPI
 void ipi_torture_test(void);
 #endif



-- 
Hollis Blanchard
IBM Linux Technology Center


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>