From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoN0C-0002yK-5D for qemu-devel@nongnu.org; Tue, 02 Aug 2011 17:59:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoN0B-0004sR-0p for qemu-devel@nongnu.org; Tue, 02 Aug 2011 17:59:52 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:37596) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoN0A-0004sL-Ul for qemu-devel@nongnu.org; Tue, 02 Aug 2011 17:59:50 -0400 Received: by qyk10 with SMTP id 10so2012251qyk.4 for ; Tue, 02 Aug 2011 14:59:50 -0700 (PDT) Sender: Richard Henderson Message-ID: <4E387353.9020806@twiddle.net> Date: Tue, 02 Aug 2011 14:59:47 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1312318249-7011-1-git-send-email-avi@redhat.com> In-Reply-To: <1312318249-7011-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: use signed arithmetic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Jan Kiszka , qemu-devel@nongnu.org, 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~