Re: [XenPPC] IPI problems

2007-01-12 Thread Jimi Xenidis

Please check if you linux kernel is up to date.
I just built clean xenppc-unstable.hg (assuming it has the issues you  
state below) and all IPI ^A*3 tests (esp 't' and 'd') work just fine  
on my maple

I created an NFS domain and Did get:

(XEN) Assertion '!cpu_isset(nxt, cpu_core_map[cpu])' failed, line  
465, file schc

(XEN) BUG at sched_credit.c:465
(XEN) [ Xen-3.0-unstable ]
(XEN) CPU: 0001   DOMID: 0001
(XEN) pc c003c3d0 msr 80009032
(XEN) lr c0045f54 ctr c0045f40
(XEN) srr0  srr1 
(XEN) r00: 2488 c0673cc0 c066df00  

(XEN) r04: 0001  2482  
c00100a8
(XEN) r08: c0670080 c0045f40 c067  
c0045e78
(XEN) r12: c11ceb90 c0546100   

(XEN) r16:     

(XEN) r20:     

(XEN) r24:   4000  
c000
(XEN) r28:  c06c4fc8 c05552e8  
0001

(XEN)
(XEN) 
(XEN) Panic on CPU 1:
(XEN) BUG at sched_credit.c:465
(XEN) 
(XEN)
(XEN) Reboot in five seconds...
(XEN) [ Xen-3.0-unstable ]
(XEN) CPU: 0001   DOMID: 0001
(XEN) pc c003c3d0 msr 80009032
(XEN) lr c0045f54 ctr c0045f40
(XEN) srr0  srr1 
(XEN) r00: 2488 c0673cc0 c066df00  

(XEN) r04: 0001  2482  
c00100a8
(XEN) r08: c0670080 c0045f40 c067  
c0045e78
(XEN) r12: c11ceb90 c0546100   

(XEN) r16:     

(XEN) r20:     

(XEN) r24:   4000  
c000
(XEN) r28:  c06c4fc8 c05552e8  
0001
(XEN) [0033B6F0] 00435364 .debugger_trap_immediate 
+0x18/0x38

(XEN) [0033B770] 004352C8 .panic+0xe8/0x16c
(XEN) [0033B890] 0043544C .__bug+0x5c/0x6c
(XEN) [0033B910] 0041E3A0 .csched_cpu_pick+0x328/0x458
(XEN) [0033B9E0] 0041ED70 .csched_vcpu_acct+0x144/0x1dc
(XEN) [0033BA70] 00421170 .csched_tick+0x48/0xe8
(XEN) [0033BB10] 00429DD8 .t_timer_fn+0xec/0x164
(XEN) [0033BBC0] 0042DBA4 .timer_softirq_action 
+0xd0/0x1b8

(XEN) [0033BC90] 0042A758 .do_softirq+0xc4/0xec
(XEN) [0033BD20] 00455AC4 test_all_events+0x5c/0x64
(XEN) [0043EDE0] 80010001FBE1FFF8
(XEN) SP (60004bd8) is not in xen space


On Jan 12, 2007, at 6:45 PM, Hollis Blanchard wrote:


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_cal

Re: [XenPPC] IPI problems

2007-01-12 Thread Amos Waterland
On Fri, Jan 12, 2007 at 05:45:03PM -0600, Hollis Blanchard wrote:
> 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)").

