From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HdfxL-0003Mg-6Y for qemu-devel@nongnu.org; Tue, 17 Apr 2007 01:10:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HdfxJ-0003ML-Lk for qemu-devel@nongnu.org; Tue, 17 Apr 2007 01:10:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HdfxJ-0003MG-Fr for qemu-devel@nongnu.org; Tue, 17 Apr 2007 01:10:17 -0400 Received: from wr-out-0506.google.com ([64.233.184.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hdfsc-0000yk-3v for qemu-devel@nongnu.org; Tue, 17 Apr 2007 01:05:26 -0400 Received: by wr-out-0506.google.com with SMTP id i20so2984885wra for ; Mon, 16 Apr 2007 22:05:21 -0700 (PDT) Message-ID: Date: Tue, 17 Apr 2007 07:05:21 +0200 From: "andrzej zaborowski" Sender: balrogg@gmail.com Subject: Re: [Qemu-devel] Qemu / KQemu on 64-bit (x86_64) host systems In-Reply-To: <46231BEB.5070402@t-online.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46231BEB.5070402@t-online.de> Reply-To: balrogg@gmail.com, 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, On 16/04/07, Werner Dittmann wrote: > During several tests with Qemu / Kqemu it seems that Qemu > has problems with x86_64 host systems. My system is an > AMD 64 X2 (Dual Core), running openSUSE 10.2, 2GB memory. > > Various versions of Qemu/Kqemu available and under test: > 0.8.2, 0.9.0, and CVS. Kqemu 1.3.0pre9, 1.3.0pre11 > > When building Qemu I use the following configure setup, > using a gcc 3.4: > ./configure --prefix=/usr/local/ \ > --cc=/opt/gcc34/bin/gcc-3.4 --host-cc=/opt/gcc34/bin/gcc-3.4 \ > --enable-alsa --enable-adlib \ > --target-list="i386-softmmu x86_64-softmmu" > > Kqemu built with standard (system) gcc. > > I always use qemu-system-x86_64 to start Qemu. > > Here the problems: > > Installing a 32bit Linux system (Debian, Kernel 2.6.18): > - works with pure Qemu (-no-kqemu) > - fails with Kqemu support enabled. The failure is a loop > before or during the kernel hands over control to INIT Does your host happen to be dual-core? If so, please try adding "notsc" to the guest kernel commandline and report if it makes a difference. > > I used gdb to get some more information about the problems > using the following command: > gdb qemu-system-x86_64 > > using a .gdbinit that sets the args, etc. > > When the kernel goes into the loop I interrupt with ^C > several times, most of the time it was in code_gen_buffer, > here in the function "compute_c_subl". > > Because I'm _not_ sure this is the correct way to debug Qemu > I cannot say if this is normal or not. At least the function > always returns 1 (it seems that it is called over and over > again with). The last relevant statement in this function is: > > cmp %eax,0x90(%r14) > seta %al > > where the conetent of %eax is zero, the content of the memory > is 0x00000000ffffeb3e. The return says: the memory content is > bigger than 0x0 (which is true for 64bit, but also true for > 32bit unsigned, "compute_c_subl" compares two unsigned 32bit > integers). As said, take these findings with a grain of > salt. > > My general thought about the problem: running 32bit code > on a 64bit host with similar architecture as this is the case > of x86 / x86_64 could easily result in problems with signedness, > sign bit extension, different pointer/word/interger sizes... > > BTW: is there a Howto or other information how to debug > Qemu when the loaded kernel loops or crashes? That would be > great and would make it easier to step in here and provide some > help (or is this a somewhat good kept secret :-) ? ). Use qemu's gdb server, it's documented. > > The next problems are fairly old, they are also reported in the > Qemu user's wiki - but without an answer o solution. > > Installing a 64bit Linux system (openSuse 10.1, 10.2): > - fails with Qemu (-no-kqemu), loops when Grub shall install > the bootloader. > - fails with Kqemu enabled, crashes at various addresses and > prints register contents. > > Any hints what this could be? Solutions? > > Regards, > Werner > > > > Regards, Andrzej