qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu / KQemu on 64-bit (x86_64) host systems


From: andrzej zaborowski
Subject: Re: [Qemu-devel] Qemu / KQemu on 64-bit (x86_64) host systems
Date: Tue, 17 Apr 2007 07:05:21 +0200

Hi,

On 16/04/07, Werner Dittmann <address@hidden> 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




reply via email to

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