No, this is almost certainly our code that checks that the IPI start is
acked.  If you run with `sync_console' you should see periodic messages
about start stalls.

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

Make sure you did not merge this out:

 http://lists.xensource.com/archives/html/xen-ppc-devel/2006-11/msg00149.html


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


[XenPPC] IPI problems

2007-01-12 Thread Hollis Blanchard
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.cThu Jan 11 13:39:27 2007 -0600
+++ b/xen/drivers/char/console.cFri Jan 12 17:09:01 2007 -0600
@@ -246,7 +246,7 @@ static void sercon_puts(const char *s)
 
 /* CTRL- 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@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] [xenppc-unstable] [POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to match DTC spec.

2007-01-12 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Ryan Harper <[EMAIL PROTECTED]>
# Node ID d6481755ade6fbe72d8e519191f12160f92cd517
# Parent  47a43a108647a9c8523408c39ab0546ab9483c5a
[POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to 
match DTC spec.

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>
Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
---
 tools/libxc/powerpc64/flatdevtree.c |7 +--
 tools/libxc/powerpc64/flatdevtree.h |2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff -r 47a43a108647 -r d6481755ade6 tools/libxc/powerpc64/flatdevtree.c
--- a/tools/libxc/powerpc64/flatdevtree.c   Thu Jan 11 13:39:27 2007 -0600
+++ b/tools/libxc/powerpc64/flatdevtree.c   Thu Jan 11 13:39:27 2007 -0600
@@ -14,7 +14,7 @@
  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  * Copyright Pantelis Antoniou 2006
- * Copyright (C) IBM Corporation 2006
+ * Copyright IBM Corporation 2006, 2007
  * 2006 (c) MontaVista, Software, Inc.
  *
  * Authors: Pantelis Antoniou <[EMAIL PROTECTED]>
@@ -209,7 +209,7 @@ void ft_add_rsvmap(struct ft_cxt *cxt, u
((u64 *) cxt->pres)[0] = cpu_to_be64(physaddr); /* phys = 0, size = 0, 
terminate */
((u64 *) cxt->pres)[1] = cpu_to_be64(size);
 
-   cxt->pres += 18;/* advance */
+   cxt->pres += 16;/* advance two u64s worth */
 
((u64 *) cxt->pres)[0] = 0; /* phys = 0, size = 0, terminate */
((u64 *) cxt->pres)[1] = 0;
@@ -317,6 +317,9 @@ int ft_end_tree(struct ft_cxt *cxt)
/* the new strings start */
cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
cxt->pstr = cxt->pstr_begin + cxt->strings_size;
+
+   /* mark the size of string structure in bph */
+   bph->size_dt_strings = cxt->strings_size;
 
return 0;
 }
diff -r 47a43a108647 -r d6481755ade6 tools/libxc/powerpc64/flatdevtree.h
--- a/tools/libxc/powerpc64/flatdevtree.h   Thu Jan 11 13:39:27 2007 -0600
+++ b/tools/libxc/powerpc64/flatdevtree.h   Thu Jan 11 13:39:27 2007 -0600
@@ -40,7 +40,7 @@ struct boot_param_header {
/* version 2 fields below */
u32 boot_cpuid_phys;/* Physical CPU id we're booting on */
/* version 3 fields below */
-   u32 dt_strings_size;/* size of the DT strings block */
+   u32 size_dt_strings;/* size of the DT strings block */
 };
 
 struct ft_cxt {

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


[XenPPC] [xenppc-unstable] [POWERPC][LIBXC] Whitespace cleanup of powerpc64/xc_linux_build.c

2007-01-12 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Ryan Harper <[EMAIL PROTECTED]>
# Node ID 47a43a108647a9c8523408c39ab0546ab9483c5a
# Parent  3ae579a27697e05040112770c4ffc725954a3a18
[POWERPC][LIBXC] Whitespace cleanup of powerpc64/xc_linux_build.c

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>
Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]>
---
 tools/libxc/powerpc64/xc_linux_build.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 3ae579a27697 -r 47a43a108647 tools/libxc/powerpc64/xc_linux_build.c
--- a/tools/libxc/powerpc64/xc_linux_build.cWed Jan 03 17:53:44 2007 -0600
+++ b/tools/libxc/powerpc64/xc_linux_build.cThu Jan 11 13:39:27 2007 -0600
@@ -187,9 +187,9 @@ out:
 }
 
 static unsigned long create_start_info(
-   void *devtree, start_info_t *start_info,
+void *devtree, start_info_t *start_info,
 unsigned int console_evtchn, unsigned int store_evtchn,
-   unsigned long nr_pages, unsigned long rma_pages)
+unsigned long nr_pages, unsigned long rma_pages)
 {
 unsigned long start_info_addr;
 uint64_t rma_top;
@@ -260,8 +260,8 @@ int xc_linux_build(int xc_handle,
 
 rma_pages = get_rma_pages(devtree);
 if (rma_pages == 0) {
-   rc = -1;
-   goto out;
+rc = -1;
+goto out;
 }
 
 if (get_rma_page_array(xc_handle, domid, &page_array, rma_pages)) {

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


[XenPPC] oops: xenppc-unstable broken

2007-01-12 Thread Hollis Blanchard
While pushing a couple of Ryan's patches, I accidentally pushed a broken
merge into xenppc-unstable. (I really don't know why I was trying to
merge using my "pristine" tree.) So that tree is going to have some
issues until I can sort it out.

Sorry.

-- 
Hollis Blanchard
IBM Linux Technology Center


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


Re: [XenPPC] [PATCH 0 of 4] [PATCH] move devtree creation to libxc

2007-01-12 Thread Hollis Blanchard
On Thu, 2007-01-11 at 13:42 -0500, Ryan Harper wrote:
> 
> whitespace_cleanup.patch - whitespace clean-up in xc_linux_build.c
> fix_up_flatdevtree.patch - fix copyright notice in flatdevtree.c
>  - fix pointer math in ft_add_rsvmap()
>  - rename bph string block field to match spec 

I've pushed patches 1 and 2 (more on that in another email).

By the way, don't forget it's 2007 in your copyright notices now. :)

-- 
Hollis Blanchard
IBM Linux Technology Center


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