From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CGJFo-00013Y-Lx for qemu-devel@nongnu.org; Sat, 09 Oct 2004 11:35:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CGJFn-000133-WD for qemu-devel@nongnu.org; Sat, 09 Oct 2004 11:35:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CGJFn-00012z-UA for qemu-devel@nongnu.org; Sat, 09 Oct 2004 11:35:27 -0400 Received: from [195.130.132.58] (helo=astra.telenet-ops.be) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CGJ8u-00069L-5I for qemu-devel@nongnu.org; Sat, 09 Oct 2004 11:28:20 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by astra.telenet-ops.be (Postfix) with SMTP id 34AF432819B for ; Sat, 9 Oct 2004 17:28:19 +0200 (MEST) Received: from [192.168.1.2] (d51A51CF1.kabel.telenet.be [81.165.28.241]) by astra.telenet-ops.be (Postfix) with ESMTP id EA899328172 for ; Sat, 9 Oct 2004 17:28:18 +0200 (MEST) Subject: Re: [Qemu-devel] qemu crashes and freezes on x86_64/amd64 host From: Bob Deblier In-Reply-To: References: <1097175246.2833.51.camel@orion> <1097299793.2834.18.camel@orion> <1097323401.2828.16.camel@orion> Content-Type: text/plain Message-Id: <1097335698.3898.23.camel@orion> Mime-Version: 1.0 Date: Sat, 09 Oct 2004 17:28:18 +0200 Content-Transfer-Encoding: 7bit Reply-To: 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 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