qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Qemu / KQemu on 64-bit (x86_64) host systems
@ 2007-04-16  6:47 Werner Dittmann
  2007-04-17  5:05 ` andrzej zaborowski
  2007-04-17 11:26 ` Bernhard Kauer
  0 siblings, 2 replies; 12+ messages in thread
From: Werner Dittmann @ 2007-04-16  6:47 UTC (permalink / raw)
  To: qemu-devel

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

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 :-) ? ).

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-04-22 10:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-16  6:47 [Qemu-devel] Qemu / KQemu on 64-bit (x86_64) host systems Werner Dittmann
2007-04-17  5:05 ` andrzej zaborowski
2007-04-17 18:34   ` Werner Dittmann
2007-04-17 20:02     ` andrzej zaborowski
2007-04-18 19:26       ` Werner Dittmann
2007-04-18 19:44       ` Werner Dittmann
2007-04-18 20:05         ` andrzej zaborowski
2007-04-19 15:25           ` Werner Dittmann
2007-04-19 17:08             ` andrzej zaborowski
2007-04-20 14:28               ` Werner Dittmann
2007-04-22 10:18               ` Werner Dittmann
2007-04-17 11:26 ` Bernhard Kauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).