From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kk1yE-0007OU-O0 for qemu-devel@nongnu.org; Sun, 28 Sep 2008 15:30:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kk1yB-0007J1-0t for qemu-devel@nongnu.org; Sun, 28 Sep 2008 15:30:18 -0400 Received: from [199.232.76.173] (port=50379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kk1yA-0007Iq-Qt for qemu-devel@nongnu.org; Sun, 28 Sep 2008 15:30:14 -0400 Received: from main.gmane.org ([80.91.229.2]:34216 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kk1yA-0001fF-5x for qemu-devel@nongnu.org; Sun, 28 Sep 2008 15:30:14 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Kk1xy-0002Y7-6k for qemu-devel@nongnu.org; Sun, 28 Sep 2008 19:30:02 +0000 Received: from 82.208.33.94 ([82.208.33.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Sep 2008 19:30:02 +0000 Received: from makovick by 82.208.33.94 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 28 Sep 2008 19:30:02 +0000 From: Jindrich Makovicka Date: Sun, 28 Sep 2008 21:29:12 +0200 Message-ID: <20080928212912.7a97f382@holly> References: <20080928144429.5781982d@holly> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: news Subject: [Qemu-devel] Re: constant truncation warning in hw/pc.c for 32bit targets 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 Sun, 28 Sep 2008 16:52:22 +0300 "Blue Swirl" wrote: > On 9/28/08, Jindrich Makovicka wrote: > > Hi, > > > > for 32bit targets, the 0x100000000ULL start address of above-4G > > memory is truncated to zero. IMO the code for above-4G allocation > > could be #ifdef'ed only for 64 bit targets, as for 32bit it 1) > > miscompiles and 2) won't be used anyway: > > There are i386 systems with more than 4G of memory, so your patch is > incorrect. Yes, I know about PAE, but I assumed that when QEMU uses 32 bits for a physical address (32bit guest on 32bit host) it will not support more than 4 gigs. > Now, if the code miscompiles there could be a problem somewhere else. I meant that for a 32bit target, the physical address passed to cpu_register_physical_memory will be zero instead of 4 gig as one would expect because of the truncation. I don't have a intimate knowledge of QEMU internals, but this warning just looked a bit fishy to me :) -- Jindrich Makovicka