From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqOID-0008UA-LR for qemu-devel@nongnu.org; Thu, 26 Jan 2012 07:19:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqOI9-000708-Fq for qemu-devel@nongnu.org; Thu, 26 Jan 2012 07:19:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqOI9-000701-88 for qemu-devel@nongnu.org; Thu, 26 Jan 2012 07:19:01 -0500 Message-ID: <4F214498.2070905@redhat.com> Date: Thu, 26 Jan 2012 14:18:32 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1327570411-20432-1-git-send-email-avi@redhat.com> <4F213999.4060509@adacore.com> In-Reply-To: <4F213999.4060509@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory: fix return value on unassigned reads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fabien Chouteau Cc: Blue Swirl , qemu-devel@nongnu.org, atar4qemu@gmail.com On 01/26/2012 01:31 PM, Fabien Chouteau wrote: > On 26/01/2012 10:33, Avi Kivity wrote: > > The memory API returns -1 on unassigned reads, different from the original > > in exec.c, which returned zero. > > Isn't this return value platform specific? Maybe (and I think ~0 is the common one); the patch just restores the previous behaviour. > > > This breaks grlib_uart; apparently some users depend on it. > > > > Fix by returning zero; however if reading from the uart is legal, then > > it should be modified to accept reads. > > > > That's right, grlib_uart depends on it because I took the easy (lazy?) > way. I will send a patch to handle reads to UART's registers. Definitely that's the best way to fix the problem. -- error compiling committee.c: too many arguments to function