From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BmPBu-0002DF-33 for qemu-devel@nongnu.org; Sun, 18 Jul 2004 23:51:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BmPBr-0002Cx-0P for qemu-devel@nongnu.org; Sun, 18 Jul 2004 23:51:49 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BmPBq-0002Cu-TU for qemu-devel@nongnu.org; Sun, 18 Jul 2004 23:51:46 -0400 Received: from [203.209.194.40] (helo=fission.tusker.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BmP8Z-00013q-RQ for qemu-devel@nongnu.org; Sun, 18 Jul 2004 23:48:24 -0400 Received: from localhost (fission [127.0.0.1]) by fission.tusker.net (Postfix) with ESMTP id BF83717E07 for ; Mon, 19 Jul 2004 13:47:47 +1000 (EST) Received: from fission.tusker.net ([127.0.0.1]) by localhost (fission [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17804-10 for ; Mon, 19 Jul 2004 13:47:47 +1000 (EST) Received: from [127.0.0.1] (datalex.cable.nu [203.117.94.152]) by fission.tusker.net (Postfix) with ESMTP id 2ABFF17E01 for ; Mon, 19 Jul 2004 13:47:44 +1000 (EST) Message-ID: <40FB4478.1020801@tusker.org> Date: Mon, 19 Jul 2004 11:48:08 +0800 From: Damien Mascord MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] qemu-fast 0.6.0 hanging... 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 Hi, I am trying to get qemu 0.6.0 running on Debian testing, running vanilla 2.4.26 kernel. If I use the qemu 0.6.0 binaries from the qemu website, qemu-fast and qemu binaries do in fact load the kernel as expected, though both hang upon shutdown. Though, if I compile the 0.6.0 from source on the host itself, I see the following behaviour: If I run qemu without the "-fast" affix, then it will load the linux-test image (as provided on the qemu website), though on shutdown, it hangs and uses 99-100% CPU. If I run qemu-fast, then it hangs on startup, and uses 99-100% CPU straight away. I am using gcc (GCC) 3.3.4 (Debian 1:3.3.4-3), with libc6 2.3.2. I am compiling with the following options: CFLAGS="-Wall -g -O2" ./configure --target-list="i386-user i386 i386-softmmu arm-user sparc-user ppc-user ppc-softmmu" --prefix=/usr --enable-slirp Install prefix /usr BIOS directory /usr/share/qemu binary directory /usr/bin Manual directory /usr/share/man ELF interp prefix /usr/gnemul/qemu-%M Source path /home/tusker/qemu-0.6.0 C compiler gcc make make host CPU i386 host big endian no target list i386-user i386 i386-softmmu arm-user sparc-user ppc-user ppc-softmmu gprof enabled no static build no SDL support yes SDL static link yes mingw32 support no If I change the -O2 to -O0, it fails to compile. If I change to -O1 it compiles correctly, though still behaves like -O2. (ie, hangs on startup for qemu-fast, hangs on shutdown for qemu.) The compile error for -O0 is as follows: gcc -Wall -g -O0 -fno-strict-aliasing -fomit-frame-pointer -I. -I/home/tusker/qemu-0.6.0/target-i386 -I/home/tusker/qemu-0.6.0 -I/home/tusker/qemu-0.6.0/linux-user -I/home/tusker/qemu-0.6.0/linux-user/i386 -D_GNU_SOURCE -I/home/tusker/qemu-0.6.0/slirp -c -o cpu-exec.o /home/tusker/qemu-0.6.0/cpu-exec.c /home/tusker/qemu-0.6.0/exec-all.h: In function `testandset': /home/tusker/qemu-0.6.0/exec-all.h:413: error: can't find a register in class `GENERAL_REGS' while reloading `asm' make[2]: *** [cpu-exec.o] Error 1 make[2]: Leaving directory `/home/tusker/qemu-0.6.0/i386-user' make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/tusker/qemu-0.6.0' make: *** [build-stamp] Error 2 Is there an easy way to debug what is going wrong here? According to the user documention, attaching with gdb, and then issueing a few commands through gdb should help, but I'm not very familiar with gdb... :) For interest sake, here is the following when normal qemu is shutting down: 1) On the console it says: flushing ide devices: hda hdc Restarting system. 2) gdb 'info reg' shows: eax 0x909d 37021 ecx 0x30001 196609 edx 0x80 128 ebx 0x80 128 esp 0x8ff8 0x8ff8 ebp 0x0 0x0 esi 0x9d 157 edi 0xffe4 65508 eip 0xff53 0xff53 eflags 0x86 134 cs 0xf000 61440 ss 0x9000 36864 ds 0x9000 36864 es 0x9000 36864 fs 0x9000 36864 gs 0x9000 36864 3) gdb 'x/10i $eip' shows: 0xff53: (bad) 0xff54: jbe 0xff55 0xff56: add %al,(%eax) 0xff58: aad $0x3 0xff5a: outsb %ds:(%esi),(%dx) 0xff5b: call *%ebp 0xff5d: aas 0xff5e: aad $0x3 0xff60: push %eax 0xff61: add %dl,%ah For the qemu-fast binary, gdb can't seem to attach to anything, and the following message comes up: Interrupted while waiting for the program. Give up (and stop debugging it)? (y or n) n Is there anything I can do to work out what is going on ? Damien -- Damien Mascord (tusker at tusker dot org) GPG key 2CB181BE / 93B2 EF21 0C7C F022 F467 7966 219E 92B3 2CB1 81BE