From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IzcuJ-00074A-4l for qemu-devel@nongnu.org; Tue, 04 Dec 2007 13:54:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IzcuI-00073H-9Y for qemu-devel@nongnu.org; Tue, 04 Dec 2007 13:54:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IzcuI-000731-4I for qemu-devel@nongnu.org; Tue, 04 Dec 2007 13:54:10 -0500 Received: from nf-out-0910.google.com ([64.233.182.189]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IzcuH-00041w-J5 for qemu-devel@nongnu.org; Tue, 04 Dec 2007 13:54:09 -0500 Received: by nf-out-0910.google.com with SMTP id 30so3255998nfu for ; Tue, 04 Dec 2007 10:54:08 -0800 (PST) Message-ID: Date: Tue, 4 Dec 2007 20:54:03 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] and now bus error for i386 guest In-Reply-To: <475554E1.5070509@shaddybaddah.name> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <473A9DED.6020308@shaddybaddah.name> <473AAD7F.30709@shaddybaddah.name> <473AF480.6030802@shaddybaddah.name> <475554E1.5070509@shaddybaddah.name> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 12/4/07, Shaddy Baddah wrote: > HI, > > Blue Swirl wrote: > > On 11/14/07, Shaddy Baddah wrote: > >> Hi again, > >> > >> After further culling the target list, I was able to install qemu on my > >> sun4u host. > >> > >> However, running it, I get a bus error. See below for details: > >> > >> $ /opt/qemu-cvs/bin/qemu -m 128 -cdrom > >> ~/KNOPPIX_V5.1.1CD-2007-01-04-EN.iso -vnc :1 > >> Bus error > > > > For some reason, Sparc Linux host is not working. I think Sparc Solaris is OK. > > Yes, I do recall that I was able to get this working on Sparc Solaris. > Anyway, when I get more time, I will have a better stab at debugging > this. I got a start on this today, and here is a bit of cut and paste > that may or may not be insightful. The address for env1 looks questionable: > > shaddy@localhost:~/qemu-cvs/qemu-build$ gdb --args ./i386-softmmu/qemu > -hda ../../KNOPPIX_V5.1.1CD-2007-01-04-EN.iso -L ../qemu/pc-bios > GNU gdb 6.6.90.20070912-debian > Copyright (C) 2007 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "sparc-linux-gnu"... > Using host libthread_db library "/lib/libthread_db.so.1". > (gdb) run > Starting program: /home/shaddy/qemu-cvs/qemu-build/i386-softmmu/qemu > -hda ../../KNOPPIX_V5.1.1CD-2007-01-04-EN.iso -L ../qemu/pc-bios > [Thread debugging using libthread_db enabled] > [New Thread 0xf7f7b550 (LWP 9363)] > > Program received signal SIGBUS, Bus error. > [Switching to Thread 0xf7f7b550 (LWP 9363)] > cpu_x86_exec (env1=0x2) at /home/shaddy/qemu-cvs/qemu/cpu-exec.c:307 > 307 if (env->exception_index >= 0) { > (gdb) info threads > * 1 Thread 0xf7f7b550 (LWP 9363) cpu_x86_exec (env1=0x2) > at /home/shaddy/qemu-cvs/qemu/cpu-exec.c:307 > (gdb) My guess is that Linux glibc overwrites global registers at some point, like in signal handling or setjmp. The generated code looks OK and it shouldn't be different from what Solaris version would generate. I've been thinking of different register design (using locals or outs) but then the op helpers would need to use different mechanism to access T0/T1/T2. Compiling Qemu against uClibc could also show something. > PS: couldn't this also be debugged from within qemu VM running Debian > Sparc, for those that don't have access to a real machine? I got a start > on this today as well (because I don't always have access to the Sun > Ultra box). Seems stable, and I was able to get a start on a compile, > that is currently still going. Nice idea! Do you mean full system emulator or user mode?