From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JODee-00044b-Qj for qemu-devel@nongnu.org; Sun, 10 Feb 2008 09:59:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JODed-00043k-5Z for qemu-devel@nongnu.org; Sun, 10 Feb 2008 09:59:40 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JODed-00043h-0F for qemu-devel@nongnu.org; Sun, 10 Feb 2008 09:59:39 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JODec-0001YH-IL for qemu-devel@nongnu.org; Sun, 10 Feb 2008 09:59:38 -0500 From: Paul Brook Subject: Re: [Qemu-devel] Re: [PATCH 2/6] Use correct types to enable > 2G support (v2) Date: Sun, 10 Feb 2008 14:59:32 +0000 References: <1201903921-1125-1-git-send-email-aliguori@us.ibm.com> <200802101412.27850.paul@codesourcery.com> <47AF104C.3060401@qumranet.com> In-Reply-To: <47AF104C.3060401@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802101459.33683.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Izik Eidus , kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org On Sunday 10 February 2008, Avi Kivity wrote: > Paul Brook wrote: > >>> as far as i remember it was used to address something with > >>> cpu_physical_memory_rw() probably related to &TARGET_PAGE_SIZE > >>> or ~TARGET_PAGE_SIZE, > >>> > >>> the fact is that i dont know if it ever fixed anything > >> > >> It fixes TARGET_PAGE_MASK, defined one line downscreen. > > > > That doesn't really answer the question. What was wrong with the original > > definition? > > There are many instances of ((physical address) & TARGET_PAGE_MASK) > scattered throughout the code. With 64-bit physical addresses, this > causes truncation. No it doesn't. TARGET_PAGE_MASK will be sign extended to the width of physical_address. This is why I asked for a concrete example of something that broke. Paul