Re: [XenPPC] [PATCH] Fix Xen-GDB Stub (smp_sen_stop, E00 on unknown command, remove printk prefix)
On Wed, Apr 18, 2007 at 09:04:08AM +0200, Christian Ehrhardt wrote: [XEN][POWERPC] Fix Xen-GDB Stub (smp_sen_stop, E00 on unknown command, remove printk prefix) - Remove BUG() from smp_stop_all(), common code changes added a call to this - changed to unimplemented(). - remove the printk prefix (XEN) when falling into gdb, because gdb tried to parse the (XEN) response sometimes - return E00 on unknown command (thx to jimi) Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] diff -r 736f2d6d7b09 xen/arch/powerpc/smp.c --- a/xen/arch/powerpc/smp.c Fri Mar 02 18:05:38 2007 -0600 +++ b/xen/arch/powerpc/smp.c Thu Apr 12 14:34:39 2007 +0200 @@ -68,7 +68,7 @@ int smp_call_function(void (*func) (void void smp_send_stop(void) { -BUG(); +unimplemented(); } I wouldn't have thought that'd help. Last time I looked (which was quite a while ago) unimplemented() still dumped stuff on the console, which will confuse GDB. On a wider note, How close is the SMP infrastructure to allowing smp_send_stop() to be implemented? @@ -554,6 +554,7 @@ __trap_to_gdb(struct cpu_user_regs *regs /* Shouldn't really do this, but otherwise we stop for no obvious reason, which is Bad */ printk(Waiting for GDB to attach...\n); +set_printk_prefix(); I think what you need is a call to gdbstub_attach() (or similar) that will make sure that all output from xen (or dom*) will be encoeded as gdb 'O' packets, and shouldn't confuse anything. Of course you'll need a call to gdbstub_detach() if you go dow that path. Yours Tony linux.conf.auhttp://linux.conf.au/ || http://lca2008.linux.org.au/ Jan 28 - Feb 02 2008 The Australian Linux Technical Conference! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [RFC][PATCH] 2/5] [POWERPC] Use the PFN decoration for the xentrace page(s).
Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- xen/arch/powerpc/mm.c | 10 +- xen/common/trace.c| 13 + 2 files changed, 18 insertions(+), 5 deletions(-) Index: xenppc-unstable.hg.working/xen/common/trace.c === --- xenppc-unstable.hg.working.orig/xen/common/trace.c +++ xenppc-unstable.hg.working/xen/common/trace.c @@ -182,10 +182,15 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc switch ( tbc-cmd ) { case XEN_SYSCTL_TBUFOP_get_info: -tbc-evt_mask = tb_event_mask; -tbc-buffer_mfn = opt_tbuf_size ? virt_to_mfn(per_cpu(t_bufs, 0)) : 0; -tbc-size = opt_tbuf_size * PAGE_SIZE; -break; +{ + unsigned long mfn; + mfn = opt_tbuf_size ? PFN_DECOR | virt_to_mfn(per_cpu(t_bufs, 0)) + : 0; + tbc-evt_mask = tb_event_mask; + tbc-buffer_mfn = mfn; + tbc-size = opt_tbuf_size * PAGE_SIZE; + break; +} case XEN_SYSCTL_TBUFOP_set_cpu_mask: xenctl_cpumap_to_cpumask(tb_cpu_mask, tbc-cpu_mask); break; Index: xenppc-unstable.hg.working/xen/arch/powerpc/mm.c === --- xenppc-unstable.hg.working.orig/xen/arch/powerpc/mm.c +++ xenppc-unstable.hg.working/xen/arch/powerpc/mm.c @@ -28,6 +28,7 @@ #include asm/init.h #include asm/page.h #include asm/string.h +#include xen/domain.h #ifdef VERBOSE #define MEM_LOG(_f, _a...) \ @@ -91,7 +92,14 @@ void share_xen_page_with_guest( void share_xen_page_with_privileged_guests( struct page_info *page, int readonly) { -unimplemented(); +struct domain *d; + +/* FIXME: This shouldn't be allowed to fail */ +d = find_domain_by_id((domid_t) 0); +if (!d) +return; + +share_xen_page_with_guest(page, d, readonly); } static ulong foreign_to_mfn(struct domain *d, ulong pfn) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [RFC][PATCH] 3/5] [XEN] Use explicit bit sized fields for exported xentrace data.
Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- xen/common/trace.c |6 +++--- xen/include/public/trace.h |2 +- xen/include/xen/trace.h| 14 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) Index: xenppc-unstable.hg.working/xen/common/trace.c === --- xenppc-unstable.hg.working.orig/xen/common/trace.c +++ xenppc-unstable.hg.working/xen/common/trace.c @@ -46,7 +46,7 @@ static int nr_recs; static int t_buf_highwater; /* Number of records lost due to per-CPU trace buffer being full. */ -static DEFINE_PER_CPU(unsigned long, lost_records); +static DEFINE_PER_CPU(uint32_t, lost_records); /* a flag recording whether initialization has been done */ /* or more properly, if the tbuf subsystem is enabled right now */ @@ -233,8 +233,8 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc * failure, otherwise 0. Failure occurs only if the trace buffers are not yet * initialised. */ -void trace(u32 event, unsigned long d1, unsigned long d2, - unsigned long d3, unsigned long d4, unsigned long d5) +void trace(uint32_t event, uint32_t d1, uint32_t d2, uint32_t d3, uint32_t d4, + uint32_t d5) { struct t_buf *buf; struct t_rec *rec; Index: xenppc-unstable.hg.working/xen/include/public/trace.h === --- xenppc-unstable.hg.working.orig/xen/include/public/trace.h +++ xenppc-unstable.hg.working/xen/include/public/trace.h @@ -76,7 +76,7 @@ struct t_rec { uint64_t cycles; /* cycle counter timestamp */ uint32_t event; /* event ID*/ -unsigned long data[5];/* event data items*/ +uint32_t data[5]; /* event data items*/ }; /* Index: xenppc-unstable.hg.working/xen/include/xen/trace.h === --- xenppc-unstable.hg.working.orig/xen/include/xen/trace.h +++ xenppc-unstable.hg.working/xen/include/xen/trace.h @@ -33,19 +33,19 @@ void init_trace_bufs(void); /* used to retrieve the physical address of the trace buffers */ int tb_control(struct xen_sysctl_tbuf_op *tbc); -void trace(u32 event, unsigned long d1, unsigned long d2, - unsigned long d3, unsigned long d4, unsigned long d5); +void trace(uint32_t event, uint32_t d1, uint32_t d2, uint32_t d3, uint32_t d4, + uint32_t d5); /* Avoids troubling the caller with casting their arguments to a trace macro */ #define trace_do_casts(e,d1,d2,d3,d4,d5) \ do { \ if ( unlikely(tb_init_done) )\ trace(e, \ - (unsigned long)d1, \ - (unsigned long)d2, \ - (unsigned long)d3, \ - (unsigned long)d4, \ - (unsigned long)d5); \ + (uint32_t)d1, \ + (uint32_t)d2, \ + (uint32_t)d3, \ + (uint32_t)d4, \ + (uint32_t)d5); \ } while ( 0 ) /* Convenience macros for calling the trace function. */ ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [RFC][PATCH] 0/5] Support xentrace on PPC, and update tools to work regardless of endian/wordsize.
Hello All, This series of patches gets xentrace working on PPC. Clearly the first 2 patches are PPC specific, but the last 3 are xen-devel material. Essentially the patches do: 1. Introduce a #define for decorating xenheap(and htab) pages. 2. Wire up xentrace and use the pfn decoration. 3. Use unit32_t instead of unsigned long. 4. Make the xentrace tool (xentrace copies the xentrace buffers from xen memory to disk) write data in network byte order. 5. Various cleanups. This patch is optional. Please have a look before for I send patches 3-5 to xen-devel. ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [RFC][PATCH] 1/5] [POWERPC] Introduce a PFN decoration.
This bit can be OR'ed into a MFN, to allow dom0 to map it. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- xen/arch/powerpc/mm.c|5 - xen/include/asm-powerpc/mm.h |3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) Index: xenppc-unstable.hg.working/xen/arch/powerpc/mm.c === --- xenppc-unstable.hg.working.orig/xen/arch/powerpc/mm.c +++ xenppc-unstable.hg.working/xen/arch/powerpc/mm.c @@ -408,7 +408,10 @@ ulong pfn2mfn(struct domain *d, ulong pf ulong foreign_map_pfn = 1UL cpu_foreign_map_order(); /* quick tests first */ -if (pfn foreign_map_pfn) { +if (pfn PFN_DECOR) { +/* FIXME: Better PFN_TYPE: PFN_TYPE_XEN? */ +mfn = pfn ~(PFN_DECOR); +} else if (pfn foreign_map_pfn) { t = PFN_TYPE_FOREIGN; mfn = foreign_to_mfn(d, pfn); } else if (pfn = max_page pfn (max_page + NR_GRANT_FRAMES)) { Index: xenppc-unstable.hg.working/xen/include/asm-powerpc/mm.h === --- xenppc-unstable.hg.working.orig/xen/include/asm-powerpc/mm.h +++ xenppc-unstable.hg.working/xen/include/asm-powerpc/mm.h @@ -246,6 +246,9 @@ extern unsigned long paddr_to_maddr(unsi #define PFN_TYPE_FOREIGN 4 #define PFN_TYPE_GNTTAB 5 +/* Or'd into xenheap MFNs to ensure dom0 can access these pages */ +#define PFN_DECOR (131) + extern ulong pfn2mfn(struct domain *d, ulong pfn, int *type); static inline unsigned long gmfn_to_mfn(struct domain *d, unsigned long gmfn) { ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [RFC][PATCH] 5/5] [TOOLS][XENTRACE] Various tidyups to xentrace tools.
- use err/errx/warn, instead of PERROR, perror and fprintf - Match () place ment consistent in this files - Use consistent tabs and whitespacing. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xentrace/xentrace.c | 137 ++--- tools/xentrace/xentrace_format | 51 +++ 2 files changed, 73 insertions(+), 115 deletions(-) Index: xenppc-unstable.hg.working/tools/xentrace/xentrace.c === --- xenppc-unstable.hg.working.orig/tools/xentrace/xentrace.c +++ xenppc-unstable.hg.working/tools/xentrace/xentrace.c @@ -22,6 +22,7 @@ #include signal.h #include inttypes.h #include string.h +#include err.h #include xen/xen.h #include xen/trace.h @@ -42,16 +43,6 @@ #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define PERROR(_m, _a...) \ -do {\ -int __saved_errno = errno; \ -fprintf(stderr, ERROR: _m (%d = %s)\n , ## _a , \ -__saved_errno, strerror(__saved_errno));\ -errno = __saved_errno; \ -} while (0) - -extern FILE *stderr; - /* Compile time configuration of defaults / /* when we've got more records than this waiting, we log it to the output */ @@ -88,7 +79,7 @@ void close_handler(int signal) struct timespec millis_to_timespec(unsigned long millis) { struct timespec spec; - + spec.tv_sec = millis / 1000; spec.tv_nsec = (millis % 1000) * 1000; @@ -128,10 +119,7 @@ void write_rec(uint32_t cpu, struct t_re } if ( written != 8 ) -{ -PERROR(Failed to write trace record); -exit(EXIT_FAILURE); -} +err(EXIT_FAILURE, Failed to write trace record); } static void get_tbufs(unsigned long *mfn, unsigned long *size) @@ -139,21 +127,16 @@ static void get_tbufs(unsigned long *mfn int xc_handle = xc_interface_open(); int ret; -if ( xc_handle 0 ) -{ -exit(EXIT_FAILURE); -} +if ( xc_handle 0 ) +errx(EXIT_FAILURE, Unable to open the xc interface); -if(!opts.tbuf_size) - opts.tbuf_size = DEFAULT_TBUF_SIZE; +if ( !opts.tbuf_size ) +opts.tbuf_size = DEFAULT_TBUF_SIZE; ret = xc_tbuf_enable(xc_handle, opts.tbuf_size, mfn, size); if ( ret != 0 ) -{ -perror(Couldn't enable trace buffers); -exit(1); -} +err(EXIT_FAILURE, Couldn't enable trace buffers); xc_interface_close(xc_handle); } @@ -174,10 +157,8 @@ struct t_buf *map_tbufs(unsigned long tb xc_handle = xc_interface_open(); -if ( xc_handle 0 ) -{ -exit(EXIT_FAILURE); -} +if ( xc_handle 0 ) +errx(EXIT_FAILURE, Unable to open the xc interface); /* On PPC (At least) the DOMID arg is ignored in dom0 */ tbufs_mapped = xc_map_foreign_range(xc_handle, DOMID_XEN, @@ -186,18 +167,15 @@ struct t_buf *map_tbufs(unsigned long tb xc_interface_close(xc_handle); -if ( tbufs_mapped == 0 ) -{ -PERROR(Failed to mmap trace buffers); -exit(EXIT_FAILURE); -} +if ( tbufs_mapped == 0 ) +err(EXIT_FAILURE, Failed to mmap trace buffers); return tbufs_mapped; } /** * set_mask - set the cpu/event mask in HV - * @mask: the new mask + * @mask: the new mask * @type: the new mask type,0-event mask, 1-cpu mask * */ @@ -206,21 +184,19 @@ void set_mask(uint32_t mask, int type) int ret = 0; int xc_handle = xc_interface_open(); /* for accessing control interface */ -if (type == 1) { +if ( type == 1 ) { ret = xc_tbuf_set_cpu_mask(xc_handle, mask); -fprintf(stderr, change cpumask to 0x%x\n, mask); -} else if (type == 0) { +warnx(change cpumask to 0x%x\n, mask); +} else if ( type == 0 ) { ret = xc_tbuf_set_evt_mask(xc_handle, mask); -fprintf(stderr, change evtmask to 0x%x\n, mask); +warnx(change evtmask to 0x%x\n, mask); } xc_interface_close(xc_handle); if ( ret != 0 ) -{ -PERROR(Failure to get trace buffer pointer from Xen and set the new mask); -exit(EXIT_FAILURE); -} +err(EXIT_FAILURE, Failure to get trace buffer pointer from + Xen and set the new mask); } /** @@ -240,11 +216,8 @@ struct t_buf **init_bufs_ptrs(void *bufs user_ptrs = (struct t_buf **)calloc(num, sizeof(struct t_buf *)); if ( user_ptrs == NULL ) -{ -PERROR( Failed to allocate memory for buffer pointers\n); -exit(EXIT_FAILURE); -} - +err(EXIT_FAILURE, Failed to allocate memory for buffer pointers); + /* initialise pointers to the trace buffers - given the size of a trace * buffer and the value of bufs_maped, we can
[XenPPC] FWD: [Xen-devel] Xentrace supported platforms.
FYI, I stuffed up the CC line, and missed this list. - Forwarded message from Tony Breeds [EMAIL PROTECTED] - To: Xen-Devel [EMAIL PROTECTED], Mark Williamson [EMAIL PROTECTED], Rob Gardner [EMAIL PROTECTED] From: Tony Breeds [EMAIL PROTECTED] Subject: [Xen-devel] Xentrace supported platforms. Date: Fri, 17 Nov 2006 15:44:41 +1100 Hello all, I've hacked up a version of xentrace (both tools, and hypervisor code), to work on PPC. During this process I found a few places that break on 64-bit platforms. So I'm wondering who's using xentrace and on what platforms? Also is anyone interested in being able to capture the xentrace data on one machine and read/process it on another (potentially switching endianness and wordsize in the process)? Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! ___ Xen-devel mailing list [EMAIL PROTECTED] http://lists.xensource.com/xen-devel - End forwarded message - 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] Re: [Xen-devel] Re: Xentrace supported platforms.
On Fri, Nov 17, 2006 at 02:01:02PM +0900, Atsushi SAKAI wrote: Hello, Rob and Tony I am using xentrace in IA64 environment. It works fine. What is your problem? Essentially it boiled down to the use of unsigned long in the t_rec structure. When trying to write the data to disk (xentrace.c) the t_rec structure was being written 32bytes at a time (as oppoed to the whole structure which is 56 bytes. Anyway I sometimes analyze xentrace/IA64 data on x86 by change the format string of xentrace_format/x86. So for my work, endian is no problem at this moment. Okay good to know. 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] Re: [Xen-devel] Re: Xentrace supported platforms.
On Thu, Nov 16, 2006 at 09:55:40PM -0700, Rob Gardner wrote: In the dim past, xentrace/xenmon had been tested on amd64 and IA64, but I don't know if anyone is using it on those platforms. If you have fixes that would work on all platforms, then by all means you should share them. Certainly will.. I wanted to know what platforms are currently in use so I can try and verify that I don't break them in the process :) 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: [XenPPC] Xen says Linux dom0 is not a Xen-compatible Elf image
On Sun, Nov 12, 2006 at 02:14:54PM -0500, Mark F Mergen wrote: I was current with linux-ppc-2.6.hg and xenppc-unstable.hg as of about Thursday and my noHV systems were woking fine. This weekend, I pulled changes from both trees and rebuilt everything. Now, I get the following error during bringup. This occurs even with totally unmodified trees (the messages below were produced by such unmodified trees). Was there a change in expected executable file format? Do I need to change my config and make procedures? Were there corresponding changes to Mambo required and do I need to rebuild Mambo? Hi Mark, I just built the current tips[1] and happily booted dom0 on my JS20. I've seen this error before when (for what ever reason) the xen-guest section hasn't been built into the image. Can you verify you have a xen_gues section in the resulting dom0 vmmlinux? Something like? readelf -a linux-ppc-2.6.hg/vmlinux | egrep xen_guest Yours Tony [1] linux-ppc-2.6.hg== 72c8bc5d88f4+ xenppc-unstable.hg == b50d3fca138e+ 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] Remapping xenheap pages into dom0.
Howdy all, I'm having problems getting what should be a reasonably fundamental operation working. I have a set of xenheap pages that I'm initialising and then attempting to map in to dom0 (This is for hcall tracing [ xen/common/trace.c ]) If I dump that pages (or parts thereof) from xen I get the expected contents, when trying to dump them from the dom0 kernel I get random data. So my question is should share_xen_page_with_guest() work for xenheap pages? I'm pretty confident that share_xen_page_with_guest() works as it's used for grant tables. Page in xen: memdump(): 0xa5a5 0xa5a5 (0x734000) memdump(): 0004 0xa5a5 0xa5a5 (0x734000) page in dom0 kernel: memdump(): 0x 0x0001 (0xf7fdf000) memdump(): 0004 0x 0x (0xf7fdf000) the userspace tools are locating the correct mfn for the pages I'm trying to map. Does anyone have any ideas on what I can look at to work out why I'm not getting that page I think I should be getting? Also, this may or may not be related. If I don't call down to share_xen_page_with_guest() I would have expected to get some form of oops or crash, but the machine exhibits the same behavior. Actually that probably indicates that I'm getting a kernel pages rather than xen page. 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] [PATCH 2/3][TOOLS][XM-TEST] Add xvd devices to the initrd
Add xvd devices to the initrd. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/patches/buildroot/add_xvd_devices.patch | 13 ++ 1 file changed, 13 insertions(+) --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/tools/xm-test/ramdisk/patches/buildroot/add_xvd_devices.patch Thu Oct 26 18:58:58 2006 +1000 @@ -0,0 +1,13 @@ +--- buildroot/target/generic/device_table.txt~ 2006-10-26 17:38:04.0 +1000 buildroot/target/generic/device_table.txt 2006-10-26 17:37:08.0 +1000 +@@ -169,3 +169,10 @@ + #/dev/mcd b 640 0 0 23 0 0 0 - + #/dev/optcd b 640 0 0 17 0 0 0 - + ++# Xen Virtual Block Devices ++/dev/xvda b 640 0 0 202 0 0 0 - ++/dev/xvda b 640 0 0 202 1 1 1 4 ++/dev/xvdb b 640 0 0 202 16 0 0 - ++/dev/xvdb b 640 0 0 202 17 1 1 4 ++/dev/xvdc b 640 0 0 202 32 0 0 - ++/dev/xvdc b 640 0 0 202 33 1 1 4 ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 0/3][TOOLS][XM-TEST] Update block tests to use xvd rather than SCSI or IDE
Hello All, This patch Updates all the block specific tests in xm-test to use the Xen Virtual Block Devices rather than overriding the SCSI or IDE subsystems. It also cleans up some whitespace problems (Which looking back I should have done in a separate patchset). The last patch (3/3) bumps the version number of xm-test to 1.1, as these new block tests will certainly fail with older initrd's due to the lack of xvd device nodes in the initrd. I've tested these patches with no regressions on x86, and a number of improvements on PPC. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/configure.ac |2 tools/xm-test/ramdisk/README-XenSource-initrd-1.1-img | 45 ++ tools/xm-test/ramdisk/patches/buildroot/add_xvd_devices.patch | 13 ++ tools/xm-test/tests/block-create/01_block_attach_device_pos.py | 10 +- tools/xm-test/tests/block-create/02_block_attach_file_device_pos.py |8 - tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py | 16 +-- tools/xm-test/tests/block-create/05_block_attach_and_dettach_device_repeatedly_pos.py | 18 ++-- tools/xm-test/tests/block-create/06_block_attach_baddomain_neg.py |8 - tools/xm-test/tests/block-create/07_block_attach_baddevice_neg.py | 14 +-- tools/xm-test/tests/block-create/08_block_attach_bad_filedevice_neg.py | 16 +-- tools/xm-test/tests/block-create/09_block_attach_and_dettach_device_check_data_pos.py | 44 - tools/xm-test/tests/block-create/10_block_attach_dettach_multiple_devices.py | 30 +++--- tools/xm-test/tests/block-create/11_block_attach_shared_dom0.py |2 tools/xm-test/tests/block-create/12_block_attach_shared_domU.py |2 tools/xm-test/tests/block-destroy/01_block-destroy_btblock_pos.py |8 - tools/xm-test/tests/block-destroy/02_block-destroy_rtblock_pos.py |8 - tools/xm-test/tests/block-destroy/04_block-destroy_nonattached_neg.py |2 tools/xm-test/tests/block-destroy/05_block-destroy_byname_pos.py |8 - tools/xm-test/tests/block-destroy/06_block-destroy_check_list_pos.py | 10 +- tools/xm-test/tests/block-integrity/01_block_device_read_verify.py |4 tools/xm-test/tests/block-integrity/02_block_device_write_verify.py |4 tools/xm-test/tests/block-list/01_block-list_pos.py |6 - tools/xm-test/tests/block-list/02_block-list_attachbd_pos.py |6 - tools/xm-test/tests/block-list/03_block-list_anotherbd_pos.py | 10 +- tools/xm-test/tests/block-list/06_block-list_checkremove_pos.py | 24 ++--- 25 files changed, 187 insertions(+), 131 deletions(-) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 3/3][TOOLS][XM-TEST] Bump xm-test version to 1.1 to accommodate new devices
Bump xm-test version to 1.1 to accommodate new devices. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/configure.ac|2 tools/xm-test/ramdisk/README-XenSource-initrd-1.1-img | 45 ++ 2 files changed, 46 insertions(+), 1 deletion(-) --- a/tools/xm-test/configure.acThu Oct 26 19:00:30 2006 +1000 +++ b/tools/xm-test/configure.acThu Oct 26 19:01:50 2006 +1000 @@ -1,7 +1,7 @@ # xm-test configure.ac input script # Basic header information -AC_INIT([xm-test], [1.0.0]) +AC_INIT([xm-test], [1.1.0]) AM_INIT_AUTOMAKE([1.7 foreign]) MK=''; AC_SUBST(MK) diff -r bc970de10f1c -r 2830d0b89ea2 tools/xm-test/ramdisk/README-XenSource-initrd-1.1-img --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/tools/xm-test/ramdisk/README-XenSource-initrd-1.1-img Thu Oct 26 19:01:50 2006 +1000 @@ -0,0 +1,45 @@ +XenSource xm-test 1.1 initrds += + +http://xm-test.xensource.com/ramdisks/initrd-1.1-i386.img and +http://xm-test.xensource.com/ramdisks/initrd-1.1-powerpc.img are initrds +suitable for use with Xen's xm-test regression testing suite. They has been +built and provided by XenSource, for the convenience of Xen users. xm-test +initrds may be mixed across minor xm-test versions, but not across major +versions; this initrd is suitable for all 1.1.x versions of xm-test (as +shipped with Xen 3.0.4 and the unstable tree leading up to that release). + +In order to use one of these initrds, run ./autogen; ./configure; make +existing inside the xm-test directory, and the appropriate initrd for your +architecture will be downloaded automatically. Alternatively, if you have +already downloaded that file, place it into the xm-test/ramdisk directory and +run the same command. In either case, runtest.sh can then be used as normal. +See xm-test/README for more details. + +These initrds were built using the infrastructure provided by xm-test. Each +is a full guest operating system and filesystem, and as such includes a large +number of pieces of software. The source code for the majority of these are +included in full inside the file +http://xm-test.xensource.com/ramdisks/INITRD-buildroot.tar.bz2, where +INITRD is either initrd-1.1-i386 or initrd-1.1-powerpc as appropriate, or +alongside this file. Copyright statements and licences are contained therein. +The remaining source code is included in the Xen distribution, at +http://www.xensource.com/xen/downloads/archives.html. The configurations used +for BusyBox, uClibc, and Buildroot are available as +http://xm-test.xensource.com/ramdisks/INITRD-busybox-config, +http://xm-test.xensource.com/ramdisks/INITRD-uClibc-config, and +http://xm-test.xensource.com/ramdisks/INITRD-buildroot-config respectively, +or alongside this file. + +XenSource and the Xen contributors are grateful to the authors of these +software packages for their contributions to free and open-source software. + + +Buildroot and BusyBox are Copyright (c) Erik Andersen [EMAIL PROTECTED]. +BusyBox is licensed under the GNU General Public License (GPL). A copy of +this license is available in the file GPL-2, +http://xm-test.xensource.com/ramdisks/GPL-2, or alongside this file. + +uClibc is licensed under the GNU Lesser General Public License (LGPL). A copy +of this license is available in the file +http://xm-test.xensource.com/ramdisks/LGPL-2, or alongside this file. ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] Re: [Xen-devel] [PATCH 10/10][TOOLS][XM-TEST] Fix Memory assumptions in the create tests
On Tue, Oct 24, 2006 at 02:54:16PM +0100, Ewan Mellor wrote: OK, I've taken the most of the patch, but with the 16MiB low limit left in. What's this bit though (I haven't taken this yet)? Hi Ewan, What are the outstanding issues with this patch? I'm keen to get it merged if you're happy with it. 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: [XenPPC] Re: 2 questions of creating domU
On Wed, Oct 25, 2006 at 10:38:46AM -0400, Jimi Xenidis wrote: this just works in my local disk environment and I'm pretty sure othe local disk environments work as well. Hollis, Tony are you able to create domain that have net access? Yes. On my JS20 I was able to create a domU (called test). Then add a network device xm network-attach $(xm domid test). Inside the domain dhclient eth0 and get an IP. Using both the xen block and network devices. 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: [XenPPC] Re: 2 questions of creating domU
On Thu, Oct 26, 2006 at 02:11:54AM -0400, Hao Yu wrote: Hi Tony, Thanks for the info. I followed your steps and basically got the same thing: Hi Hao, You're up late (or early). 1. I got rid of the line : vif = [ '' ] , created a domain (id=8) 2. I issued xm network-attach 8, Here is the output cso83:~ # xm network-attach 8 Error: Device 1 (vif) could not be connected. Backend device not found. Usage: xm network-attach Domain [--script=script] [--ip=ip] [--mac=mac] Create a new virtual network device. cso83:~ # xm network-attach 8 --ip=9.2.78.162 Error: Device 2 (vif) could not be connected. Backend device not found. Usage: xm network-attach Domain [--script=script] [--ip=ip] [--mac=mac] Create a new virtual network device. Strange. Can you post the complete dmesg logs for domU? and the output from xenstore-ls, after you've tried to create the network device. 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] [PATCH][TOOLS][XM-TEST] Force BR_URL decison into final Makefile.
Hello Ewan, I was testing out the current xen-unstable on x86 and found that with automake 1.9 I needed the floowing patch to have the generated Makefile work. Otherwise I was getting variations on BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2 ifdef BR_SNAPSHOT else BR_URL ?= http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2 endif Which meant that BR_URL was always getting http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2; Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- Makefile.am |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -r abee5c6b930d tools/xm-test/ramdisk/Makefile.am --- a/tools/xm-test/ramdisk/Makefile.am Wed Oct 25 15:29:36 2006 +0100 +++ b/tools/xm-test/ramdisk/Makefile.am Thu Oct 26 14:27:54 2006 +1000 @@ -17,9 +17,9 @@ BR_ARCH ?= $(shell uname -m | sed -e s/i BR_ARCH ?= $(shell uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/') @[EMAIL PROTECTED] BR_SNAPSHOT - BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2 [EMAIL PROTECTED]@ BR_URL = http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2 @[EMAIL PROTECTED] - BR_URL ?= http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2 [EMAIL PROTECTED]@ BR_URL = http://xm-test.xensource.com/ramdisks/buildroot-20061023.tar.bz2 @[EMAIL PROTECTED] BR_TAR = $(notdir $(BR_URL)) 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] [RFC] Re: [Xen-devel] Status of xvd and problems with sd.
On Wed, Oct 25, 2006 at 02:45:36PM +1000, Tony Breeds wrote: Cool. I'll tackle this. I expect we'll neeed to create some extra device nodes (/dev/xvd*) in the initrd so we may need to bump the xm-test version to 1.1 when this goes in to make sure everything stays in sync. The following patch isn't complete but It's posted here for review. Things todo: * Add generation of xvd* device nodes into the ramdisk * Bump the Minor version number as this will these test will need a specific ramdisk To test I mounted my initrd on loopback and: --- sudo mknod ./xvda b 202 0 sudo mknod ./xvda1 b 202 1 sudo mknod ./xvda2 b 202 2 sudo mknod ./xvdb b 202 16 sudo mknod ./xvdb1 b 202 17 sudo mknod ./xvdb2 b 202 18 sudo mknod ./xvdc b 202 32 sudo mknod ./xvdc1 b 202 33 sudo mknod ./xvdc2 b 202 34 --- (until I get item 1 in the todo list, implemented) Running all the block-*/* tests generated no failures for me on PPC, I'm currently testing on x86. The patch below, changes all all SCSI and IDE device references in the block tests to Xen Virtual Block devices, updates device encodings, and fixes some whitespace (Which Really should be a seperate patch). Feedback welcome. diff -r aeaccdf5ad2f tools/xm-test/tests/block-create/01_block_attach_device_pos.py --- a/tools/xm-test/tests/block-create/01_block_attach_device_pos.pyWed Oct 25 09:59:17 2006 +1000 +++ b/tools/xm-test/tests/block-create/01_block_attach_device_pos.pyThu Oct 26 13:24:05 2006 +1000 @@ -32,12 +32,12 @@ except ConsoleError, e: FAIL(str(e)) -block_attach(domain, phy:ram1, sdb1) +block_attach(domain, phy:ram1, xvda1) -try: - run = console.runCmd(cat /proc/partitions) +try: +run = console.runCmd(cat /proc/partitions) except ConsoleError, e: - FAIL(str(e)) +FAIL(str(e)) # Close the console domain.closeConsole() @@ -45,5 +45,5 @@ domain.closeConsole() # Stop the domain (nice shutdown) domain.stop() -if not re.search(sdb1,run[output]): +if not re.search(xvda1,run[output]): FAIL(Device is not actually connected to the domU) diff -r aeaccdf5ad2f tools/xm-test/tests/block-create/02_block_attach_file_device_pos.py --- a/tools/xm-test/tests/block-create/02_block_attach_file_device_pos.py Wed Oct 25 09:59:17 2006 +1000 +++ b/tools/xm-test/tests/block-create/02_block_attach_file_device_pos.py Thu Oct 26 13:24:05 2006 +1000 @@ -32,10 +32,10 @@ except ConsoleError, e: FAIL(str(e)) -block_attach(domain, file:/dev/ram1, sdb2) +block_attach(domain, file:/dev/ram1, xvda1) try: - run = console.runCmd(cat /proc/partitions) +run = console.runCmd(cat /proc/partitions) except ConsoleError, e: FAIL(str(e)) @@ -45,5 +45,5 @@ domain.closeConsole() # Stop the domain (nice shutdown) domain.stop() -if not re.search(sdb2,run[output]): - FAIL(Device is not actually connected to the domU) +if not re.search(xvda1,run[output]): +FAIL(Device is not actually connected to the domU) diff -r aeaccdf5ad2f tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py --- a/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py Wed Oct 25 09:59:17 2006 +1000 +++ b/tools/xm-test/tests/block-create/04_block_attach_device_repeatedly_pos.py Thu Oct 26 13:24:05 2006 +1000 @@ -30,14 +30,14 @@ except ConsoleError, e: FAIL(str(e)) for i in range(10): - status, output = traceCommand(xm block-attach %s phy:ram1 sdb1 w % domain.getName()) -if i == 0 and status != 0: -FAIL(xm block attach returned invalid %i != 0 % status) - if i 0 and status == 0: -FAIL(xm block-attach (repeat) returned invalid %i 0 % status) - run = console.runCmd(cat /proc/partitions) - if not re.search(sdb1, run['output']): -FAIL(Device is not actually attached to domU) +status, output = traceCommand(xm block-attach %s phy:ram1 xvda1 w % domain.getName()) +if i == 0 and status != 0: +FAIL(xm block attach returned invalid %i != 0 % status) +if i 0 and status == 0: +FAIL(xm block-attach (repeat) returned invalid %i 0 % status) +run = console.runCmd(cat /proc/partitions) +if not re.search(xvda1, run['output']): +FAIL(Device is not actually attached to domU) # Close the console domain.closeConsole() diff -r aeaccdf5ad2f tools/xm-test/tests/block-create/05_block_attach_and_dettach_device_repeatedly_pos.py --- a/tools/xm-test/tests/block-create/05_block_attach_and_dettach_device_repeatedly_pos.py Wed Oct 25 09:59:17 2006 +1000 +++ b/tools/xm-test/tests/block-create/05_block_attach_and_dettach_device_repeatedly_pos.py Thu Oct 26 13:24:05 2006 +1000 @@ -32,15 +32,15 @@ except ConsoleError, e: for i in range(10): - block_attach(domain, phy:ram1, sdb1) - run = console.runCmd(cat /proc/partitions) - if not re.search(sdb1, run[output]): - FAIL(Failed to attach block device: /proc
[XenPPC] Re: [Xen-devel] [PATCH 10/10][TOOLS][XM-TEST] Fix Memory assumptions in the create tests
On Tue, Oct 24, 2006 at 02:54:16PM +0100, Ewan Mellor wrote: OK, I've taken the most of the patch, but with the 16MiB low limit left in. Great. What's this bit though (I haven't taken this yet)? Essentially the XenDomain class does not respect the arch defaults where as XmTestDomain does. This part of the patch forces both HVM and non-HVM tests to use XmTestDomain. With appropriate changes to the extraConfig arg. On PPC we need to use the arch defaults to get the console setup correctly. I chose not to include the arch defaults in XenDomain as this gives us flexibility for the future. diff -r 69035d8a5f2a -r 2854ceda351e tools/xm-test/tests/create/14_create_blockroot_pos.py --- a/tools/xm-test/tests/create/14_create_blockroot_pos.py Thu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/14_create_blockroot_pos.py Thu Oct 19 17:02:40 2006 +1000 @@ -18,17 +18,12 @@ rdpath = getRdPath() # print Using %s % output if ENABLE_HVM_SUPPORT: -domain = XmTestDomain(name=14_create_blockroot) +config = None else: -config = {memory : 64, - root : /dev/hda1, - name : 14_create_blockroot, - kernel : getDefaultKernel(), +config = {root : /dev/hda1, disk : file:%s/initrd.img,hda1,w % rdpath } -domConfig = XenConfig() -domConfig.setOpts(config) -domain = XenDomain(name=domConfig.getOpt(name), config=domConfig) +domain = XmTestDomain(name=14_create_blockroot, extraConfig=config) try: console = domain.start() 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] Re: [Xen-devel] [PATCH 10/10][TOOLS][XM-TEST] Fix Memory assumptions in the create tests
On Mon, Oct 23, 2006 at 11:55:22AM +0100, Ewan Mellor wrote: I'm not convinced by this one. Just because 32 MiB is known to be safe, that doesn't mean that 31 MiB will cause the domain to crash. The 16 MiB value is deliberately _far_ too small, so that the OOM killer kicks in, and the console runaway is detected. Okay, that makes more sense. I don't want this test to intermittently succeed, even if it is a negative test -- it makes the results hard to analyse. Is the 16 MiB value a problem for PPC, or were you deliberately trying to test that 63 MiB failed on that platform? PPC will fail for any memory value 64M, so 16 or 63 makes little difference. I probably should haev said this in the commit message but I changed this test to use minSafeMem() to be consistent with the other changes I made. We could add another arch-specific option -- tooLittleMem() or something -- or we could just leave this value at 16 MiB. Okay leaving it set at 16MiB, is probably the right thing. If we get to a state the an architecture or OS needs to vary it we can look at something like tooLittleMem() then. 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: [Xen-devel] Re: [XenPPC] [PATCH 0/10][TOOLS][XM-TEST] [v3] Update xm-test to support new architectures
On Mon, Oct 23, 2006 at 11:48:54AM +0100, Ewan Mellor wrote: Patches 3 - 9 look OK. Rather than take 1 and 2 directly,?I've reworked that bit of the build system as we discussed, so that xm-test.xensource.com will host a known-good version of the buildroot source. Great. I included them for the sake of completeness, and to take the urgency off you updateing xm-test.xensource.com. :) Also if you have any difficulty building a cross compiled initrd for PPC give me a yell. I've also changed things so that the initrd gets the architecture in the name, so that make existing continues to work (your patches don't add make existing support for PPC, AFAIK). What make you think that make existing wont work, I've been doing INITRD=http://localhost/xm-test/ make existing quite often with no problems, or is that not what you meant. Either way includeing the architecture in the initrd is nice. I'll reply to patch 10 in a sec. Thanks. I'll push all these things when the new ramdisks are built and uploaded -- today, hopefully. Excellent. xm-test has deserved its One Point Oh for a long time now, so I'll be bumping the version number too. Thanks for all your hard work, You're welcome, all I did was build on the work of the xm-test authors. 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] [PATCH 3/10][TOOLS][XM-TEST] Rename buildroot - buildroot-i386
Rename buildroot - buildroot-i386. Also update Makefile. After patch Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/Makefile.am|2 tools/xm-test/ramdisk/configs/buildroot | 330 --- tools/xm-test/ramdisk/configs/buildroot-i386 | 330 +++ 3 files changed, 331 insertions(+), 331 deletions(-) --- a/tools/xm-test/ramdisk/Makefile.am Thu Oct 19 11:55:18 2006 +1000 +++ b/tools/xm-test/ramdisk/Makefile.am Thu Oct 19 11:57:00 2006 +1000 @@ -31,7 +31,7 @@ endif tar xjf $(BR_TAR) $(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 625ccd4116c2 -r 46e65d2bdcb4 tools/xm-test/ramdisk/configs/buildroot-i386 --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/tools/xm-test/ramdisk/configs/buildroot-i386 Thu Oct 19 11:57:00 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_6_11 is not set +BR2_KERNEL_HEADERS_2_6_12=y +BR2_DEFAULT_KERNEL_HEADERS=2.6.12 + +# +# uClibc Options +# +# BR2_UCLIBC_VERSION_SNAPSHOT is not set +# BR2_ENABLE_LOCALE is not set +# BR2_PTHREADS_NONE is not set +# BR2_PTHREADS is not set +BR2_PTHREADS_OLD=y +# BR2_PTHREADS_NATIVE is not set + +# +# Binutils Options +# +# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set +# BR2_BINUTILS_VERSION_2_15 is not set +# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set +# BR2_BINUTILS_VERSION_2_15_97 is not set +# BR2_BINUTILS_VERSION_2_16_1 is not set +# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_3 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_4 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set +# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set +BR2_BINUTILS_VERSION_2_16_91_0_7=y +BR2_BINUTILS_VERSION=2.16.91.0.7 +BR2_EXTRA_BINUTILS_CONFIG_OPTIONS= + +# +# Gcc 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_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=y +# BR2_GCC_VERSION_4_0_0 is not set +# BR2_GCC_VERSION_4_0_1 is not set +# 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_2 is not set +# BR2_GCC_IS_SNAP is not set +BR2_GCC_VERSION=3.4.6 +# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set +BR2_EXTRA_GCC_CONFIG_OPTIONS= +# BR2_INSTALL_LIBSTDCPP is not set +# BR2_INSTALL_OBJC is not set + +# +# Ccache Options +# +BR2_CCACHE=y + +# +# Gdb Options +# +# BR2_PACKAGE_GDB is not set +# BR2_PACKAGE_GDB_SERVER is not set +# BR2_PACKAGE_GDB_HOST is not set + +# +# elf2flt +# +# BR2_ELF2FLT is not set + +# +# Common Toolchain Options +# +# BR2_PACKAGE_SSTRIP_TARGET is not set +# BR2_PACKAGE_SSTRIP_HOST is not set +BR2_ENABLE_MULTILIB=y +BR2_LARGEFILE=y +BR2_TARGET_OPTIMIZATION=-Os -pipe +BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y + +# +# Package Selection for the target +# + +# +# The default minimal system +# +BR2_PACKAGE_BUSYBOX=y +# BR2_PACKAGE_BUSYBOX_SNAPSHOT is not set +BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y +BR2_PACKAGE_BUSYBOX_CONFIG=package/busybox/busybox.config + +# +# The minimum needed to build a uClibc development system +# +# BR2_PACKAGE_BASH is not set +# BR2_PACKAGE_BZIP2 is not set +# BR2_PACKAGE_COREUTILS is not set +# BR2_PACKAGE_DIFFUTILS is not set +# BR2_PACKAGE_ED is not set +# BR2_PACKAGE_FINDUTILS is not set +# BR2_PACKAGE_FLEX is not set +# BR2_PACKAGE_GAWK is not set +# BR2_PACKAGE_GCC_TARGET is not set +# BR2_PACKAGE_CCACHE_TARGET is not set +# BR2_PACKAGE_GREP is not set +# BR2_PACKAGE_MAKE is not set +# BR2_PACKAGE_PATCH is not set +# BR2_PACKAGE_SED is not set +# BR2_PACKAGE_TAR is not set + +# +# Other
[XenPPC] [PATCH 1/10][TOOLS][XM-TEST] Update to use uClibc buildroot-snapshot
Update to use uClibc buildroot-snapshot. Dated file no longer exists on upstream server. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/Makefile.am |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/tools/xm-test/ramdisk/Makefile.am Tue Oct 17 19:04:46 2006 +0100 +++ b/tools/xm-test/ramdisk/Makefile.am Thu Oct 19 11:54:43 2006 +1000 @@ -2,9 +2,8 @@ INITRD ?= http://xm-test.xensource.com/r EXTRA_DIST = skel configs patches -BR_TAR = buildroot-20060606.tar.bz2 +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 ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 7/10][TOOLS][XM-TEST] Add ability to inspect messages from domain for arbitrary strings
Add ability to inspect messages from domain for arbitrary strings. Used on PowerPC to FAIL(), if the guest domain hits a BUG() and enters XMON. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/lib/XmTestLib/Console.py |5 + tools/xm-test/lib/XmTestLib/arch.py| 20 2 files changed, 25 insertions(+) --- a/tools/xm-test/lib/XmTestLib/Console.pyThu Oct 19 12:00:21 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/Console.pyThu Oct 19 12:09:21 2006 +1000 @@ -31,6 +31,7 @@ import fcntl import fcntl import select +import arch from Test import * TIMEDOUT = 1 @@ -120,6 +121,7 @@ class XmConsole: def __getprompt(self, fd): timeout = 0 bytes = 0 +buffer = while timeout 180: # eat anything while total bytes less than limit else raise RUNAWAY while (not self.limit) or (bytes self.limit): @@ -130,6 +132,7 @@ class XmConsole: if self.debugMe: sys.stdout.write(foo) bytes += 1 +buffer += foo except Exception, exn: raise ConsoleError(str(exn)) else: @@ -137,6 +140,8 @@ class XmConsole: else: raise ConsoleError(Console run-away (exceeded %i bytes) % self.limit, RUNAWAY) +# Check to see if the buffer contains anything interetsing +arch.checkBuffer(buffer) # press enter os.write(self.consoleFd, \n) # look for prompt diff -r 2cc5afde2692 -r 6bad455e70de tools/xm-test/lib/XmTestLib/arch.py --- a/tools/xm-test/lib/XmTestLib/arch.py Thu Oct 19 12:00:21 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/arch.py Thu Oct 19 12:09:21 2006 +1000 @@ -25,6 +25,8 @@ import config import config import commands +from Test import * + BLOCK_ROOT_DEV = hda # This isn't truly platform related but it makes the code tidier @@ -38,6 +40,9 @@ def getRdPath(): return rdpath # Begin: Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors +def ia_checkBuffer(buffer): +return + def ia_minSafeMem(): return 32 @@ -81,6 +86,19 @@ ia_HVMDefaults = {memory : # End : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors # Begin: PowerPC +def ppc_checkBuffer(buffer): +checks = [ +{pattern : re.compile(^\d+:mon\s*$, re.MULTILINE), + message : domain trapped into XMON}, +] + +for i in range(0, len(checks)): +check=checks[i] +if check.get('pattern').search(buffer): + FAIL(check.get('message')) + +return + def ppc_minSafeMem(): return 64 @@ -116,6 +134,7 @@ if _arch == x86 or _arch == ia64: if _arch == x86 or _arch == ia64: minSafeMem = ia_minSafeMem getDefaultKernel = ia_getDefaultKernel +checkBuffer = ia_checkBuffer if config.ENABLE_HVM_SUPPORT: configDefaults = ia_HVMDefaults else: @@ -123,6 +142,7 @@ elif _arch == powerpc: elif _arch == powerpc: minSafeMem = ppc_minSafeMem getDefaultKernel = ppc_getDefaultKernel +checkBuffer = ppc_checkBuffer configDefaults = ppc_ParavirtDefaults else: raise ValueError, Unknown architecture! ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 4/10][TOOLS][XM-TEST] Update .hgignore to remove artifacts of ramdisk build
Update .hgignore to remove artifacts of ramdisk build. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- .hgignore |9 + 1 file changed, 9 insertions(+) --- a/.hgignore Thu Oct 19 11:57:00 2006 +1000 +++ b/.hgignore Thu Oct 19 11:57:29 2006 +1000 @@ -184,6 +184,15 @@ ^tools/xentrace/xenctx$ ^tools/xentrace/xentrace$ ^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$ ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 5/10][TOOLS][XM-TEST] Refactor code to encapsulate architecture decisions in one place
Refactor code to encapsulate architecture decisions in one place. Also includes some whitespace fixes. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/lib/XmTestLib/XenDomain.py | 73 +++ tools/xm-test/lib/XmTestLib/arch.py| 102 + tools/xm-test/lib/XmTestReport/OSReport.py | 10 -- tools/xm-test/lib/XmTestReport/arch.py | 42 4 files changed, 161 insertions(+), 66 deletions(-) --- a/tools/xm-test/lib/XmTestLib/XenDomain.py Thu Oct 19 11:57:29 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py Thu Oct 19 11:58:17 2006 +1000 @@ -20,33 +20,22 @@ import sys import commands -import os import re import time from Xm import * +from arch import * from Test import * from config import * from Console import * from XenDevice import * -BLOCK_ROOT_DEV = hda - -def getDeviceModel(): -Get the path to the device model based on -the architecture reported in uname -arch = os.uname()[4] -if re.search(64, arch): -return /usr/lib64/xen/bin/qemu-dm -else: -return /usr/lib/xen/bin/qemu-dm def getDefaultKernel(): -Get the path to the default DomU kernel -dom0Ver = commands.getoutput(uname -r); -domUVer = dom0Ver.replace(xen0, xenU); - -return /boot/vmlinuz- + domUVer; +return arch.getDefaultKernel() + +def getRdPath(): +return arch.getRdPath() def getUniqueName(): Get a uniqueish name for use in a domain @@ -55,43 +44,8 @@ def getUniqueName(): test_name = re.sub(\.test, , test_name) test_name = re.sub([\/\.], , test_name) name = %s-%i % (test_name, unixtime) - + return name - -def getRdPath(): -rdpath = os.environ.get(RD_PATH) -if not rdpath: -rdpath = ../../ramdisk -rdpath = os.path.abspath(rdpath) - -return rdpath - -ParavirtDefaults = {memory : 64, -vcpus: 1, -kernel : getDefaultKernel(), -root : /dev/ram0, -ramdisk : getRdPath() + /initrd.img -} -HVMDefaults = {memory : 64, -vcpus: 1, -acpi : 0, -apic : 0, -disk : [file:%s/disk.img,ioemu:%s,w! % - (getRdPath(), BLOCK_ROOT_DEV)], -kernel : /usr/lib/xen/boot/hvmloader, -builder : hvm, -sdl : 0, -vnc : 0, -vncviewer: 0, -nographic: 1, -serial : pty, -device_model : getDeviceModel() -} - -if ENABLE_HVM_SUPPORT: -configDefaults = HVMDefaults -else: -configDefaults = ParavirtDefaults class XenConfig: An object to help create a xen-compliant config file @@ -140,7 +94,8 @@ class XenConfig: def setOpt(self, name, value): Set an option in the config -if name in self.opts.keys() and isinstance(self.opts[name], list) and not isinstance(value, list): +if name in self.opts.keys() and isinstance(self.opts[name] , +list) and not isinstance(value, list): self.opts[name] = [value] else: self.opts[name] = value @@ -177,7 +132,7 @@ class DomainError(Exception): self.errorcode = int(errorcode) except Exception, e: self.errorcode = -1 - + def __str__(self): return str(self.msg) @@ -199,7 +154,7 @@ class XenDomain: self.devices = {} self.netEnv = bridge -# Set domain type, either PV for ParaVirt domU or HVM for +# Set domain type, either PV for ParaVirt domU or HVM for # FullVirt domain if ENABLE_HVM_SUPPORT: self.type = HVM @@ -332,7 +287,8 @@ class XenDomain: class XmTestDomain(XenDomain): -def __init__(self, name=None, extraConfig=None, baseConfig=configDefaults): +def __init__(self, name=None, extraConfig=None, + baseConfig=arch.configDefaults): Create a new xm-test domain @param name: The requested domain name @param extraConfig: Additional configuration options @@ -351,11 +307,12 @@ class XmTestDomain(XenDomain): XenDomain.__init__(self, config.getOpt(name), config=config) def minSafeMem(self): -return 32 +return arch.minSafeMem class XmTestNetDomain(XmTestDomain): -def __init__(self, name=None, extraConfig=None, baseConfig=configDefaults): +def __init__(self, name=None, extraConfig=None, + baseConfig=arch.configDefaults): Create a new xm-test domain with one network device @param name: The requested domain name @param extraConfig: Additional configuration options diff -r
[XenPPC] [PATCH 9/10][TOOLS][XM-TEST] Default to appending to extra in XenConfig
Default to appending to extra in XenConfig. PowerPC needs console information from the command line. Resetting the whole command line causes false failures. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/lib/XmTestLib/XenDomain.py |3 +++ 1 file changed, 3 insertions(+) --- a/tools/xm-test/lib/XmTestLib/XenDomain.py Thu Oct 19 12:14:50 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py Thu Oct 19 17:01:02 2006 +1000 @@ -97,6 +97,9 @@ class XenConfig: if name in self.opts.keys() and isinstance(self.opts[name] , list) and not isinstance(value, list): self.opts[name] = [value] +# extra is special so append to it. +elif name == extra and name in self.opts.keys(): +self.opts[name] += %s % (value) else: self.opts[name] = value ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 0/10][TOOLS][XM-TEST] [v3] Update xm-test to support new architectures
Hi All, These patches update the xm-test code to be more easily portable to new architecture. This focus of this endeavor is PPC but I believe that IA64 also benefits. Patch summary: 1: Instead of using a dated snapshot (which no longer exists) use buildroot-snapshot. 2: Remove hardcoded references to i386. 3: Rename configs/buildroot - configs/buildroot-i386 and update Makefiles. 4: Update .hgignore to remove noise from the initrd building process 5: Refactor the XmTestLib and XmTestReport code to encapsulate all platform variations in one place. 6: Add powerpc definitions. 7: Allow inspection of boot buffers. Check for BUG()s and the like if wanted. 8: Update .hgignore 9: Treat the extra config item as special and always append to it. Needed for PPC, as the console is passed via the kernel command line. 10: Fix memory assumptions. Several of the create tests have ideas about minimal memory footprints, correct these assumptions. I've tested these patches on PPC and x86_32 with no regressions. With patches 1-6 applied it's simple enough to build a initrd for powerpc on and i386 machine: -=-=- cd .../tools/xm-test ./autogen ./configure cd ramdisk make BR_ARCH=powerpc -=-=- As discussed previously it'd be great if an initrd and buildroot tarball could be hosted on xensource. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- .hgignore | 10 tools/xm-test/lib/XmTestLib/Console.py|5 tools/xm-test/lib/XmTestLib/XenDomain.py | 76 -- tools/xm-test/lib/XmTestLib/arch.py | 148 tools/xm-test/lib/XmTestReport/OSReport.py| 10 tools/xm-test/lib/XmTestReport/arch.py| 48 + tools/xm-test/ramdisk/Makefile.am | 13 tools/xm-test/ramdisk/configs/buildroot | 330 - tools/xm-test/ramdisk/configs/buildroot-i386 | 330 + tools/xm-test/ramdisk/configs/buildroot-powerpc | 334 ++ tools/xm-test/tests/create/11_create_concurrent_pos.py|2 tools/xm-test/tests/create/12_create_concurrent_stress_pos.py | 11 tools/xm-test/tests/create/14_create_blockroot_pos.py | 11 tools/xm-test/tests/create/15_create_smallmem_pos.py |4 tools/xm-test/tests/create/16_create_smallmem_neg.py | 12 15 files changed, 923 insertions(+), 421 deletions(-) ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 10/10][TOOLS][XM-TEST] Fix Memory assumptions in the create tests
Fix Memory assumptions in the create tests. Use the architecture specified idea of minimum memory. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/tests/create/11_create_concurrent_pos.py|2 - tools/xm-test/tests/create/12_create_concurrent_stress_pos.py | 11 +++-- tools/xm-test/tests/create/14_create_blockroot_pos.py | 11 ++--- tools/xm-test/tests/create/15_create_smallmem_pos.py |4 +-- tools/xm-test/tests/create/16_create_smallmem_neg.py | 12 +- 5 files changed, 21 insertions(+), 19 deletions(-) --- a/tools/xm-test/tests/create/11_create_concurrent_pos.pyThu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/11_create_concurrent_pos.pyThu Oct 19 17:02:40 2006 +1000 @@ -16,7 +16,7 @@ else: MAX_DOMS = 50 MIN_DOMS= 5 -MEM_PER_DOM = 24 +MEM_PER_DOM = minSafeMem() domains = [] console = [] diff -r 69035d8a5f2a -r 2854ceda351e tools/xm-test/tests/create/12_create_concurrent_stress_pos.py --- a/tools/xm-test/tests/create/12_create_concurrent_stress_pos.py Thu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/12_create_concurrent_stress_pos.py Thu Oct 19 17:02:40 2006 +1000 @@ -8,10 +8,17 @@ import time import time DOMS=5 -MEM=32 +MEM=minSafeMem() DUR=60 domains = [] + +free_mem = int(getInfo(free_memory)) +NUM_DOMS = int(free_mem / MEM) + +if NUM_DOMS DOMS: +SKIP(Need %i MB of RAM to start [EMAIL PROTECTED] domains! (%i MB avail) % + (DOMS * MEM, DOMS, MEM, free_mem)) for i in range(0,DOMS): dom = XmTestDomain(extraConfig={memory : MEM}) @@ -44,7 +51,7 @@ for d, c in domains: if verbose: print Testing domain %s... % d.getName() - + run = c.runCmd(ls) if run[return] != 0: diff -r 69035d8a5f2a -r 2854ceda351e tools/xm-test/tests/create/14_create_blockroot_pos.py --- a/tools/xm-test/tests/create/14_create_blockroot_pos.py Thu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/14_create_blockroot_pos.py Thu Oct 19 17:02:40 2006 +1000 @@ -18,17 +18,12 @@ rdpath = getRdPath() # print Using %s % output if ENABLE_HVM_SUPPORT: -domain = XmTestDomain(name=14_create_blockroot) +config = None else: -config = {memory : 64, - root : /dev/hda1, - name : 14_create_blockroot, - kernel : getDefaultKernel(), +config = {root : /dev/hda1, disk : file:%s/initrd.img,hda1,w % rdpath } -domConfig = XenConfig() -domConfig.setOpts(config) -domain = XenDomain(name=domConfig.getOpt(name), config=domConfig) +domain = XmTestDomain(name=14_create_blockroot, extraConfig=config) try: console = domain.start() diff -r 69035d8a5f2a -r 2854ceda351e tools/xm-test/tests/create/15_create_smallmem_pos.py --- a/tools/xm-test/tests/create/15_create_smallmem_pos.py Thu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/15_create_smallmem_pos.py Thu Oct 19 17:02:40 2006 +1000 @@ -5,8 +5,8 @@ from XmTestLib import * -# 32MBs is the default lower limit for creating domains, it should work -MEM = 32 +# Create a domain with the minimum memory allocation +MEM = minSafeMem() domain = XmTestDomain(extraConfig={memory: MEM, extra :mem=%iM % MEM}) diff -r 69035d8a5f2a -r 2854ceda351e tools/xm-test/tests/create/16_create_smallmem_neg.py --- a/tools/xm-test/tests/create/16_create_smallmem_neg.py Thu Oct 19 17:01:02 2006 +1000 +++ b/tools/xm-test/tests/create/16_create_smallmem_neg.py Thu Oct 19 17:02:40 2006 +1000 @@ -3,11 +3,11 @@ # Copyright (C) International Business Machines Corp., 2005 # Author: Dan Smith [EMAIL PROTECTED] +import re from XmTestLib import * -# This is under the default lower limit of 32 and we expect this test -# to fail. 16MBs isn't enough for the -xen kernel. -MEM = 16 +# Create a domaain without enough memory. +MEM = minSafeMem() - 1 domain = XmTestDomain(extraConfig={memory: MEM, extra :mem=%iM % MEM}) @@ -16,13 +16,13 @@ try: console = domain.start() console.runCmd(ls) except DomainError, e: -FAIL(Unable to start a domain with %i MB % MEM) +if not re.search('^Error: Domain memory must be at least \d+ KB', e.extra): +FAIL(Unable to start a domain with %i MB % MEM) except ConsoleError, e: if e.reason == RUNAWAY: print Domain with %i MB has runaway console as expected % MEM -else: -print Starting a domain with %i MB failed as expected % MEM else: FAIL(Starting a console with %i MB passed, expected test to fail % MEM) +print Starting a domain with %i MB failed as expected % MEM domain.destroy() ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 2/10][TOOLS][XM-TEST] Remove hard coded reference to i386
Remove hard coded reference to i386. In preparation for other architectures. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/Makefile.am |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/tools/xm-test/ramdisk/Makefile.am Thu Oct 19 11:54:43 2006 +1000 +++ b/tools/xm-test/ramdisk/Makefile.am Thu Oct 19 11:55:18 2006 +1000 @@ -2,12 +2,14 @@ INITRD ?= http://xm-test.xensource.com/r EXTRA_DIST = skel configs patches +BR_ARCH = $(shell uname -m | sed -e s/i.86/i386/) + BR_TAR = buildroot-snapshot.tar.bz2 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR) BR_SRC = buildroot -BR_IMG = $(BR_SRC)/rootfs.i386.ext2 +BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2 -BR_ROOT = build_i386/root +BR_ROOT = build_$(BR_ARCH)/root HVM_SCRIPT = bin/create_disk_image ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH] Fix build breakage in powerpc64/xc_linux_build.c
The patch [SOLARIS] Don't build ptrace code on Solaris. from xen-unstable now causes siginfo.h to be included which #defines si_addr to _sifields._sigfault.si_addr. and breaks the build of powerpc64/xc_linux_build.c. This patch renames si_addr - start_info_addr si - start_info (for consistency) and start_info - si (in load_devtree beuse of the renaming above) Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/libxc/powerpc64/xc_linux_build.c | 59 - 1 file changed, 30 insertions(+), 29 deletions(-) --- diff -r a1fdeb2c6d77 tools/libxc/powerpc64/xc_linux_build.c --- a/tools/libxc/powerpc64/xc_linux_build.cTue Oct 17 16:44:57 2006 -0400 +++ b/tools/libxc/powerpc64/xc_linux_build.cWed Oct 18 11:29:52 2006 +1000 @@ -167,10 +167,10 @@ static int load_devtree( unsigned long devtree_addr, uint64_t initrd_base, unsigned long initrd_len, -start_info_t *si, -unsigned long si_addr) -{ -uint32_t start_info[4] = {0, si_addr, 0, 0x1000}; +start_info_t *start_info __attribute__((unused)), +unsigned long start_info_addr) +{ +uint32_t si[4] = {0, start_info_addr, 0, 0x1000}; struct boot_param_header *header; void *chosen; void *xen; @@ -215,8 +215,7 @@ static int load_devtree( } /* start-info (XXX being removed soon) */ -rc = ft_set_prop(devtree, xen, start-info, -start_info, sizeof(start_info)); +rc = ft_set_prop(devtree, xen, start-info, si, sizeof(si)); if (rc 0) { DPRINTF(couldn't set /xen/start-info\n); return rc; @@ -349,18 +348,19 @@ out: return rc; } -static unsigned long create_start_info(void *devtree, start_info_t *si, +static unsigned long create_start_info(void *devtree, start_info_t *start_info, unsigned int console_evtchn, unsigned int store_evtchn, unsigned long nr_pages) { void *rma; -unsigned long si_addr; +unsigned long start_info_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); +memset(start_info, 0, sizeof(*start_info)); +snprintf(start_info-magic, sizeof(start_info-magic), + xen-%d.%d-powerpc64HV, 3, 0); rma = ft_find_node(devtree, /[EMAIL PROTECTED]); if (rma == NULL) { @@ -375,22 +375,22 @@ static unsigned long create_start_info(v rma_top = rma_reg[0] + rma_reg[1]; DPRINTF(RMA top = 0x%PRIX64\n, rma_top); -si-nr_pages = nr_pages; -si-shared_info = rma_top - PAGE_SIZE; -si-store_mfn = (rma_top PAGE_SHIFT) - 2; -si-store_evtchn = store_evtchn; -si-console.domU.mfn = (rma_top PAGE_SHIFT) - 3; -si-console.domU.evtchn = console_evtchn; -si_addr = rma_top - 4*PAGE_SIZE; - -rc = ft_set_rsvmap(devtree, 0, si_addr, 4*PAGE_SIZE); +start_info-nr_pages = nr_pages; +start_info-shared_info = rma_top - PAGE_SIZE; +start_info-store_mfn = (rma_top PAGE_SHIFT) - 2; +start_info-store_evtchn = store_evtchn; +start_info-console.domU.mfn = (rma_top PAGE_SHIFT) - 3; +start_info-console.domU.evtchn = console_evtchn; +start_info_addr = rma_top - 4*PAGE_SIZE; + +rc = ft_set_rsvmap(devtree, 0, start_info_addr, 4*PAGE_SIZE); if (rc 0) { DPRINTF(couldn't set start_info reservation\n); return ~0UL; } -return si_addr; +return start_info_addr; } static int get_page_array(int xc_handle, int domid, xen_pfn_t **page_array, @@ -438,7 +438,7 @@ int xc_linux_build(int xc_handle, unsigned long *console_mfn, void *devtree) { -start_info_t si; +start_info_t start_info; struct domain_setup_info dsi; xen_pfn_t *page_array = NULL; unsigned long nr_pages; @@ -446,7 +446,7 @@ int xc_linux_build(int xc_handle, unsigned long kern_addr; unsigned long initrd_base = 0; unsigned long initrd_len = 0; -unsigned long si_addr; +unsigned long start_info_addr; int rc = 0; DPRINTF(%s\n, __func__); @@ -473,12 +473,12 @@ int xc_linux_build(int xc_handle, } /* start_info stuff: about to be removed */ -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, -sizeof(start_info_t))) { +start_info_addr = create_start_info(devtree, start_info, console_evtchn, +store_evtchn, nr_pages); +*console_mfn = page_array[start_info.console.domU.mfn]; +*store_mfn = page_array[start_info.store_mfn]; +if (install_image(xc_handle, domid, page_array, start_info, + start_info_addr, sizeof(start_info_t))) { rc = -1; goto out; } @@ -487,7 +487,8 @@ int xc_linux_build(int
[XenPPC] [PATCH linux.hg] fix typo in HYPERVISOR_memory_op()
Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- arch/powerpc/platforms/xen/hcall.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- diff -r 933613959bf6 arch/powerpc/platforms/xen/hcall.c --- a/arch/powerpc/platforms/xen/hcall.cWed Oct 04 11:20:16 2006 -0400 +++ b/arch/powerpc/platforms/xen/hcall.cFri Oct 06 13:34:13 2006 +1000 @@ -514,7 +514,7 @@ int HYPERVISOR_memory_op(unsigned int cm cmd, NULL); break; default: - printk(KERN_ERR %s: unknown grant table op %d\n, __func__, cmd); + printk(KERN_ERR %s: unknown memory op %d\n, __func__, cmd); ret = -ENOSYS; } xencomm_free(op_desc); 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] [PATCH] Teach xm-test about Xmon.
If using a kernel with xmon enabled, when triggering a BUG() we enter xmon. This effectively stalls the xm-tests process. This patch teaches xm-test to recognise the xmon prompt and FAIL the test. This patch requires applies on top of my previous xm-test patches Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/lib/XmTestLib/Console.py |5 + tools/xm-test/lib/XmTestLib/arch.py| 20 2 files changed, 25 insertions(+) --- diff -r 21738b37ac32 tools/xm-test/lib/XmTestLib/Console.py --- a/tools/xm-test/lib/XmTestLib/Console.pyWed Oct 04 14:54:10 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/Console.pyThu Oct 05 13:15:49 2006 +1000 @@ -31,6 +31,7 @@ import fcntl import fcntl import select +import arch from Test import * TIMEDOUT = 1 @@ -120,6 +121,7 @@ class XmConsole: def __getprompt(self, fd): timeout = 0 bytes = 0 +buffer = while timeout 180: # eat anything while total bytes less than limit else raise RUNAWAY while (not self.limit) or (bytes self.limit): @@ -130,6 +132,7 @@ class XmConsole: if self.debugMe: sys.stdout.write(foo) bytes += 1 +buffer += foo except Exception, exn: raise ConsoleError(str(exn)) else: @@ -137,6 +140,8 @@ class XmConsole: else: raise ConsoleError(Console run-away (exceeded %i bytes) % self.limit, RUNAWAY) +# Check to see if the buffer contains anything interetsing +arch.checkBuffer(buffer) # press enter os.write(self.consoleFd, \n) # look for prompt diff -r 21738b37ac32 tools/xm-test/lib/XmTestLib/arch.py --- a/tools/xm-test/lib/XmTestLib/arch.py Wed Oct 04 14:54:10 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/arch.py Thu Oct 05 13:15:49 2006 +1000 @@ -25,6 +25,8 @@ import config import config import commands +from Test import * + BLOCK_ROOT_DEV = hda # This isn't truly platform related but it makes the code tidier @@ -38,6 +40,9 @@ def getRdPath(): return rdpath # Begin: Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors +def ia_checkBuffer(buffer): +return + def ia_minSafeMem(): return 32 @@ -81,6 +86,19 @@ ia_HVMDefaults = {memory : # End : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors # Begin: PowerPC +def ppc_checkBuffer(buffer): +checks = [ +{pattern : re.compile(^\d+:mon\s*$, re.MULTILINE), + message : domain trapped into XMON}, +] + +for i in range(0, len(checks)): +check=checks[i] +if check.get('pattern').search(buffer): + FAIL(check.get('message')) + +return + def ppc_minSafeMem(): return 64 @@ -116,6 +134,7 @@ if _arch == x86 or _arch == ia64: if _arch == x86 or _arch == ia64: minSafeMem = ia_minSafeMem getDefaultKernel = ia_getDefaultKernel +checkBuffer = ia_checkBuffer if config.ENABLE_HVM_SUPPORT: configDefaults = ia_HVMDefaults else: @@ -123,6 +142,7 @@ elif _arch == powerpc: elif _arch == powerpc: minSafeMem = ppc_minSafeMem getDefaultKernel = ppc_getDefaultKernel +checkBuffer = ppc_checkBuffer configDefaults = ppc_ParavirtDefaults else: raise ValueError, Unknown architecture! 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: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Wed, Oct 04, 2006 at 07:36:08AM -0400, Jimi Xenidis wrote: I think hollis nailed correctly, does it work for everyone? Works for me. 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: [PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Wed, Oct 04, 2006 at 11:57:45PM -0400, Amos Waterland wrote: Did you try building with debug=y, then with debug=n, with no intervening `make clean'? Yup. [EMAIL PROTECTED]:~/Xen/xenppc-unstable.hg.working$ history | egrep dist-xen snip Older stuff 562 make clean; PATH=/usr/bin:/bin make dist-xen 563 make clean; PATH=/usr/bin:/bin make debug=y dist-xen 564 make clean; PATH=/usr/bin:/bin make debug=y crash_debug=y dist-xen where xenppc-unstable.hg.working is 1b759b2522cd tip 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
[PATCH] Re: [XenPPC] XenPPC: redundancy definition of __trap_to_gdb with CRASH_DEBUG
On Tue, Oct 03, 2006 at 02:56:14PM -0400, Amos Waterland wrote: I'm not positive of this, but I'm pretty sure that this is caused by improper dependency checking. I suspect that you changed from debug=n to debug=y and got this. I'd suggest doing a `make clean' and trying again without your patch. I came accross the same probelm with a clean build. The patch below fixes it for me. Reorder includes to help the complier and avoid redundat definition of __trap_to_gdb. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- xen/arch/powerpc/gdbstub.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- diff -r d1374d869111 xen/arch/powerpc/gdbstub.c --- a/xen/arch/powerpc/gdbstub.cWed Oct 04 13:44:07 2006 +1000 +++ b/xen/arch/powerpc/gdbstub.cWed Oct 04 14:46:07 2006 +1000 @@ -20,12 +20,12 @@ #include xen/types.h #include xen/lib.h -#include xen/gdbstub.h #include public/xen.h #include asm/msr.h #include asm/bitops.h #include asm/cache.h #include asm/debugger.h +#include xen/gdbstub.h #include asm/processor.h asm(.globl trap_instruction\n 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] xm-test can panic Xen on JS20
Hi All, I've just opened bug 787[1] for tracking down this problem. Quoting from my bug report: == When running create/13_create_multinic_pos.test xen will panic as it calls guest_physmap_remove_page(). --- (XEN) (XEN) Panic on CPU 0: (XEN) guest_physmap_remove_page (XEN) (XEN) (XEN) Reboot in five seconds.. --- I've added a BUG() statement to guest_physmap_remove_page() and get the following backtrace. --- (XEN) BUG at mm.c:382 (XEN) [F7C0] 0043276C .__force_crash+0x18/0x28 (XEN) [F840] 00432744 .__bug+0x40/0x50 (XEN) [F8C0] 00442F50 .guest_physmap_remove_page+0x2c/0x3c (XEN) [F940] 00414168 .guest_remove_page+0x1d0/0x20c (XEN) [F9E0] 0041497C .decrease_reservation+0xf8/0x198 (XEN) [FAB0] 00415E70 .do_memory_op+0x328/0x69c (XEN) [FC00] 0043D45C .hcall_xen+0xcc/0xfc (XEN) [FC90] 0043D580 .do_hcall+0x54/0x84 (XEN) [FD20] 00451348 ex_hcall_continued+0xe4/0xf4 (XEN) [0043BEC0] 800100017C0802A6 (XEN) SP (60004bd8) is not in xen space (XEN) program_exception: type: 0x700 (XEN) [ Xen-3.0-unstable ] (XEN) CPU: DOMID: 0002 (XEN) pc 0043276c msr 90029002 (XEN) lr 0043276c ctr 00432bcc (XEN) srr0 srr1 (XEN) r00: 0043276c f7c0 00744a78 90009002 (XEN) r04: 0001 (XEN) r08: 0074a21c 0074a21c 0074a21c (XEN) r12: 0043d52c 9080 (XEN) r16: c3fc0e70 c3fc26a0 c3fc (XEN) r20: 4000 0040 (XEN) r24: 0040 c3fc0620 c3fc0620 003f (XEN) r28: 0001 c0546248 f7c0 (XEN) dar 0xd008, dsisr 0x4200 (XEN) hid4 0x6e42 (XEN) ---[ backtrace ]--- (XEN) [F840] 00432744 .__bug+0x40/0x50 (XEN) [F8C0] 00442F50 .guest_physmap_remove_page+0x2c/0x3c (XEN) [F940] 00414168 .guest_remove_page+0x1d0/0x20c (XEN) [F9E0] 0041497C .decrease_reservation+0xf8/0x198 (XEN) [FAB0] 00415E70 .do_memory_op+0x328/0x69c (XEN) [FC00] 0043D45C .hcall_xen+0xcc/0xfc (XEN) [FC90] 0043D580 .do_hcall+0x54/0x84 (XEN) [FD20] 00451348 ex_hcall_continued+0xe4/0xf4 (XEN) [0043BEC0] 800100017C0802A6 (XEN) SP (60004bd8) is not in xen space (XEN) machine_halt called --- To reproduce: * cd .../tools/xm-test * create grouptest/test containing create 13_create_multinic_pos.test * ./runtest.sh -d -e [EMAIL PROTECTED] -g test bang [1] http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=787 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] Re: [Xen-devel] [PATCH 0/6][TOOLS][XM-TEST] Update xm-test to support new architectures
On Fri, Sep 29, 2006 at 08:56:54PM +1100, Tony Breeds wrote: Hi All, These patches update the xm-test code to be more easily portable to new architecture. This focus od this endevour is PPC but I believe that IA64 also benifits. snip By way of a quick status report. With all thee patches applied to tip (7de08aceff6d) I ran: I build xm-test: cd xen.hg/tools/xm-test ./autogen ./configure INITRD=http://ozlabs.au.ibm.com/~tony/xm-test/; make existing I created a grouptest/xenppc file which contains most[1] of the potential tests and pushed the whole xm-test dir (yes it's wasteful but it's also easy) to my JS20 blade. Then: ./runtest.sh -d -e [EMAIL PROTECTED] -g xenppc xenppc creates the following report. --- Xm-test execution summary: PASS: 48 FAIL: 17 XPASS: 0 XFAIL: 0 Details: FAIL: 01_block_attach_device_pos block-attach failed device did not switch to Connected state FAIL: 02_block_attach_file_device_pos block-attach failed device did not switch to Connected state FAIL: 04_block_attach_device_repeatedly_pos Device is not actually attached to domU FAIL: 05_block_attach_and_dettach_device_repeatedly_pos block-attach failed device did not switch to Connected state FAIL: 09_block_attach_and_dettach_device_check_data_pos block-attach failed device did not switch to Connected state FAIL: 01_block-destroy_btblock_pos block device isn't attached; can't detach! FAIL: 02_block-destroy_rtblock_pos block-attach failed device did not switch to Connected state FAIL: 05_block-destroy_byname_pos block device isn't attached; can't detach! FAIL: 06_block-destroy_check_list_pos block-attach failed device did not switch to Connected state FAIL: 01_block_device_read_verify block-attach failed device did not switch to Connected state FAIL: 02_block_device_write_verify block-attach failed device did not switch to Connected state FAIL: 01_block-list_pos Failed to verify that block dev is attached on DomainU FAIL: 02_block-list_attachbd_pos block-attach failed device did not switch to Connected state FAIL: 03_block-list_anotherbd_pos Failed to verify that block dev is attached on DomainU FAIL: 06_block-list_checkremove_pos block-attach failed device did not switch to Connected state FAIL: 01_memset_basic_pos Invalid domU meminfo line FAIL: 03_memset_random_pos Invalid domU meminfo line --- You'd certainly expect the block-* tests to fail. I don't know why the memset tests failed but I'll find out next week when I'm back at work. [1] I omitted create/destroy, save/restore, network* and the scheduler tests becuase I know some of them crash the machine, attached is the xenppc file I used. Yours Tony linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/ Jan 15-20 2007 The Australian Linux Technical Conference! block-create block-destroy block-integrity block-list console dmesg domid domname help info list memmax memset pause unpause reboot shutdown sysrq vcpu-disable vcpu-pin vtpm ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 1/6][TOOLS][XM-TEST] Update to use uClib buildroot-snapshot
Update to use uClib buildroot-snapshot. Dated file no longer exists on upstream server. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/Makefile.am |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff -r 500043f8ccff -r 3207a28bb29d tools/xm-test/ramdisk/Makefile.am --- a/tools/xm-test/ramdisk/Makefile.am Thu Sep 28 12:47:45 2006 -0700 +++ b/tools/xm-test/ramdisk/Makefile.am Fri Sep 29 15:51:20 2006 +1000 @@ -2,9 +2,8 @@ INITRD ?= http://xm-test.xensource.com/r EXTRA_DIST = skel configs patches -BR_TAR = buildroot-20060606.tar.bz2 +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 ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 2/6][TOOLS][XM-TEST] Remove hard coded reference to i386
Remove hard coded reference to i386. In preperation for other architectures. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/ramdisk/Makefile.am |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff -r 3207a28bb29d -r 5017ce424246 tools/xm-test/ramdisk/Makefile.am --- a/tools/xm-test/ramdisk/Makefile.am Fri Sep 29 15:51:20 2006 +1000 +++ b/tools/xm-test/ramdisk/Makefile.am Fri Sep 29 15:52:31 2006 +1000 @@ -2,12 +2,14 @@ INITRD ?= http://xm-test.xensource.com/r EXTRA_DIST = skel configs patches +BR_ARCH = $(shell uname -m | sed -e s/i.86/i386/) + BR_TAR = buildroot-snapshot.tar.bz2 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR) BR_SRC = buildroot -BR_IMG = $(BR_SRC)/rootfs.i386.ext2 +BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2 -BR_ROOT = build_i386/root +BR_ROOT = build_$(BR_ARCH)/root HVM_SCRIPT = bin/create_disk_image ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [PATCH 5/6][TOOLS][XM-TEST] Refactor code to encapsulate architecture decisions in one place
Refactor code to encapsulate architecture decisions in one place. Also includes some whitespace fixes. Signed-off-by: Tony Breeds [EMAIL PROTECTED] --- tools/xm-test/lib/XmTestLib/XenDomain.py | 72 +++--- tools/xm-test/lib/XmTestLib/arch.py| 103 + tools/xm-test/lib/XmTestReport/OSReport.py | 10 -- tools/xm-test/lib/XmTestReport/arch.py | 42 4 files changed, 163 insertions(+), 64 deletions(-) diff -r 8fd3e1ce2f9f -r 989b397808f8 tools/xm-test/lib/XmTestLib/XenDomain.py --- a/tools/xm-test/lib/XmTestLib/XenDomain.py Fri Sep 29 15:57:28 2006 +1000 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py Fri Sep 29 17:11:31 2006 +1000 @@ -20,33 +20,25 @@ import sys import commands -import os import re import time from Xm import * +from arch import * from Test import * from config import * from Console import * from XenDevice import * -BLOCK_ROOT_DEV = hda def getDeviceModel(): -Get the path to the device model based on -the architecture reported in uname -arch = os.uname()[4] -if re.search(64, arch): -return /usr/lib64/xen/bin/qemu-dm -else: -return /usr/lib/xen/bin/qemu-dm +return arch.getDeviceModel() def getDefaultKernel(): -Get the path to the default DomU kernel -dom0Ver = commands.getoutput(uname -r); -domUVer = dom0Ver.replace(xen0, xenU); - -return /boot/vmlinuz- + domUVer; +return arch.getDefaultKernel() + +def getRdPath(): +return arch.getRdPath() def getUniqueName(): Get a uniqueish name for use in a domain @@ -55,43 +47,8 @@ def getUniqueName(): test_name = re.sub(\.test, , test_name) test_name = re.sub([\/\.], , test_name) name = %s-%i % (test_name, unixtime) - + return name - -def getRdPath(): -rdpath = os.environ.get(RD_PATH) -if not rdpath: -rdpath = ../../ramdisk -rdpath = os.path.abspath(rdpath) - -return rdpath - -ParavirtDefaults = {memory : 64, -vcpus: 1, -kernel : getDefaultKernel(), -root : /dev/ram0, -ramdisk : getRdPath() + /initrd.img -} -HVMDefaults = {memory : 64, -vcpus: 1, -acpi : 0, -apic : 0, -disk : [file:%s/disk.img,ioemu:%s,w! % - (getRdPath(), BLOCK_ROOT_DEV)], -kernel : /usr/lib/xen/boot/hvmloader, -builder : hvm, -sdl : 0, -vnc : 0, -vncviewer: 0, -nographic: 1, -serial : pty, -device_model : getDeviceModel() -} - -if ENABLE_HVM_SUPPORT: -configDefaults = HVMDefaults -else: -configDefaults = ParavirtDefaults class XenConfig: An object to help create a xen-compliant config file @@ -140,7 +97,8 @@ class XenConfig: def setOpt(self, name, value): Set an option in the config -if name in self.opts.keys() and isinstance(self.opts[name], list) and not isinstance(value, list): +if name in self.opts.keys() and isinstance(self.opts[name] , +list) and not isinstance(value, list): self.opts[name] = [value] else: self.opts[name] = value @@ -177,7 +135,7 @@ class DomainError(Exception): self.errorcode = int(errorcode) except Exception, e: self.errorcode = -1 - + def __str__(self): return str(self.msg) @@ -199,7 +157,7 @@ class XenDomain: self.devices = {} self.netEnv = bridge -# Set domain type, either PV for ParaVirt domU or HVM for +# Set domain type, either PV for ParaVirt domU or HVM for # FullVirt domain if ENABLE_HVM_SUPPORT: self.type = HVM @@ -332,7 +290,8 @@ class XenDomain: class XmTestDomain(XenDomain): -def __init__(self, name=None, extraConfig=None, baseConfig=configDefaults): +def __init__(self, name=None, extraConfig=None, + baseConfig=arch.configDefaults): Create a new xm-test domain @param name: The requested domain name @param extraConfig: Additional configuration options @@ -351,11 +310,12 @@ class XmTestDomain(XenDomain): XenDomain.__init__(self, config.getOpt(name), config=config) def minSafeMem(self): -return 32 +return arch.minSafeMem class XmTestNetDomain(XmTestDomain): -def __init__(self, name=None, extraConfig=None, baseConfig=configDefaults): +def __init__(self, name=None, extraConfig=None, + baseConfig=arch.configDefaults): Create a new xm-test domain with one network device
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 6mpic: 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: [XenPPC] heads up: large nasty merge
On Wed, Sep 06, 2006 at 09:16:01AM -0500, Hollis Blanchard wrote: Sorry all, there were in fact a whole bunch of files I forgot to check in. (It doesn't help that hg status on a built tree is full of noise.) I do my linux builds into a scratch area, for just this reason. I've included my xen_build script in case it's of any use as a base for everyone else. Anyways, this should be fixed now. All builds and boots. Thanks Hollis. --- #!/bin/bash _clean=0 _debug=0 _path=~/Xen _full=0 _kbuild_dom0='/scratch/tony/xen_kernels/dom0' _kbuild_domU='/scratch/tony/xen_kernels/domU' set -- $( getopt cdp: [EMAIL PROTECTED] ) while [ -n $1 ] ; do case $1 in -c) _clean=1 ;; -d) _debug=1 ;; -p) _path=$2 shift ;; -f) _full=1 ;; esac shift done set -x pushd . # Build Linux dom{0,U} and Xen # Linux - dom0 cd ${_path}/linux-ppc-2.6.hg.working # don't make mrpropper, as that kills the .config with my custom # default commandline if [ $_clean -ne 0 ] ; then make O=${_kbuild_dom0} ARCH=powerpc clean fi make O=${_kbuild_dom0} ARCH=powerpc zImage ## FIXME: why? this seems just plain wrong. # The built in commandline seems to break domU, so build a bog # std. domU kernel. # Linux - domU cd ${_path}/linux-ppc-2.6.hg.working if [ $_clean -ne 0 ] ; then make O=${_kbuild_domU} ARCH=powerpc mrproper make O=${_kbuild_domU} ARCH=powerpc xen_maple_defconfig fi make O=${_kbuild_domU} ARCH=powerpc zImage # Build XEN cd ${_path}/xenppc-unstable.hg.working/ [ $_clean -ne 0 ] make clean make debug=y optimize=0 crash_debug=y \ CMDLINE=console=com1 gdb=com1 earlygdb=y \ DOM0_IMAGE=${_kbuild_dom0}/arch/powerpc/boot/zImage dist-xen # Always rebuilf the tools. make debug=y optimize=0 crash_debug=y -C tools clean make debug=y optimize=0 crash_debug=y dist-tools # If asked nicely builkd the debug stuff aswell if [ $_debug -ne 0 ] ; then make cscope make debug fi # Display status data for quick checking # Linux - dom0 cd ${_path}/linux-ppc-2.6.hg.working readelf -a ${_kbuild_dom0}/vmlinux | egrep xen_guest # Linux - domU # Xen cd ${_path}/xenppc-unstable.hg.working/xen md5sum xen # Distribute files # Linux - dom0 # Linux - domU rsync -aze ssh ${_kbuild_domU}/vmlinux.strip [EMAIL PROTECTED]:/root # Xen cd ${_path}/xenppc-unstable.hg.working rsync -aze ssh xen/xen bran: rsync -aze ssh dist install.sh [EMAIL PROTECTED]:/scratch/xen_install/ popd --- 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] Accessing the Xen GDB-stub
Hello All, As many of you know I've been looking at getting access to hypervisor via the GDB stub in Xen. This is a brain dump, of what I learned trying to get this tested. Firstly a summary of GDB stub and technology available from Jimi, in response to some confused queries from me. quote who=jimi ok.. I can understand the confusion here so lets spell it out. GDB can debug anything thru any channel. Typically it uses the ptrace (2) syscall to debug an app on the same OS, however there is a remote protocol[1] that can go over any transport (socket, serial, etc...). The other end of the transport is a small piece of code (we call the gdb-stub) accepts commands over the transport and probes the machine. At a bare minimum, this code needs to be able to read/write registers and read/write memory, the ability to perform these functions we can call the probe and it provides the low lever interface to the gdb-stub. So, the gdb stub can be considered a translation layer between the gdb protocol over some transport to the interfaces provided by the probe, the protocoal is documented here: In our development there are quite a few stubs: 1) Mambo/Systemsim Mambo provides a gdb-stub that uses mambo internal probing interfaces so gdb can debug whatever code the simulator is running. 2) HW probe RiscWatch/JTAG gives us the ability to probe the CPU and memory. We have some python code (xen/tools/gpproxy) that is a gdb-stub that attaches to the HW probe. 3) Xen (and the code in Xen) Xen will trap into an exception level debug handler (sort of like xmon) and can probe the normal running state of Xen. This debug handler uses the serial port to provide a gdb-stub so that gdb can debug Xen. 4) Dom0/Xen There are hypervisor calls that provide interfaces that can probe a DomU. There is a a Dom0 application that provides a gdb-stub that uses these hcalls to probe a DomU. /quote The rest of this email pertains to item 3, with real hardware and Mambo. Step one : Build Xen with debugging and crash_dump -+ I build xen with: make debug=y optimize=0 crash_debug=y \ CMDLINE=console=com1 gdb=com1 earlygdb=y \ Any other args you need to get a working xen Booting this xen binary will result in com1 being used for xen/dom0 consoles and GDB. Also xen will trap into the GDB-stub quickly after boot: --- snip (XEN) Physical RAM map: (XEN) End of RAM: 512MB (524288kB) (XEN) total_pages: 0x0001c000 (XEN) free_xenheap: 0x9000 - 0x40 (XEN) Xen heap: 63MB (65500kB) (XEN) free_xenheap: 0x6f7000 - 0x400 (XEN) free_xenheap: Go around the devtree: 0x6f7000 - 0x727000 (XEN) Domheap pages: 0x1ba00 442MB (452608kB) (XEN) CPU #0: Hello World! SP = 471e00 TOC = 6e82c8 HID0 = 5101818000 (XEN) GDB stub initialised. (XEN) GDB connection activated. (XEN) PC: 0x00456dcc MSR: 0x90021000 (XEN) LR: 0x00456db4 CTR: 0x00432f70 (XEN) CR: 0x2484 XER: 0x000f skip 32 GPRs (XEN) Waiting for GDB to attach... --- Step two : Configure GDB -+ I've tested this with a range and GDBs (from 6.2.1 - current CVS head). I recommend 6.5. Current CVS head doesn't work with, but I don't think its a Xen specific problem. I have the following in my .gdbinit file. --- #set debug remote 1 set remotelogfile ~/tmp/gdb_remote.log set remotetimeout 0 #show debug remote show remotelogfile show remotetimeout --- Jimi also provides a .gdbinit file that explicitly tells GDB about some of Xen's quirks at: http://lists.xensource.com/archives/html/xen-ppc-devel/2006-06/msg00271.html Step three : Connect. ---+ If you're using Mambo the easiest way is to boot to this point and add an additional and connect GDB to that. Something like: mambo: after (XEN) Waiting for GDB to attach... [^C mambo] systemsim % mysim console create 0 inout listen 1234 (gdb) target remote :1234 systemsim % mysim go If you're working with real hardware then you need a little bit of help. That's where gdbproxy[2] comes in. As the JS20s (and JS21s) don't have real serial ports you need to connect to the blade console via SOL. I've written a application SOL-connect that telnets to the blade management module, authenticates[3] and opens a console on the blade. I wrote this for my environment so it's needs to be customised for each user/blade (sorry). gdbproxy itself spawns a connection proxy (perhaps SOL-connect ;P) and then listens on port 1234 for a GDB to attach. Aside from this complexity in connecting the XEN gdb-stub to a GDB process, the stub seems to work, for all the minor testing I've played with. If people think gdbproxy is useful, I'll clean it up and then provide a patch set to add it to xen. I hope this helps. Please provide feedback and I'll place all this up on the wiki. [1] http://sources.redhat.com/gdb/current/onlinedocs/gdb_33.html#SEC664 [2] Attached and
[XenPPC] [RFC] GDB O packets
Hello All, When GDB is atatched to the serial console you loose the output from printk()'s. Below is a quick patch that uses GDBs O packet to pass this data out to GDB. Currently it only works for Xen printk()'s (I'll work on dom0). It's not complete but I'll dump it here for a quick review to ensure I'm not doing anything too horrendous. --- diff -r f8233165fb80 xen/common/gdbstub.c --- a/xen/common/gdbstub.c Sun Aug 27 16:12:00 2006 -0400 +++ b/xen/common/gdbstub.c Mon Aug 28 17:07:02 2006 +1000 @@ -470,6 +470,28 @@ __gdb_ctx = { }; static struct gdb_context *gdb_ctx = __gdb_ctx; +/* FIXME: const? */ +/* FIXME: does this need to be protected by a lock? + *Can it clobber another packet? */ +void +gdb_puts(const char *str) +{ +char *p; + +/* FIXME Also check that console=gdb */ +if ( gdb_ctx-currently_attached ) { + gdb_start_packet(gdb_ctx); +gdb_write_to_packet_char('O', gdb_ctx); + +for(p=(char *)str; *p != '\x0'; p++) { + gdb_write_to_packet_char(hex2char((*p4) 0x0f), gdb_ctx ); + gdb_write_to_packet_char(hex2char((*p) 0x0f), gdb_ctx ); +} + + gdb_send_packet(gdb_ctx); +} +} + /* trap handler: main entry point */ int __trap_to_gdb(struct cpu_user_regs *regs, unsigned long cookie) diff -r f8233165fb80 xen/drivers/char/console.c --- a/xen/drivers/char/console.cSun Aug 27 16:12:00 2006 -0400 +++ b/xen/drivers/char/console.cMon Aug 28 17:07:02 2006 +1000 @@ -26,6 +26,8 @@ #include asm/current.h #include asm/debugger.h #include asm/io.h + +#include xen/gdbstub.h /* console: comma-separated list of console outputs. */ static char opt_console[30] = OPT_CONSOLE_STR; @@ -258,6 +260,8 @@ static inline void __putstr(const char * int c; serial_puts(sercon_handle, str); +/* FIXME: Make sure this builds without debug=y */ +gdb_puts(str); while ( (c = *str++) != '\0' ) { diff -r f8233165fb80 xen/include/xen/gdbstub.h --- a/xen/include/xen/gdbstub.h Sun Aug 27 16:12:00 2006 -0400 +++ b/xen/include/xen/gdbstub.h Mon Aug 28 17:07:02 2006 +1000 @@ -90,10 +90,12 @@ void gdb_arch_exit(struct cpu_user_regs #define SIGTERM 15 void initialise_gdb(void); +void gdb_puts(const char *str); #else #define initialise_gdb() ((void)0) +#define gdb_puts(str) ((void)0) #endif --- 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: [XenPPC] Current tip broken with SystemSim
On Wed, Aug 16, 2006 at 11:30:48AM -0500, Hollis Blanchard wrote: Add to the wiki, please: http://wiki.xensource.com/xenwiki/XenPPC/Run/SystemSim Also please add a note about the required memory increase. Done x2 When I workout how to get a root image under systemsim I'll document that aswell. 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: [XenPPC] PHDR link failure testcase
On Wed, Aug 16, 2006 at 08:10:20AM -0400, Jimi Xenidis wrote: Thanks for getting to the bottom of this Tony. As it's empty the linker decides to start a 3rd segment rather than waste disk space. Hmm, what is empty? By empty I mean filled with 0s, which I believe is because all the per_cpu variables are initialised at runtime. Initially the linker guessed it would need 2 segments, but due to this decision it actually uses 3, causeing the abort. Aparently the newer (read current CVS) tools don't abort here but do the right thing. What _is_ the right thing? Use 3 PHDRS. Perhaps, this is just mythology/warm-n-fuzzy for me, but I really like having 1 PHDR. Lemmy collect my thoughts and come up with a rational reason. Sure. Wouldn't that mean that everything will end up being in a read/write/execute PHDR. Do we care about that? Placing everything in one PHDR would look like: --- diff -r 279843441136 xen/arch/powerpc/xen.lds.S --- a/xen/arch/powerpc/xen.lds.SWed Aug 16 17:19:38 2006 -0500 +++ b/xen/arch/powerpc/xen.lds.SThu Aug 17 11:30:50 2006 +1000 @@ -10,11 +10,15 @@ SEARCH_DIR(=/usr/local/lib64); SEARCH_ SEARCH_DIR(=/usr/local/lib64); SEARCH_DIR(=/lib64); SEARCH_DIR(=/usr/lib64); SEARCH_DIR(=/usr/local/lib); SEARCH_DIR(=/lib); SEARCH_DIR(=/usr/lib); /* Do we need any of these for elf? __DYNAMIC = 0;*/ +PHDRS +{ + text PT_LOAD FILEHDR PHDRS; +} SECTIONS { /* Read-only sections, merged into text segment: */ PROVIDE (__executable_start = 0x1000); . = 0x1000 + SIZEOF_HEADERS; - .interp : { *(.interp) } + .interp : { *(.interp) } :text .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } @@ -121,7 +125,7 @@ SECTIONS __inithcall_end = .; __per_cpu_start = .; - .data.percpu : { *(.data.percpu) } :text + .data.percpu : { *(.data.percpu) } __per_cpu_data_end = .; . = __per_cpu_start + (NR_CPUS PERCPU_SHIFT); . = ALIGN(STACK_SIZE); 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