qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] and now bus error for i386 guest


From: Blue Swirl
Subject: Re: [Qemu-devel] and now bus error for i386 guest
Date: Tue, 4 Dec 2007 20:54:03 +0200

On 12/4/07, Shaddy Baddah <address@hidden> wrote:
> HI,
>
> Blue Swirl wrote:
> > On 11/14/07, Shaddy Baddah <address@hidden> 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:
>
> address@hidden:~/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
> <http://gnu.org/licenses/gpl.html>
> 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]