From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrTKL-0007uZ-FH for qemu-devel@nongnu.org; Sun, 29 Jan 2012 06:53:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RrTKK-0006Cc-Dd for qemu-devel@nongnu.org; Sun, 29 Jan 2012 06:53:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RrTKK-0006AX-0N for qemu-devel@nongnu.org; Sun, 29 Jan 2012 06:53:44 -0500 Message-ID: <4F25333F.9070305@redhat.com> Date: Sun, 29 Jan 2012 13:53:35 +0200 From: Avi Kivity MIME-Version: 1.0 References: <4F251DCB.8020305@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] exec-obsolete: fix length handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel , Stefan Berger On 01/29/2012 01:37 PM, Blue Swirl wrote: > On Sun, Jan 29, 2012 at 10:22, Avi Kivity wrote: > > On 01/28/2012 08:13 PM, Blue Swirl wrote: > >> Fix suspend/resume broken by off-by-one error in > >> 59abb06198ee9471e29c970f294eae80c0b39be1. > >> > >> Adjust the loop so that it handles correctly the case > >> start = (ram_addr_t)-TARGET_PAGE_SIZE, length = TARGET_PAGE_SIZE. > > > > Is the ram_addr_t even legal? ram addresses start from 0 and end up > > around ~(ram_addr_t)0 >> 1, max. > > Is that defined somewhere? I think only the size of host virtual > address space should limit the range, for example on a 32 bit host, > near to 3GB should be possible as limited by host OS. Correct, but the code limits it to 2GB. > Anyway, this version is closer to your original code and should be > equal or better otherwise to current broken code. I prefer the earlier patch, but both should work. -- error compiling committee.c: too many arguments to function