From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMjzx-0008Ra-Aa for qemu-devel@nongnu.org; Wed, 18 May 2011 12:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QMjzw-0004OL-2l for qemu-devel@nongnu.org; Wed, 18 May 2011 12:53:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QMjzv-0004OG-Mx for qemu-devel@nongnu.org; Wed, 18 May 2011 12:53:23 -0400 Message-ID: <4DD3F97D.6070107@redhat.com> Date: Wed, 18 May 2011 19:53:17 +0300 From: Avi Kivity MIME-Version: 1.0 References: <4DD3C5B9.1080908@redhat.com> <4DD3E0E5.2030700@codemonkey.ws> <4DD3EA2F.4080200@mail.berlios.de> <4DD3EE75.70408@redhat.com> <4DD3F912.6040709@twiddle.net> In-Reply-To: <4DD3F912.6040709@twiddle.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] Memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel On 05/18/2011 07:51 PM, Richard Henderson wrote: > > > > I prefer having size as an argument. > > The one thing that makes having these function pointers split apart nice > is that it makes it easy to set policy for what different sized reads do. > > E.g. for devices for which only 4 byte reads are defined, you only fill > in readl, and let the other sizes cause a machine-check. > > Alternately, for devices for which the fundamental size is 1 byte, but > which does handle larger reads in a more-or-less memory-like fashion, > you can fill in a common readw_via_readb function that does the > composition for you, and without having to have code for that scattered > through every device. I plan to centralize this logic in the memory API. You'll just declare how your device behaves. -- error compiling committee.c: too many arguments to function