From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Henderson Subject: Re: [PATCH] memory: use signed arithmetic Date: Tue, 02 Aug 2011 14:59:47 -0700 Message-ID: <4E387353.9020806@twiddle.net> References: <1312318249-7011-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: In-Reply-To: <1312318249-7011-1-git-send-email-avi@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 08/02/2011 01:50 PM, Avi Kivity wrote: > struct AddrRange { > - uint64_t start; > - uint64_t size; > + int64_t start; > + int64_t size; I'm must say I'm not keen on this. My primary objection is that a "range" can no longer properly represent the entire address space. Or, indeed, anything in the second half of it. It sounds like your problem would be better solved by re-arranging things such that you perform X < Y comparisons rather than DELTA < 0. r~