[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] qemu crashes and freezes on x86_64/amd64 host
From: |
Bob Deblier |
Subject: |
Re: [Qemu-devel] qemu crashes and freezes on x86_64/amd64 host |
Date: |
Sat, 09 Oct 2004 17:28:18 +0200 |
On Sat, 2004-10-09 at 16:06, Johannes Schindelin wrote:
> Hi,
>
> On Sat, 9 Oct 2004, Bob Deblier wrote:
>
> > Valgrind is x86 only - I'm running Fedora Core 2 x86_64 a.k.a. amd64
> > i.e. 64-bit native. I have no problems on Fedora Core 2 x86.
>
> Oops, sorry. I thought I read something about alpha x86_64 support in
> valgrind, but I could not find it, so I guess it was PPC support.
>
> Looking at your gdb session again, I would like to know: what is the value
> of p? Is sizeof(unsigned int)==8? What is
> sizeof(l1_map)/sizeof(PageDesc*)?
Unfortunately, gdb refuses to cough up the value of p:
Starting program: /usr/bin/qemu -cdrom /opt/iso/w2k.iso -boot d w2k.img
Program received signal SIGSEGV, Segmentation fault.
tb_link_phys (tb=0xbd1e10, phys_pc=33, phys_page2=426) at
/home/bob/emulators/cvs/qemu/exec.c:842
842 tb->page_next[n] = p->first_tb;
(gdb) list
837 PageDesc *p;
838 TranslationBlock *last_first_tb;
839
840 tb->page_addr[n] = page_addr;
841 p = page_find(page_addr >> TARGET_PAGE_BITS);
842 tb->page_next[n] = p->first_tb;
843 last_first_tb = p->first_tb;
844 p->first_tb = (TranslationBlock *)((long)tb | n);
845 invalidate_page_bitmap(p);
846
(gdb) print p
No symbol "p" in current context.
I assume it got "optimized away" because of compilation flag -O2; again,
unfortunately, the code refuses to compile without that flag. Tricky
stuff...
To answer your other question, according to gdb:
(gdb) print sizeof(unsigned int)
$1 = 4
(gdb) print sizeof(PageDesc*)
$2 = 8
(gdb) print sizeof(l1_map)
$3 = 8192
(gdb) print sizeof(l1_map) / sizeof(PageDesc*)
$4 = 1024
When compiling, there are many warnings about "cast from pointer to
integer of different size" and "cast to pointer from integer of
different size" which makes me highly suspicious about 64-bit
compatibility of the code.
Bob
[Qemu-devel] Re: qemu crashes and freezes on x86_64/amd64 host, Andi Kleen, 2004/10/09