From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] Re: [PATCH 2/6] Use correct types to enable > 2G support (v2) Date: Sun, 10 Feb 2008 17:14:05 +0200 Message-ID: <47AF14BD.5040201@qumranet.com> References: <1201903921-1125-1-git-send-email-aliguori@us.ibm.com> <200802101412.27850.paul@codesourcery.com> <47AF104C.3060401@qumranet.com> <200802101459.33683.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org To: Paul Brook Return-path: In-Reply-To: <200802101459.33683.paul@codesourcery.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Paul Brook wrote: > 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. > I understand now. No, I don't recall a specific instance, and it may have been an unnecessary step along the way to get large memory support working. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JODsf-0003cM-F3 for qemu-devel@nongnu.org; Sun, 10 Feb 2008 10:14:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JODse-0003ah-HD for qemu-devel@nongnu.org; Sun, 10 Feb 2008 10:14:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JODse-0003aR-AS for qemu-devel@nongnu.org; Sun, 10 Feb 2008 10:14:08 -0500 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JODse-0004S0-1P for qemu-devel@nongnu.org; Sun, 10 Feb 2008 10:14:08 -0500 Message-ID: <47AF14BD.5040201@qumranet.com> Date: Sun, 10 Feb 2008 17:14:05 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 2/6] Use correct types to enable > 2G support (v2) References: <1201903921-1125-1-git-send-email-aliguori@us.ibm.com> <200802101412.27850.paul@codesourcery.com> <47AF104C.3060401@qumranet.com> <200802101459.33683.paul@codesourcery.com> In-Reply-To: <200802101459.33683.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Paul Brook Cc: Izik Eidus , kvm-devel@lists.sourceforge.net, qemu-devel@nongnu.org Paul Brook wrote: > 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. > I understand now. No, I don't recall a specific instance, and it may have been an unnecessary step along the way to get large memory support working. -- error compiling committee.c: too many arguments to function