[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaults because tb_ne
From: |
Erik van der Kouwe |
Subject: |
[Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaults because tb_next[1] is NULL |
Date: |
Wed, 22 Aug 2007 20:34:58 +0200 |
Dear all,
I have been attempting to get QEMU to run on the Minix operation system
(running on x86, see http://www.minix3.org/ for more info on the OS) for
some time now. I have gotten the program to compile and have added the
Minix-specific a.out-like format to dyngen. I am quite certain this bit
works, as I have been looking at the generated relocated code in the
disassebler at length.
My problem is the following: quickly after starting I get a segmentation
fault while the generated code is running.
This happens in the code generated from op_goto_tb1 and is caused by jumping
to a NULL pointer. This NULL pointer originates from the tb_next[1] field of
the translation block data structure passed as a parameter. I have verified
in the disassembler that the parameter in the generated code is processed
correctly and the field is indeed tb_next[1].
I would like to know what would be the normal place for tb_next[1] to be
initialized, and perhaps if anyone has a suggesting why that might not be
happening in this case.
I found that (but please correct me if I am wrong) the assignment can only
take place in tb_set_jmp_target, which in turn is called only by tb_add_jump
and tb_reset_jump. When stepping through the code I found that neither of
these functions is ever called either.
Versions i'm using:
- Qemu 0.8.2 (newest when i started, but from changelog ISTM upgrading to
0.9.0 would not help)
- Minix 3.1.2 (current release version)
- GCC 3.4.3 (version that comes with Minix)
Compilation settings:
- Target: i386-softmmu (must use soft MMU, Minix does not support paging)
- target_user_only enabled
- CONFIG_SOFTFLOAT enabled (Minix does not support FPU, everything is
emulated anyways)
- USE_DIRECT_JUMP disabled (but had similar problem before disabling, and
this seems easier to debug)
Virtual machine:
- The Linux image at http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2
If you need any more information to answer my question (or at least guide me
in the right direction) do not hesitate to ask.
Thanks in advance for any answers, suggestions or other advice you may have.
With kind regards,
Erik van der Kouwe
- [Qemu-devel] Porting QEMU to Minix - op_goto_tb1 segfaults because tb_next[1] is NULL,
Erik van der Kouwe <=