Re: [XenPPC] Re: xm-test
On Fri, Sep 15, 2006 at 12:10:44PM +1000, Tony Breeds wrote: > This patch gets the process further, but I expect more changes to be > required. See I said therie'd be more. With this additional patch, the initrd.img and the rootfs build successfully. (available from http://bakeyournoodle.com/~tony/xm-test/) Now to test they actually work. --- Use gcc 3.4.2 instead of 4.0.2. gcc-4.0.2 doesn't work rather then try and fix it use 3.4.2. --- tools/xm-test/ramdisk/configs/buildroot-powerpc |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- diff -r 766b60fa732f0cce61509576550c426f3ae66da7 -r 490174d8aa7b023fb8787d74c6144ede212e6c6e tools/xm-test/ramdisk/configs/buildroot-powerpc --- a/tools/xm-test/ramdisk/configs/buildroot-powerpc Fri Sep 15 12:10:07 2006 +1000 +++ b/tools/xm-test/ramdisk/configs/buildroot-powerpc Fri Sep 15 14:45:23 2006 +1000 @@ -86,20 +86,20 @@ BR2_EXTRA_BINUTILS_CONFIG_OPTIONS="" # # BR2_GCC_VERSION_3_3_5 is not set # BR2_GCC_VERSION_3_3_6 is not set -# BR2_GCC_VERSION_3_4_2 is not set +BR2_GCC_VERSION_3_4_2=y # BR2_GCC_VERSION_3_4_3 is not set # BR2_GCC_VERSION_3_4_4 is not set # BR2_GCC_VERSION_3_4_5 is not set # BR2_GCC_VERSION_3_4_6 is not set # BR2_GCC_VERSION_4_0_0 is not set # BR2_GCC_VERSION_4_0_1 is not set -BR2_GCC_VERSION_4_0_2=y +# BR2_GCC_VERSION_4_0_2 is not set # BR2_GCC_VERSION_4_0_3 is not set # BR2_GCC_VERSION_4_1_0 is not set # BR2_GCC_VERSION_4_1_1 is not set # BR2_GCC_VERSION_4_2 is not set # BR2_GCC_IS_SNAP is not set -BR2_GCC_VERSION="4.0.2" +BR2_GCC_VERSION="3.4.2" # BR2_GCC_USE_SJLJ_EXCEPTIONS is not set BR2_EXTRA_GCC_CONFIG_OPTIONS="" # BR2_INSTALL_LIBSTDCPP is not set Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [linux-ppc-2.6] [POWERPC][XEN] should call HYPERVISOR_poll() not HYPERVISOR_block()
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 5a609aa8489bcb45a7e22f90526c52278025c5bc # Parent 4a1f58739bc25b80eae92af80b9ef309cb25468c [POWERPC][XEN] should call HYPERVISOR_poll() not HYPERVISOR_block() block will enable interrupts, this is a bad thing to do while in udb/xmon, and yes had to implement HYPERVISOR_poll(). Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- arch/powerpc/platforms/xen/hcall.c | 40 +++- arch/powerpc/platforms/xen/setup.c |5 -- arch/powerpc/platforms/xen/setup.h |5 ++ arch/powerpc/platforms/xen/udbg_xen.c | 61 +--- include/asm-powerpc/xen/asm/hypercall.h |5 +- 5 files changed, 62 insertions(+), 54 deletions(-) diff -r 4a1f58739bc2 -r 5a609aa8489b arch/powerpc/platforms/xen/hcall.c --- a/arch/powerpc/platforms/xen/hcall.cTue Sep 12 15:53:01 2006 -0500 +++ b/arch/powerpc/platforms/xen/hcall.cThu Sep 14 22:35:58 2006 -0400 @@ -39,6 +39,7 @@ #include #include #include +#include "setup.h" #define xen_guest_handle(hnd) ((hnd).p) @@ -183,7 +184,6 @@ int HYPERVISOR_sched_op(int cmd, void *a int HYPERVISOR_sched_op(int cmd, void *arg) { struct xencomm_desc *desc; - ulong argsize; switch (cmd) { case SCHEDOP_yield: @@ -192,17 +192,21 @@ int HYPERVISOR_sched_op(int cmd, void *a cmd, 0); break; - case SCHEDOP_shutdown: { - desc = xencomm_create_inline(arg); - - return plpar_hcall_norets(XEN_MARK(__HYPERVISOR_sched_op), - cmd, desc); - } - case SCHEDOP_poll: - argsize = sizeof(sched_poll_t); - break; + case SCHEDOP_poll: { + evtchn_port_t *ports; + struct sched_poll sched_poll; + + memcpy(&sched_poll, arg, sizeof(sched_poll)); + + ports = xencomm_create_inline( + xen_guest_handle(sched_poll.ports)); + set_xen_guest_handle(sched_poll.ports, ports); + memcpy(arg, &sched_poll, sizeof(sched_poll)); + + } + break; + case SCHEDOP_shutdown: case SCHEDOP_remote_shutdown: - argsize = sizeof(sched_remote_shutdown_t); break; default: printk(KERN_ERR "%s: unknown sched op %d\n", __func__, cmd); @@ -215,6 +219,20 @@ int HYPERVISOR_sched_op(int cmd, void *a cmd, desc); } EXPORT_SYMBOL(HYPERVISOR_sched_op); + +int +HYPERVISOR_poll( + evtchn_port_t *ports, unsigned int nr_ports, u64 timeout) +{ + struct sched_poll sched_poll = { + .nr_ports = nr_ports, + .timeout = jiffies_to_ns(timeout) + }; + set_xen_guest_handle(sched_poll.ports, ports); + + return HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll); +} +EXPORT_SYMBOL(HYPERVISOR_poll); int HYPERVISOR_multicall(void *call_list, int nr_calls) { diff -r 4a1f58739bc2 -r 5a609aa8489b arch/powerpc/platforms/xen/setup.c --- a/arch/powerpc/platforms/xen/setup.cTue Sep 12 15:53:01 2006 -0500 +++ b/arch/powerpc/platforms/xen/setup.cThu Sep 14 22:35:58 2006 -0400 @@ -154,11 +154,6 @@ int is_running_on_xen(void) return running_on_xen; } -static u64 jiffies_to_ns(unsigned long j) -{ - return j * (10UL / HZ); -} - static void xen_power_save(void) { /* SCHEDOP_yield could immediately return. Instead, we diff -r 4a1f58739bc2 -r 5a609aa8489b arch/powerpc/platforms/xen/setup.h --- a/arch/powerpc/platforms/xen/setup.hTue Sep 12 15:53:01 2006 -0500 +++ b/arch/powerpc/platforms/xen/setup.hThu Sep 14 22:35:58 2006 -0400 @@ -14,3 +14,8 @@ static inline u64 tb_to_ns(u64 tb) } return 0; } + +static inline u64 jiffies_to_ns(unsigned long j) +{ + return j * (10UL / HZ); +} diff -r 4a1f58739bc2 -r 5a609aa8489b arch/powerpc/platforms/xen/udbg_xen.c --- a/arch/powerpc/platforms/xen/udbg_xen.c Tue Sep 12 15:53:01 2006 -0500 +++ b/arch/powerpc/platforms/xen/udbg_xen.c Thu Sep 14 22:35:58 2006 -0400 @@ -5,6 +5,30 @@ #include #include #include "setup.h" + +static void udbg_xen_wait(void) +{ + evtchn_port_t port = 0; + + if (xen_start_info) { + port = xen_start_info->console.domU.evtchn; + clear_evtchn(port); + } + HYPERVISOR_poll(&port, 1, 10); +} + +static int udbg_getc_xen(void) +{ + int ch; + for (;;) { + ch = udbg_getc_poll(); + if (ch == -1) { + udbg_xen_wait(); + } else { + return ch; + } + } +} static void udbg_putc_dom0_xen(char c) { @@ -45,24 +69,6 @@ static int udbg_getc_poll_dom0_xen(void) inbuflen--; return ch; -} - -static int udbg_ge
[XenPPC] Re: xm-test
On Thu, Sep 14, 2006 at 04:23:48PM -0400, Jimi Xenidis wrote: > Tony expressed interest xm-test.. > I was in a really looong boring meeting so figured I just try it. > > anyway.. started a wiki page to at least list the packges I needed to > get it started. > http://wiki.xensource.com/xenwiki/XenPPC/Run/XM-Test > > tools/xm-test/README tells you what you need to do, I get as far as > make breaking on a wget. I guess it's been broken on all architectures for a while. Below is a work in progress patch for you view pleaseure, but I'm not suggesting it's merged. --- This patch is a first step in using xm-test on powerpc. It does: * Introduces a bunch of additions to .hgignore to clean up hg status * Uses buildroot-snapshot, instead of the dated (and missing) 2006060 snapshot * Replaces hardcoded references to i386 to something based on `uname -m` * Renames buildroot -> buildroot-i386 * Adds buildroot-powerpc * Adds the concept of a downlod cache. - This is a nasty hack to stop the build process from grabbing the toolchain each time you build. - You can grab it from http://bakeyournoodle.com/~tony/xm-test/dl.tar.bz2 This patch gets the process further, but I expect more changes to be required. --- .hgignore |9 tools/xm-test/ramdisk/Makefile.am | 20 + tools/xm-test/ramdisk/configs/buildroot | 330 --- tools/xm-test/ramdisk/configs/buildroot-i386| 330 +++ tools/xm-test/ramdisk/configs/buildroot-powerpc | 334 5 files changed, 687 insertions(+), 336 deletions(-) --- diff -r c94df1e4e62c .hgignore --- a/.hgignore Thu Sep 14 15:43:38 2006 -0500 +++ b/.hgignore Fri Sep 15 11:48:38 2006 +1000 @@ -180,6 +180,15 @@ ^tools/domctrl/domctrl$ ^tools/domctrl/domctrl.dbg$ ^tools/xm-test/ramdisk/buildroot +^tools/xm-test/aclocal.m4$ +^tools/xm-test/autom4te +^tools/xm-test/install-sh$ +^tools/xm-test/missing$ +^tools/xm-test/config(ure|.log|.status)$ +^tools/xm-test/Makefile(.in)*$ +^tools/xm-test/.*/Makefile(.in)*$ +^tools/xm-test/lib/XmTestLib/config.py$ +^tools/xm-test/lib/XmTestReport/xmtest.py$ ^xen/BLOG$ ^xen/TAGS$ ^xen/arch/x86/asm-offsets\.s$ diff -r c94df1e4e62c tools/xm-test/ramdisk/Makefile.am --- a/tools/xm-test/ramdisk/Makefile.am Thu Sep 14 15:43:38 2006 -0500 +++ b/tools/xm-test/ramdisk/Makefile.am Fri Sep 15 11:48:38 2006 +1000 @@ -2,13 +2,17 @@ INITRD ?= http://xm-test.xensource.com/r EXTRA_DIST = skel configs patches -BR_TAR = buildroot-20060606.tar.bz2 +BR_ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e s/ppc/powerpc/ -e s/64//) + +BR_TAR = buildroot-snapshot.tar.bz2 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR) -#BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2 BR_SRC = buildroot -BR_IMG = $(BR_SRC)/rootfs.i386.ext2 +BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2 +BR_CACHE = dl.tar.bz2 +BR_CACHE_URL = ~/xm-test.cache/$(BR_CACHE) -BR_ROOT = build_i386/root + +BR_ROOT = build_$(BR_ARCH)/root HVM_SCRIPT = bin/create_disk_image @@ -26,11 +30,15 @@ endif $(BR_TAR): wget $(BR_URL) -$(BR_SRC): $(BR_TAR) +$(BR_CACHE): + cp $(BR_CACHE_URL) $(BR_CACHE) + +$(BR_SRC): $(BR_TAR) $(BR_CACHE) tar xjf $(BR_TAR) + tar -C $(BR_SRC) -xjf $(BR_CACHE) $(BR_IMG): $(BR_SRC) - cp configs/buildroot $(BR_SRC)/.config + cp configs/buildroot-$(BR_ARCH) $(BR_SRC)/.config cp configs/busybox $(BR_SRC)/package/busybox/busybox.config cp configs/uClibc $(BR_SRC)/toolchain/uClibc/uClibc.config (for i in patches/buildroot/*.patch; do \ diff -r c94df1e4e62c tools/xm-test/ramdisk/configs/buildroot-i386 --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/tools/xm-test/ramdisk/configs/buildroot-i386 Fri Sep 15 11:48:38 2006 +1000 @@ -0,0 +1,330 @@ +# +# Automatically generated make config: don't edit +# +BR2_HAVE_DOT_CONFIG=y +# BR2_alpha is not set +# BR2_arm is not set +# BR2_armeb is not set +# BR2_cris is not set +BR2_i386=y +# BR2_m68k is not set +# BR2_mips is not set +# BR2_mipsel is not set +# BR2_nios2 is not set +# BR2_powerpc is not set +# BR2_sh is not set +# BR2_sparc is not set +# BR2_x86_64 is not set +BR2_x86_i386=y +# BR2_x86_i486 is not set +# BR2_x86_i586 is not set +# BR2_x86_i686 is not set +BR2_ARCH="i386" +BR2_ENDIAN="LITTLE" + +# +# Build options +# +BR2_WGET="wget --passive-ftp" +BR2_SVN="svn co" +BR2_TAR_OPTIONS="" +BR2_DL_DIR="$(BASE_DIR)/dl" +BR2_SOURCEFORGE_MIRROR="easynews" +BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" +BR2_TOPDIR_PREFIX="" +BR2_TOPDIR_SUFFIX="" +BR2_GNU_BUILD_SUFFIX="pc-linux-gnu" +BR2_JLEVEL=1 + +# +# Toolchain Options +# + +# +# Kernel Header Options +# +# BR2_KERNEL_HEADERS_2_4_25 is not set +# BR2_KERNEL_HEADERS_2_4_27 is not set +# BR2_KERNEL_HEADERS_2_4_29 is not set +# BR2_KERNEL_HEADERS_2_4_31 is not set +# BR2_KERNEL_HEADERS_2_6_9 is not set +# BR2_KERNEL_HEADERS_2_
[XenPPC] [PATCH] SMP support
Enable secondary processors as schedulable entities and allow domU's to run on them. Tested extensively on JS20 and JS21 with up to ten domains at a time. Note that this patch relies on the hdec storm patch just posted. Signed-off-by: Amos Waterland <[EMAIL PROTECTED]> --- setup.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff -r c94df1e4e62c xen/arch/powerpc/setup.c --- a/xen/arch/powerpc/setup.c Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/arch/powerpc/setup.c Thu Sep 14 18:37:30 2006 -0400 @@ -89,6 +89,8 @@ extern char __per_cpu_start[], __per_cpu /* move us to a header file */ extern void initialize_keytable(void); +static struct domain *idle_domain; + volatile struct processor_area * volatile global_cpu_table[NR_CPUS]; int is_kernel_text(unsigned long addr) @@ -152,8 +154,6 @@ static void percpu_free_unused_areas(voi static void __init start_of_day(void) { -struct domain *idle_domain; - init_IRQ(); scheduler_init(); @@ -167,23 +167,6 @@ static void __init start_of_day(void) /* for some reason we need to set our own bit in the thread map */ cpu_set(0, cpu_sibling_map[0]); - -percpu_free_unused_areas(); - -{ -/* FIXME: Xen assumes that an online CPU is a schedualable - * CPU, but we just are not there yet. Remove this fragment when - * scheduling processors actually works. */ -int cpuid; - -printk("WARNING!: Taking all secondary CPUs offline\n"); - -for_each_online_cpu(cpuid) { -if (cpuid == 0) -continue; -cpu_clear(cpuid, cpu_online_map); -} -} initialize_keytable(); /* Register another key that will allow for the the Harware Probe @@ -257,9 +240,19 @@ static int kick_secondary_cpus(int maxcp /* This is the first C code that secondary processors invoke. */ int secondary_cpu_init(int cpuid, unsigned long r4) { +struct vcpu *vcpu; + cpu_initialize(cpuid); smp_generic_take_timebase(); cpu_set(cpuid, cpu_online_map); + +vcpu = alloc_vcpu(idle_domain, cpuid, cpuid); +BUG_ON(vcpu == NULL); + +set_current(idle_domain->vcpu[cpuid]); +idle_vcpu[cpuid] = current; +startup_cpu_idle_loop(); + while(1); } @@ -332,6 +325,8 @@ static void __init __start_xen(multiboot debugger_trap_immediate(); #endif +start_of_day(); + /* Deal with secondary processors. */ if (opt_nosmp || ofd_boot_cpu == -1) { printk("nosmp: leaving secondary processors spinning forever\n"); @@ -340,7 +335,8 @@ static void __init __start_xen(multiboot kick_secondary_cpus(max_cpus); } -start_of_day(); +/* This cannot be called before secondary cpus are marked online. */ +percpu_free_unused_areas(); /* Create initial domain 0. */ dom0 = domain_create(0); ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] Fix infinite loop caused by hdec storm
This was the cause of the periodic hang on secondary processors that has been holding back the submission of the SMP patch. Signed-off-by: Amos Waterland <[EMAIL PROTECTED]> --- time.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -r c94df1e4e62c xen/arch/powerpc/time.c --- a/xen/arch/powerpc/time.c Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/arch/powerpc/time.c Thu Sep 14 18:28:24 2006 -0400 @@ -60,7 +60,7 @@ int reprogram_timer(s_time_t timeout) s_time_t expire; if (timeout == 0) { -expire = 0; +expire = INT_MAX; } else { s_time_t now; ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] Improved tracing facility
This is not a real tracing facility, but it is good enough to find bugs. It supports symbolic lookup and tracepoint insertion, as well as hooking the three main entry points to the hypervisor. Signed-off-by: Amos Waterland <[EMAIL PROTECTED]> --- arch/powerpc/exceptions.c| 79 +++ arch/powerpc/external.c | 20 ++ arch/powerpc/hcalls.c| 20 ++ include/asm-powerpc/config.h | 11 + 4 files changed, 130 insertions(+) diff -r c94df1e4e62c xen/arch/powerpc/exceptions.c --- a/xen/arch/powerpc/exceptions.c Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/arch/powerpc/exceptions.c Thu Sep 14 18:33:35 2006 -0400 @@ -29,6 +29,40 @@ #undef DEBUG +#ifdef TRACE_DOMAINS +long iars[MAX_IARS][2]; +long last_dump_time = 0; +int cpu_to_trace = 3; + +void trace_function(void *addr) +{ +long iar = ((long *)(addr))[0]; + +return trace_address(iar); +} + +void trace_address(long iar) +{ +int i; + +if (smp_processor_id() != cpu_to_trace) + return; + +for (i = 0; iars[i][0] != 0 && i < MAX_IARS; i++) { + if (iars[i][0] == iar) { + iars[i][1]++; + i = MAX_IARS; + break; + } +} + +if (i < MAX_IARS) { + iars[i][0] = iar; + iars[i][1] = 1; +} +} +#endif + extern ulong ppc_do_softirq(ulong orig_msr); extern void do_timer(struct cpu_user_regs *regs); extern void do_dec(struct cpu_user_regs *regs); @@ -41,6 +75,51 @@ void do_timer(struct cpu_user_regs *regs /* Set HDEC high so it stops firing and can be reprogrammed by * set_preempt() */ mthdec(INT_MAX); + +#ifdef TRACE_DOMAINS +if (smp_processor_id() == cpu_to_trace) { + int i; + long iar = regs->pc; + + for (i = 0; iars[i][0] != 0 && i < MAX_IARS; i++) { + if (iars[i][0] == iar) { + iars[i][1]++; + i = MAX_IARS; + break; + } + } + + if (i < MAX_IARS) { + iars[i][0] = iar; + iars[i][1] = 1; + } +} + +extern const char *symbols_lookup(unsigned long addr, + unsigned long *symbolsize, + unsigned long *offset, + char *namebuf); + +if (smp_processor_id() == 0) { + int i; + long now = mftb(); + long dump_interval = 3 * timebase_freq; + + if (now > last_dump_time + dump_interval) { + last_dump_time = now; + + for (i = 0; iars[i][0] != 0 && i < MAX_IARS; i++) { + char buff[128]; + + if (symbols_lookup(iars[i][0], NULL, NULL, buff)) + printk("%4d %22s: %ld\n", i, buff, iars[i][1]); + else + printk("%4d %22lx: %ld\n", i, iars[i][0], iars[i][1]); + } + } +} +#endif + raise_softirq(TIMER_SOFTIRQ); } diff -r c94df1e4e62c xen/arch/powerpc/external.c --- a/xen/arch/powerpc/external.c Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/arch/powerpc/external.c Thu Sep 14 18:33:35 2006 -0400 @@ -80,6 +80,26 @@ void do_external(struct cpu_user_regs *r BUG_ON(!(regs->msr & MSR_EE)); BUG_ON(mfmsr() & MSR_EE); +#ifdef TRACE_DOMAINS +if (smp_processor_id() == cpu_to_trace) { + int i; + long iar = regs->pc; + + for (i = 0; iars[i][0] != 0 && i < MAX_IARS; i++) { + if (iars[i][0] == iar) { + iars[i][1]++; + i = MAX_IARS; + break; + } + } + + if (i < MAX_IARS) { + iars[i][0] = iar; + iars[i][1] = 1; + } +} +#endif + vec = xen_mpic_get_irq(regs); if (vec != -1) { diff -r c94df1e4e62c xen/arch/powerpc/hcalls.c --- a/xen/arch/powerpc/hcalls.c Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/arch/powerpc/hcalls.c Thu Sep 14 18:33:35 2006 -0400 @@ -96,6 +96,26 @@ void do_hcall(struct cpu_user_regs *regs { ulong num = regs->gprs[3]; +#ifdef TRACE_DOMAINS +if (smp_processor_id() == cpu_to_trace) { + int i; + long iar = regs->pc; + + for (i = 0; iars[i][0] != 0 && i < MAX_IARS; i++) { + if (iars[i][0] == iar) { + iars[i][1]++; + i = MAX_IARS; + break; + } + } + + if (i < MAX_IARS) { + iars[i][0] = iar; + iars[i][1] = 1; + } +} +#endif + local_irq_enable(); if ((num & XEN_MARK(0)) == XEN_MARK(0)) { diff -r c94df1e4e62c xen/include/asm-powerpc/config.h --- a/xen/include/asm-powerpc/config.h Thu Sep 14 15:43:38 2006 -0500 +++ b/xen/include/asm-powerpc/config.h Thu Sep 14 18:33:35 2006 -0400 @@ -38,6 +38,17 @@ extern char _end[]; extern char _end[]; extern char _etext[]; extern char __bss_start[]; + +#define TRACE_DOMAINS +#ifdef TRACE_DOMAINS +#define MAX_IARS 1000 +extern long iars[MAX_IARS][2]; +extern long last_dump_time; +ext
[XenPPC] Assertion 'entry->next->prev == entry' failed
With current linux.hg and xen.hg, I am getting this consistently when creating my third domU: (XEN) Domain[2].0: initializing (XEN) Assertion 'entry->next->prev == entry' failed, line 92, file xen/include/xen/list.h (XEN) BUG at xen/include/xen/list.h:92 ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] DomU panic when accessing ramdisk
On Thu, 2006-09-14 at 17:52 -0400, poff wrote: > > I haven't seen this. Could you describe your platform (including memory, > > steps to reproduce, bug frequency), and attach your xm config file and > > boot log to a bug report please? > > http://bugzilla.xensource.com/bugzilla/, and assign to me. > > Submitted, please let me know if need additional info Thanks Dan. In the future, it would be easier to read the report if you supplied the config file and boot log as attachments (click that "Create a New Attachment" link). I'm not looking at this at the moment, so if anyone else wants to step up, you're welcome: http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=768 -- 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] DomU panic when accessing ramdisk
> I haven't seen this. Could you describe your platform (including memory, > steps to reproduce, bug frequency), and attach your xm config file and > boot log to a bug report please? > http://bugzilla.xensource.com/bugzilla/, and assign to me. Submitted, please let me know if need additional info ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] DomU panic when accessing ramdisk
On Thu, 2006-09-14 at 15:22 -0400, poff wrote: > Following the wiki for creating a domain, and using ramdisk.image.gz from > Amos, > usually get the following panic... DomU is then repeatedly restarted, see xm > list > also console output at end. > > One time I got the 'Bad page state in process 'swapper''... as described in > wiki. > However, the 'Bad page' dump kept repeating and after a couple pages, the > system > froze. ... > RAMDISK: Compressed image found at block 0 > Unable to handle kernel paging request for data at address 0x00200200 > Faulting instruction address: 0xc007de34 > Oops: Kernel access of bad area, sig: 11 [#1] > SMP NR_CPUS=32 > NIP: C007DE34 LR: C007E810 CTR: C0217B9C > REGS: c07fa9e0 TRAP: 0300 Tainted: GB (2.6.17-Xen) > MSR: 80001032 CR: 24422524 XER: 6005 > DAR: 00200200, DSISR: 4200 > TASK = c07f67e0[1] 'swapper' THREAD: c07f8000 CPU: 0 > GPR00: 000C C07FAC60 C0658050 C074 > GPR04: 000B C0540A10 00100100 C0540A10 > GPR08: 00100100 C0740028 00200200 > GPR12: 00200200 C0533200 > GPR16: 0001 00020030 0044 > GPR20: 0001 C0544480 > GPR24: 0001 0003 80009032 0002 > GPR28: 0001 0001 C053F880 > NIP [C007DE34] .__rmqueue+0x9c/0x180 > LR [C007E810] .get_page_from_freelist+0x4f4/0x564 > Call Trace: > [C07FAC60] [C07FAD00] 0xc07fad00 (unreliable) > [C07FAD60] [C007E90C] .__alloc_pages+0x8c/0x338 > [C07FAE50] [C007AA00] .generic_file_buffered_write+0x184/0x864 > [C07FAFF0] [C007B6F0] > .__generic_file_aio_write_nolock+0x2b8/0x484 > [C07FB120] [C007BD68] .generic_file_aio_write_nolock+0x30/0xd4 > [C07FB1B0] [C007BE90] .generic_file_write_nolock+0x84/0xd0 > [C07FB310] [C00B3E10] .blkdev_file_write+0x20/0x34 > [C07FB3A0] [C00A6D84] .vfs_write+0xc4/0x1ec > [C07FB430] [C00A6F88] .sys_write+0x4c/0x90 > [C07FB4D0] [C04EDA80] .flush_window+0x40/0x120 > [C07FB560] [C04EE294] .inflate_codes+0x630/0x65c > [C07FB670] [C04EECA4] .inflate_dynamic+0x820/0x84c > [C07FBC80] [C04EFFBC] .rd_load_image+0x12e8/0x1300 > [C07FBDA0] [C04F0224] .initrd_load+0x58/0x3b8 > [C07FBE30] [C04ED214] .prepare_namespace+0xc0/0x18c > [C07FBEC0] [C00095B0] .init+0x3ec/0x438 > [C07FBF90] [C0025BDC] .kernel_thread+0x4c/0x68 > Instruction dump: > 3860 eb81ffe0 eba1ffe8 ebc1fff0 ebe1fff8 4e800020 e92a e96a0008 > 7c8407b4 386affd8 7ca72b78 7f84f800 f9690008 7f892030 e80affd8 > <0>Kernel panic - not syncing: Attempted to kill init! > <0>Rebooting in 180 seconds..lab082:~ # I haven't seen this. Could you describe your platform (including memory, steps to reproduce, bug frequency), and attach your xm config file and boot log to a bug report please? http://bugzilla.xensource.com/bugzilla/, and assign to me. Thanks! -- 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] [XEND][POWERPC] fix tabs that snuck in
# HG changeset patch # User [EMAIL PROTECTED] # Node ID c94df1e4e62c7ab04faf05c8c5586f050f6513fd # Parent 14e7c2948115b2f7ba82e37df571447c0428b8e5 [XEND][POWERPC] fix tabs that snuck in Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- tools/python/xen/xend/FlatDeviceTree.py | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff -r 14e7c2948115 -r c94df1e4e62c tools/python/xen/xend/FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Thu Sep 14 14:53:32 2006 -0500 +++ b/tools/python/xen/xend/FlatDeviceTree.py Thu Sep 14 15:43:38 2006 -0500 @@ -299,11 +299,11 @@ def build(imghandler): rma.addprop('device_type', 'memory\0') # all the rest in a single node - remaining = totalmem - rma_bytes - if remaining > 0: - mem = root.addnode('[EMAIL PROTECTED]') - mem.addprop('reg', 0, rma_bytes, 0, remaining) - mem.addprop('device_type', 'memory\0') +remaining = totalmem - rma_bytes +if remaining > 0: +mem = root.addnode('[EMAIL PROTECTED]') +mem.addprop('reg', 0, rma_bytes, 0, remaining) +mem.addprop('device_type', 'memory\0') # add CPU nodes cpus = root.addnode('cpus') ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] xm-test
Tony expressed interest xm-test.. I was in a really looong boring meeting so figured I just try it. anyway.. started a wiki page to at least list the packges I needed to get it started. http://wiki.xensource.com/xenwiki/XenPPC/Run/XM-Test tools/xm-test/README tells you what you need to do, I get as far as make breaking on a wget. -JX ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [XEN][POWERPC] support non-RMA memory in domU
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 14e7c2948115b2f7ba82e37df571447c0428b8e5 # Parent 3d60bf30dff21fec2fdc8a931c725c23508cb94c [XEN][POWERPC] support non-RMA memory in domU - domU device tree now gets two /memory nodes; the first is the RMA - the tools now call increase_reservation() in 16MB increments (hardcoded) - memory is stored in a linked list of 16MB extents, which will definitely need replacing in the future Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- tools/libxc/powerpc64/xc_linux_build.c | 30 -- tools/python/xen/xend/FlatDeviceTree.py | 24 ++-- tools/python/xen/xend/XendDomainInfo.py | 19 --- xen/arch/powerpc/mm.c | 27 +++ xen/arch/powerpc/ofd_fixup_memory.c |4 +++- xen/arch/powerpc/shadow.c |3 --- xen/common/memory.c |3 +++ xen/include/asm-ia64/mm.h |6 ++ xen/include/asm-powerpc/mm.h|4 +++- xen/include/asm-x86/mm.h|6 ++ 10 files changed, 94 insertions(+), 32 deletions(-) diff -r 3d60bf30dff2 -r 14e7c2948115 tools/libxc/powerpc64/xc_linux_build.c --- a/tools/libxc/powerpc64/xc_linux_build.cThu Sep 14 14:20:48 2006 -0400 +++ b/tools/libxc/powerpc64/xc_linux_build.cThu Sep 14 14:53:32 2006 -0500 @@ -334,22 +334,39 @@ out: return rc; } -static unsigned long create_start_info(start_info_t *si, +static unsigned long create_start_info(void *devtree, start_info_t *si, unsigned int console_evtchn, unsigned int store_evtchn, unsigned long nr_pages) { +void *rma; unsigned long si_addr; +uint64_t rma_reg[2]; +uint64_t rma_top; +int rc; memset(si, 0, sizeof(*si)); snprintf(si->magic, sizeof(si->magic), "xen-%d.%d-powerpc64HV", 3, 0); +rma = ft_find_node(devtree, "/[EMAIL PROTECTED]"); +if (rma == NULL) { +DPRINTF("couldn't find /[EMAIL PROTECTED]"); +return ~0UL; +} +rc = ft_get_prop(devtree, rma, "reg", rma_reg, sizeof(rma_reg)); +if (rc < 0) { +DPRINTF("couldn't get /[EMAIL PROTECTED]/reg\n"); +return ~0UL; +} +rma_top = rma_reg[0] + rma_reg[1]; +DPRINTF("RMA top = 0x%"PRIX64"\n", rma_top); + si->nr_pages = nr_pages; -si->shared_info = (nr_pages - 1) << PAGE_SHIFT; -si->store_mfn = si->nr_pages - 2; +si->shared_info = rma_top - PAGE_SIZE; +si->store_mfn = (rma_top >> PAGE_SHIFT) - 2; si->store_evtchn = store_evtchn; -si->console.domU.mfn = si->nr_pages - 3; +si->console.domU.mfn = (rma_top >> PAGE_SHIFT) - 3; si->console.domU.evtchn = console_evtchn; -si_addr = (si->nr_pages - 4) << PAGE_SHIFT; +si_addr = rma_top - 4*PAGE_SIZE; return si_addr; } @@ -434,7 +451,8 @@ int xc_linux_build(int xc_handle, } /* start_info stuff: about to be removed */ -si_addr = create_start_info(&si, console_evtchn, store_evtchn, nr_pages); +si_addr = create_start_info(devtree, &si, console_evtchn, store_evtchn, +nr_pages); *console_mfn = page_array[si.console.domU.mfn]; *store_mfn = page_array[si.store_mfn]; if (install_image(xc_handle, domid, page_array, &si, si_addr, diff -r 3d60bf30dff2 -r 14e7c2948115 tools/python/xen/xend/FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Thu Sep 14 14:20:48 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Thu Sep 14 14:53:32 2006 -0500 @@ -288,12 +288,24 @@ def build(imghandler): xencons = xen.addnode('console') xencons.addprop('interrupts', 1, 0) -# XXX split out RMA node -mem = root.addnode('[EMAIL PROTECTED]') +# add memory nodes totalmem = imghandler.vm.getMemoryTarget() * 1024 -mem.addprop('reg', 0, 0, 0, totalmem) -mem.addprop('device_type', 'memory\0') - +rma_log = imghandler.vm.info.get('rma_log') +rma_bytes = 1 << rma_log + +# RMA node +rma = root.addnode('[EMAIL PROTECTED]') +rma.addprop('reg', 0, 0, 0, rma_bytes) +rma.addprop('device_type', 'memory\0') + +# all the rest in a single node + remaining = totalmem - rma_bytes + if remaining > 0: + mem = root.addnode('[EMAIL PROTECTED]') + mem.addprop('reg', 0, rma_bytes, 0, remaining) + mem.addprop('device_type', 'memory\0') + +# add CPU nodes cpus = root.addnode('cpus') cpus.addprop('smp-enabled') cpus.addprop('#size-cells', 0) @@ -323,7 +335,7 @@ def build(imghandler): chosen = root.addnode('chosen') chosen.addprop('cpu', cpu0.get_phandle()) -chosen.addprop('memory', mem.get_phandle()) +chosen.addprop('memory', rma.get_phandle()) chosen.addprop('linux,stdout-path', '/xen/console\0') chosen.addprop('interrupt-controller', xen.get_phandle()) chosen.addprop('bootargs', imghandler.cmdline + '\0') diff -r 3d60bf30dff2 -r 1
Re: [XenPPC] 128 meg domU???
On Fri, 2006-09-01 at 14:07 -0500, Hollis Blanchard wrote: > > It sounds like Jimi wants to convince me that our domain memory > allocation path (i.e. increase_reservation) should be different from > everybody else's. Right now he's tracking non-RMA memory (for dom0 only) > in large-page-sized "extents", which is the list_for_each_entry() loop > you see in pfn2mfn(). If domU allocation populated domain.arch.pe_list, > I think pfn2mfn() would work. However, the normal memory allocation path > (that xend uses) doesn't populate this list, and instead populates > domain.page_list. Update: I've just checked in code that adds to the PPC-specific extent list. The net is that I've booted a domU with 224 MB of memory (64MB RMA size). Just put "memory = whatever" into your xm config file. Jimi claims that x86 superpage people (i.e. Steve Hand) are going to come up with some superpage solution, and when they do, anything we have done will just be discarded. Accordingly, we have a hack. This particular hack has very poor implications for ballooning (i.e. decrease_reservation()). If we need ballooning before superpages are solved, we'll likely have to revisit this. Also, performance will *suck*. Finally, my Maple only has 512 MB of memory, and 256MB of that goes to Xen and dom0. Anybody with a big JS2x want to test with very large memory sizes? -- 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] JS20 hangs while 'Quiescing Open Firmware ...'
>> SOL is broken on the 'older model' bladecenters - this has nothing >> to do with Xen, >> ie SOL does not work at all, Xen or not. >> >> When I place the blade in a newer bladecenter, SOL works ok. > sorry to keep beating on this, but is this some early access > bladecenter, you have a model number so we can place it on the wiki? > -JX Just talked with Bulent Abali: Abali claims the SOL problem is due to some misconfiguration of these two bladecenters, not because they are older models... A few weeks ago he upgraded the bladecenter firmware, but SOL remained broken. ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] DomU panic when accessing ramdisk
Following the wiki for creating a domain, and using ramdisk.image.gz from Amos, usually get the following panic... DomU is then repeatedly restarted, see xm list also console output at end. One time I got the 'Bad page state in process 'swapper''... as described in wiki. However, the 'Bad page' dump kept repeating and after a couple pages, the system froze. lab082:~ # xm create -c dom1 Using config file "/etc/xen/dom1". /usr/lib/python2.4/xmllib.py:9: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead. warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) Started domain S-1160846930.28 xen_start_info at c3ffc000 magic xen-3.0-powerpc64HV flags 0 shared_info3fff000, c3fff000 store_mfn 3ffe store_evtchn 1 console_mfn3ffd console_evtchn 2 Hello World I'm Maple Xen-LPAR! <- xen_init_early Starting Linux PPC64 #1 SMP Wed Sep 6 16:23:48 EDT 2006 - ppc64_pft_size= 0x14 ppc64_interrupt_controller= 0x1 physicalMemorySize= 0x400 ppc64_caches.dcache_line_size = 0x80 ppc64_caches.icache_line_size = 0x80 htab_address = 0x htab_hash_mask= 0x1fff - Linux version 2.6.17-Xen ([EMAIL PROTECTED]) (gcc version 3.4.1) #1 SMP Wed Sep 6 16:23:48 EDT 2006 *** : CF12 *** : Setup Arch [boot]0012 Setup Arch Using Xen idle loop *** : CF15 *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 16384 Kernel command line: xencons=tty128 console=tty128 PID hash table entries: 512 (order: 9, 4096 bytes) firmware_features = 0x4a Using Xen-Maple machine description Found initrd at 0xc180:0xc1b11532 Starting Linux PPC64 #1 SMP Wed Sep 6 16:23:48 EDT 2006 - ppc64_pft_size= 0x14 ppc64_interrupt_controller= 0x1 physicalMemorySize= 0x400 ppc64_caches.dcache_line_size = 0x80 ppc64_caches.icache_line_size = 0x80 htab_address = 0x htab_hash_mask= 0x1fff - Linux version 2.6.17-Xen ([EMAIL PROTECTED]) (gcc version 3.4.1) #1 SMP Wed Sep 6 16:23:48 EDT 2006 *** : CF12 *** : Setup Arch [boot]0012 Setup Arch Using Xen idle loop *** : CF15 *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 16384 Kernel command line: xencons=tty128 console=tty128 PID hash table entries: 512 (order: 9, 4096 bytes) Console: colour dummy device 80x25 Dentry cache hash table entries: 8192 (order: 4, 65536 bytes) Inode-cache hash table entries: 4096 (order: 3, 32768 bytes) Memory: 57324k/65536k available (5276k kernel code, 8144k reserved, 1212k data, 456k bss, 236k init) Mount-cache hash table entries: 256 Brought up 1 CPUs smp_xen_setup_cpu(0) migration_cost=0 checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 3141k freed Bad page state in process 'swapper' page:c074 flags:0x1008 mapping: mapcount:0 count:0 Trying to fix it up, but a reboot is needed Backtrace: Call Trace: [C07FBB90] [C000F2BC] .show_stack+0x50/0x1cc (unreliable) [C07FBC40] [C007D770] .bad_page+0x70/0xc8 [C07FBCD0] [C007E0BC] .free_hot_cold_page+0x1a4/0x1a8 [C07FBD70] [C002EE24] .free_initrd_mem+0x138/0x180 [C07FBE20] [C04F35CC] .free_initrd+0x74/0x13c [C07FBEC0] [C0009320] .init+0x15c/0x438 [C07FBF90] [C0025BDC] .kernel_thread+0x4c/0x68 grant table at c0474000 Grant table initialized NET: Registered protocol family 16 *** : Linux ppc64 *** : 2.6.17-Xen SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub NET: Registered protocol family 2 IP route cache hash table entries: 512 (order: 0, 4096 bytes) TCP established hash table entries: 2048 (order: 3, 32768 bytes) TCP bind hash table entries: 1024 (order: 2, 16384 bytes) TCP: Hash tables configured (established 2048 bind 1024) TCP reno registered rtas_flash: no firmware flash support scan-log-dump not implemented on this system Initializing Cryptographic API io scheduler noop registered io scheduler deadline registered (default) Generic RTC Driver v1.07 RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize loop: loaded (max 8 devices) Intel(R) PRO/1000 Network Driver - version 7.0.38-k4 Copyright (c) 1999-2006 Intel Corporation. Xen virtual console successfully installed as tty128 Event-channel device installed. blkif_init: reqs=64, pages=704, mmap_vstart=0xc300 netfront: Initialising virtual ethernet driver. Uniform Multi-Platfo
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Clean up init_frame_table()
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 3d60bf30dff21fec2fdc8a931c725c23508cb94c # Parent 1eed6129bd9a15d3bf58f9cc88ed2535506c11e2 [POWERPC][XEN] Clean up init_frame_table() figure out its size correctly and remove unused global Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- xen/arch/powerpc/mm.c| 18 ++ xen/include/asm-powerpc/mm.h |2 -- 2 files changed, 10 insertions(+), 10 deletions(-) diff -r 1eed6129bd9a -r 3d60bf30dff2 xen/arch/powerpc/mm.c --- a/xen/arch/powerpc/mm.c Thu Sep 14 12:31:52 2006 -0500 +++ b/xen/arch/powerpc/mm.c Thu Sep 14 14:20:48 2006 -0400 @@ -39,7 +39,6 @@ /* Frame table and its size in pages. */ struct page_info *frame_table; -unsigned long frame_table_size; unsigned long max_page; unsigned long total_pages; @@ -190,17 +189,20 @@ void __init init_frametable(void) void __init init_frametable(void) { unsigned long p; - -frame_table_size = PFN_UP(max_page * sizeof(struct page_info)); - -p = alloc_boot_pages(min(frame_table_size, 4UL << 20), 1); +unsigned long nr_pages; +int i; + +nr_pages = PFN_UP(max_page * sizeof(struct page_info)); +nr_pages = min(nr_pages, (4UL << (20 - PAGE_SHIFT))); + + +p = alloc_boot_pages(nr_pages, 1); if (p == 0) panic("Not enough memory for frame table\n"); frame_table = (struct page_info *)(p << PAGE_SHIFT); -frame_table_size = (frame_table_size + PAGE_SIZE - 1) & PAGE_MASK; - -memset(frame_table, 0, frame_table_size); +for (i = 0; i < nr_pages; i += 1) +clear_page((void *)((p + i) << PAGE_SHIFT)); } long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg) diff -r 1eed6129bd9a -r 3d60bf30dff2 xen/include/asm-powerpc/mm.h --- a/xen/include/asm-powerpc/mm.h Thu Sep 14 12:31:52 2006 -0500 +++ b/xen/include/asm-powerpc/mm.h Thu Sep 14 14:20:48 2006 -0400 @@ -229,8 +229,6 @@ extern vm_assist_info_t vm_assist_info[] #define share_xen_page_with_guest(p, d, r) do { } while (0) #define share_xen_page_with_privileged_guests(p, r) do { } while (0) -extern unsigned long frame_table_size; - /* hope that accesses to this will fail spectacularly */ #define machine_to_phys_mapping ((u32 *)-1UL) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [XEN][POWERPC] Better whitespace fix.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 1eed6129bd9a15d3bf58f9cc88ed2535506c11e2 # Parent 4fd80d78e227877b5319b09e6befe54e0c6906c9 [XEN][POWERPC] Better whitespace fix. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/include/asm-powerpc/page.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -r 4fd80d78e227 -r 1eed6129bd9a xen/include/asm-powerpc/page.h --- a/xen/include/asm-powerpc/page.hThu Sep 14 12:27:01 2006 -0500 +++ b/xen/include/asm-powerpc/page.hThu Sep 14 12:31:52 2006 -0500 @@ -79,9 +79,9 @@ static __inline__ void clear_page(void * lines = cpu_caches.dlines_per_page; __asm__ __volatile__( -"mtctr %1 # clear_page\n\ -1: dcbz0,%0\n\ -add %0,%0,%3\n\ +"mtctr %1 # clear_page\n\ +1: dcbz0,%0\n\ +add %0,%0,%3\n\ bdnz+ 1b" : "=r" (addr) : "r" (lines), "0" (addr), "r" (line_size) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [XEN][POWERPC] Whitespace.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID 4fd80d78e227877b5319b09e6befe54e0c6906c9 # Parent daa613b3f42362ff97e6712f5318a0bd0a6e1291 [XEN][POWERPC] Whitespace. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/arch/powerpc/powerpc64/ppc970.c |8 xen/include/asm-powerpc/cache.h | 16 xen/include/asm-powerpc/page.h | 20 ++-- 3 files changed, 22 insertions(+), 22 deletions(-) diff -r daa613b3f423 -r 4fd80d78e227 xen/arch/powerpc/powerpc64/ppc970.c --- a/xen/arch/powerpc/powerpc64/ppc970.c Thu Sep 14 11:13:54 2006 -0500 +++ b/xen/arch/powerpc/powerpc64/ppc970.c Thu Sep 14 12:27:01 2006 -0500 @@ -35,11 +35,11 @@ #undef SERIALIZE struct cpu_caches cpu_caches = { - .dline_size = 0x80, - .log_dline_size = 7, +.dline_size = 0x80, +.log_dline_size = 7, .dlines_per_page = PAGE_SIZE >> 7, - .iline_size = 0x80, - .log_iline_size = 7, +.iline_size = 0x80, +.log_iline_size = 7, .ilines_per_page = PAGE_SIZE >> 7, }; diff -r daa613b3f423 -r 4fd80d78e227 xen/include/asm-powerpc/cache.h --- a/xen/include/asm-powerpc/cache.h Thu Sep 14 11:13:54 2006 -0500 +++ b/xen/include/asm-powerpc/cache.h Thu Sep 14 12:27:01 2006 -0500 @@ -60,14 +60,14 @@ static __inline__ void synchronize_cache #define __read_mostly struct cpu_caches { - u32 dsize; /* L1 d-cache size */ - u32 dline_size; /* L1 d-cache line size */ - u32 log_dline_size; - u32 dlines_per_page; - u32 isize; /* L1 i-cache size */ - u32 iline_size; /* L1 i-cache line size */ - u32 log_iline_size; - u32 ilines_per_page; +u32 dsize; /* L1 d-cache size */ +u32 dline_size; /* L1 d-cache line size */ +u32 log_dline_size; +u32 dlines_per_page; +u32 isize; /* L1 i-cache size */ +u32 iline_size; /* L1 i-cache line size */ +u32 log_iline_size; +u32 ilines_per_page; }; extern struct cpu_caches cpu_caches; #endif diff -r daa613b3f423 -r 4fd80d78e227 xen/include/asm-powerpc/page.h --- a/xen/include/asm-powerpc/page.hThu Sep 14 11:13:54 2006 -0500 +++ b/xen/include/asm-powerpc/page.hThu Sep 14 12:27:01 2006 -0500 @@ -73,19 +73,19 @@ typedef struct { unsigned long l1_lo; } static __inline__ void clear_page(void *addr) { - unsigned long lines, line_size; +unsigned long lines, line_size; - line_size = cpu_caches.dline_size; - lines = cpu_caches.dlines_per_page; +line_size = cpu_caches.dline_size; +lines = cpu_caches.dlines_per_page; - __asm__ __volatile__( - "mtctr %1 # clear_page\n\ -1: dcbz 0,%0\n\ - add %0,%0,%3\n\ - bdnz+ 1b" +__asm__ __volatile__( +"mtctr %1 # clear_page\n\ +1: dcbz0,%0\n\ +add %0,%0,%3\n\ +bdnz+ 1b" : "=r" (addr) : "r" (lines), "0" (addr), "r" (line_size) - : "ctr", "memory"); +: "ctr", "memory"); } extern void copy_page(void *dp, void *sp); @@ -147,7 +147,7 @@ extern unsigned long paddr_to_maddr(unsi static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) { - return pfn2mfn(d, gmfn, NULL); +return pfn2mfn(d, gmfn, NULL); } #define mfn_to_gmfn(_d, mfn) (mfn) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [XEN][POWERPC] Fix build break.
# HG changeset patch # User Hollis Blanchard <[EMAIL PROTECTED]> # Node ID daa613b3f42362ff97e6712f5318a0bd0a6e1291 # Parent a1beb7b142226b2d00af68806e02cba6100e6aa3 [XEN][POWERPC] Fix build break. Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> --- xen/arch/powerpc/of-devtree.h |1 + 1 files changed, 1 insertion(+) diff -r a1beb7b14222 -r daa613b3f423 xen/arch/powerpc/of-devtree.h --- a/xen/arch/powerpc/of-devtree.h Thu Sep 14 11:11:00 2006 -0400 +++ b/xen/arch/powerpc/of-devtree.h Thu Sep 14 11:13:54 2006 -0500 @@ -22,6 +22,7 @@ #define _OF_DEVTREE_H #include +#include #include enum { ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][XEN] break out the ppc970.c functionality
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 164572d15e60079b8fe93b0f675312f5553c7163 # Parent 25442712f4cb2de72b1dd9dbdb471942c84ceca3 [POWERPC][XEN] break out the ppc970.c functionality getting way to crowded in there. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- xen/arch/powerpc/powerpc64/Makefile |3 xen/arch/powerpc/powerpc64/ppc970.c | 88 - xen/arch/powerpc/powerpc64/ppc970_machinecheck.c | 116 +++ xen/arch/powerpc/powerpc64/ppc970_scom.c | 116 +++ xen/include/asm-powerpc/powerpc64/ppc970-hid.h | 98 --- xen/include/asm-powerpc/processor.h |1 6 files changed, 237 insertions(+), 185 deletions(-) diff -r 25442712f4cb -r 164572d15e60 xen/arch/powerpc/powerpc64/Makefile --- a/xen/arch/powerpc/powerpc64/Makefile Thu Sep 14 10:17:23 2006 -0400 +++ b/xen/arch/powerpc/powerpc64/Makefile Thu Sep 14 10:20:16 2006 -0400 @@ -6,6 +6,9 @@ obj-y += io.o obj-y += io.o obj-y += memcpy.o obj-y += ppc970.o +obj-y += ppc970_machinecheck.o +obj-y += ppc970_scom.o obj-y += prom_call.o obj-y += string.o obj-y += traps.o + diff -r 25442712f4cb -r 164572d15e60 xen/arch/powerpc/powerpc64/ppc970.c --- a/xen/arch/powerpc/powerpc64/ppc970.c Thu Sep 14 10:17:23 2006 -0400 +++ b/xen/arch/powerpc/powerpc64/ppc970.c Thu Sep 14 10:20:16 2006 -0400 @@ -112,19 +112,6 @@ int cpu_io_mfn(ulong mfn) return 0; } -#ifdef DEBUG -static void scom_init(void) -{ -write_scom(SCOM_AMCS_AND_MASK, 0); - -printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE)); -write_scom(SCOM_CMCE, ~0UL); -printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE)); -} -#else -#define scom_init() -#endif - static u64 cpu0_hids[6]; static u64 cpu0_hior; @@ -243,7 +230,7 @@ void cpu_initialize(int cpuid) "to be larger that NR_CPUS(%u)\n", mfpir(), NR_CPUS); -scom_init(); +cpu_scom_init(); /* initialize the SLB */ #ifdef DEBUG @@ -287,76 +274,3 @@ void load_cpu_sprs(struct vcpu *v) { mthid4(v->arch.cpu.hid4.word); } - -int cpu_machinecheck(struct cpu_user_regs *regs) -{ -int recover = 0; -u32 dsisr = mfdsisr(); - -if (regs->msr & MCK_SRR1_RI) -recover = 1; - -printk("MACHINE CHECK: %s Recoverable\n", recover ? "IS": "NOT"); -if (mck_cpu_stats[mfpir()] != 0) -printk("While in CI IO\n"); - -printk("SRR1: 0x%016lx\n", regs->msr); -if (regs->msr & MCK_SRR1_INSN_FETCH_UNIT) -printk("42: Exception caused by Instruction Fetch Unit (IFU) " - "detection of a hardware uncorrectable error (UE).\n"); - -if (regs->msr & MCK_SRR1_LOAD_STORE) -printk("43: Exception caused by load/store detection of error " - "(see DSISR)\n"); - -switch (regs->msr & MCK_SRR1_CAUSE_MASK) { -case MCK_SRR1_CAUSE_SLB_PAR: -printk("0b01: Exception caused by an SLB parity error detected " - "while translating an instruction fetch address.\n"); -break; -case MCK_SRR1_CAUSE_TLB_PAR: -printk("0b10: Exception caused by a TLB parity error detected " - "while translating an instruction fetch address.\n"); -break; -case MCK_SRR1_CAUSE_UE: -printk("0b11: Exception caused by a hardware uncorrectable " - "error (UE) detected while doing a reload of an " - "instruction-fetch TLB tablewalk.\n"); -break; -default: -break; -} - -printk("\nDSIDR: 0x%08x\n", dsisr); -if (dsisr & MCK_DSISR_UE) -printk("16: Exception caused by a UE deferred error " - "(DAR is undefined).\n"); - -if (dsisr & MCK_DSISR_UE_TABLE_WALK) -printk("17: Exception caused by a UE deferred error " - "during a tablewalk (D-side).\n"); - -if (dsisr & MCK_DSISR_L1_DCACHE_PAR) -printk("18: Exception was caused by a software recoverable " - "parity error in the L1 D-cache.\n"); - -if (dsisr & MCK_DSISR_L1_DCACHE_TAG_PAR) -printk("19: Exception was caused by a software recoverable " - "parity error in the L1 D-cache tag.\n"); - -if (dsisr & MCK_DSISR_D_ERAT_PAR) -printk("20: Exception was caused by a software recoverable parity " - "error in the D-ERAT.\n"); - -if (dsisr & MCK_DSISR_TLB_PAR) -printk("21: Exception was caused by a software recoverable parity " - "error in the TLB.\n"); - -if (dsisr & MCK_DSISR_SLB_PAR) -printk("23: Exception was caused by an SLB parity error (may not be " - "recoverable). This condition could occur if the " - "effective segment ID (ESID) fields of two or more SLB " - "entries contain the same value."); - -return 0; /* for now lets not recover; */ -} diff -r 25442712f4cb -r 164572d15e60 xen/in
[XenPPC] [xenppc-unstable] [POWERPC][XEN] Better explane the larx/stcx issue with interrupts
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 25442712f4cb2de72b1dd9dbdb471942c84ceca3 # Parent 1d50658481071d73564b4d722e3d3199104c481a [POWERPC][XEN] Better explane the larx/stcx issue with interrupts Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- xen/arch/powerpc/powerpc64/exceptions.S |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) diff -r 1d5065848107 -r 25442712f4cb xen/arch/powerpc/powerpc64/exceptions.S --- a/xen/arch/powerpc/powerpc64/exceptions.S Thu Sep 14 01:41:13 2006 -0400 +++ b/xen/arch/powerpc/powerpc64/exceptions.S Thu Sep 14 10:17:23 2006 -0400 @@ -118,7 +118,11 @@ 1: mfspr r0, SPRN_HSPRG1 std r0, UREGS_r13(r1) /* save R13 from HSPRG1 */ -/* Blow away any reservation according to 970 errata after saving CR */ +/* Only _one_ larx is allowed at a time. Any future use will be + * rejected until the earlier one (if any) completes. Since we + * may have interrupted a larx in the Domain, or Xen we need to + * clear any larx that may currently exist. We could probably + * skip which for hcalls */ ldx r0, 0, r1 stdcx. r0, 0, r1 ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [xenppc-unstable] [POWERPC][XEN] add ofd_strstr() that checks all strings from an OF property
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID a1beb7b142226b2d00af68806e02cba6100e6aa3 # Parent 164572d15e60079b8fe93b0f675312f5553c7163 [POWERPC][XEN] add ofd_strstr() that checks all strings from an OF property Some OF properties can have a list of '\0' terminated strings, we frequently need to strstr against all of them. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- xen/arch/powerpc/dart.c | 17 + xen/arch/powerpc/of-devtree.h | 16 2 files changed, 25 insertions(+), 8 deletions(-) diff -r 164572d15e60 -r a1beb7b14222 xen/arch/powerpc/dart.c --- a/xen/arch/powerpc/dart.c Thu Sep 14 10:20:16 2006 -0400 +++ b/xen/arch/powerpc/dart.c Thu Sep 14 11:11:00 2006 -0400 @@ -207,16 +207,17 @@ static int find_dart(struct dart_info *d if (rc <= 0) return -1; +if (ofd_strstr(compat, rc, "u4")) +di->di_model = DART_U4; +else if (ofd_strstr(compat, rc, "u3")) +di->di_model = DART_U3; +else { +DBG("%s: not a U3 or U4\n", __func__); +return -1; +} + di->di_base = DART_DEF_BASE; -if (strstr(compat, "u3")) { -di->di_model = DART_U3; -} else if (strstr(compat, "u4")) { -di->di_model = DART_U4; -} else { -DBG("%s: not a U3 or U4\n", __func__); -return -1; -} /* FIXME: this should actually be the HT reg value */ di->di_window.dw_liobn = 0; di->di_window.dw_base_hi = 0; diff -r 164572d15e60 -r a1beb7b14222 xen/arch/powerpc/of-devtree.h --- a/xen/arch/powerpc/of-devtree.h Thu Sep 14 10:20:16 2006 -0400 +++ b/xen/arch/powerpc/of-devtree.h Thu Sep 14 11:11:00 2006 -0400 @@ -136,4 +136,20 @@ extern ofdn_t ofd_node_find_prev(void *m extern ofdn_t ofd_node_find_prev(void *mem, ofdn_t n); extern void ofd_init(int (*write)(const char *, size_t len)); +static inline int ofd_strstr(const char *s, int len, const char *str) +{ +int l = strlen(str); +do { +int n; + +if (len >= l && strstr(s, str)) +return 1; + +n = strnlen(s, len) + 1; +len -= strnlen(s, len) + 1; +s += n; +} while (len > 0); +return 0; +} + #endif /* _OF_DEVTREE_H */ ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] JS20 hangs while 'Quiescing Open Firmware ...'
SOL is broken on the 'older model' bladecenters - this has nothing to do with Xen, ie SOL does not work at all, Xen or not. When I place the blade in a newer bladecenter, SOL works ok. There might be a management module firmware update that fixes this for your older bladecenter. Segher ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] JS20 hangs while 'Quiescing Open Firmware ...'
On Sep 14, 2006, at 10:23 AM, poff wrote: SOL is broken on our older model bladecenter. To be clear, this is a problem with _your_specific_ blade center or "older models" if you can use SOL to talk to your linux console without Xen and you cannot _with_ Xen then we need to get to the bottom of that. SOL is broken on the 'older model' bladecenters - this has nothing to do with Xen, ie SOL does not work at all, Xen or not. When I place the blade in a newer bladecenter, SOL works ok. sorry to keep beating on this, but is this some early access bladecenter, you have a model number so we can place it on the wiki? -JX ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] JS20 hangs while 'Quiescing Open Firmware ...'
>> SOL is broken on our older model bladecenter. > To be clear, this is a problem with _your_specific_ blade center or > "older models" > if you can use SOL to talk to your linux console without Xen and you > cannot _with_ Xen then we need to get to the bottom of that. SOL is broken on the 'older model' bladecenters - this has nothing to do with Xen, ie SOL does not work at all, Xen or not. When I place the blade in a newer bladecenter, SOL works ok. ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: Hang on boot Was: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Detect bad spurious interrupt condition and panic instead of hang
Yup Tony, thats it. Beofre actually detecting this panic we uses to just "hang" with the last of the buffered output showing that Linux was processing the dt_* tree (IIRC), now at least the panic flushed out put and shows you why. -JX On Sep 14, 2006, at 3:11 AM, Tony Breeds wrote: On Tue, Sep 12, 2006 at 06:00:17PM +0200, Segher Boessenkool wrote: Sometimes when Xen is booted and we let Linux init the MPIC for "the second time" Xen could end up in a loop where the CPU is constantly being interrupted by the MPIC. Because of console buffering, the last message you see is some message from early kernel boot. Anyway.. we detect this now and you see a panic. There seems to be a problem with the U3/U4 MPIC, where edge- triggered interrupts are delivered to more than one CPU. Every CPU other than the one that ACKed it first, will get the spurious vector (so functionally, the impact of this bug isn't that bad; performance-wise it might be different). The UART IRQ [on JS2x and Maple] is an edge IRQ; if you produce console output for every spurious interrupt, you'll get a nice little storm. Is that what's happening? Yes, I believe, it has something to do with temperature. Interesting observation, never thought of investigating that -- it's in line with my suspicion that something in the MPIC is metastable though. I don't know if this is realted or something else but I just got: --- *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 49152 Kernel command line: root=/dev/hda3 ro sysrq=1 Sharing PIC with Xen -> maple_init_IRQ <6>mpic: Setting up MPIC "U3-MPIC" version 1.2 at f804, max 4 CPUs mpic: ISU size: 124, shift: 7, mask: 7f mpic: Initializing for 124 sources mpic: Setting up HT PICs workarounds for U3/U4 mpic: - HT:01.0 [0xb8] vendor 1022 device 7450 has 4 irqs mpic: - HT:02.0 [0xb8] vendor 1022 device 7450 has 4 irqs mpic: - HT:03.0 [0xf0] vendor 1022 device 7460 has 24 irqs (XEN) (XEN) (XEN) Panic on CPU 0: (XEN) Too many (100) spurrious interrupts in a row (XEN) Known problem, please halt and let machine idle/cool then reboot (XEN) (XEN) (XEN) Reboot in five seconds... --- on my JS20, rebooting cleared the error. Yours Tony linux.conf.au http://linux.conf.au/ || http:// lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: Hang on boot Was: [XenPPC] [xenppc-unstable] [POWERPC][XEN] Detect bad spurious interrupt condition and panic instead of hang
On Tue, Sep 12, 2006 at 06:00:17PM +0200, Segher Boessenkool wrote: > >Sometimes when Xen is booted and we let Linux init the MPIC for > >"the second time" Xen could end up in a loop where the CPU is > >constantly being interrupted by the MPIC. > > > >Because of console buffering, the last message you see is some > >message from early kernel boot. > >Anyway.. we detect this now and you see a panic. > > There seems to be a problem with the U3/U4 MPIC, where edge- > triggered interrupts are delivered to more than one CPU. Every > CPU other than the one that ACKed it first, will get the spurious > vector (so functionally, the impact of this bug isn't that bad; > performance-wise it might be different). > > The UART IRQ [on JS2x and Maple] is an edge IRQ; if you produce > console output for every spurious interrupt, you'll get a nice > little storm. Is that what's happening? > > >Yes, I believe, it has something to do with temperature. > > Interesting observation, never thought of investigating that -- > it's in line with my suspicion that something in the MPIC is > metastable though. I don't know if this is realted or something else but I just got: --- *** : Setup Done [boot]0015 Setup Done Built 1 zonelists. Total pages: 49152 Kernel command line: root=/dev/hda3 ro sysrq=1 Sharing PIC with Xen -> maple_init_IRQ <6>mpic: Setting up MPIC "U3-MPIC" version 1.2 at f804, max 4 CPUs mpic: ISU size: 124, shift: 7, mask: 7f mpic: Initializing for 124 sources mpic: Setting up HT PICs workarounds for U3/U4 mpic: - HT:01.0 [0xb8] vendor 1022 device 7450 has 4 irqs mpic: - HT:02.0 [0xb8] vendor 1022 device 7450 has 4 irqs mpic: - HT:03.0 [0xf0] vendor 1022 device 7460 has 24 irqs (XEN) (XEN) (XEN) Panic on CPU 0: (XEN) Too many (100) spurrious interrupts in a row (XEN) Known problem, please halt and let machine idle/cool then reboot (XEN) (XEN) (XEN) Reboot in five seconds... --- on my JS20, rebooting cleared the error. Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel