From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qg5Vi-0001x7-6m for qemu-devel@nongnu.org; Sun, 10 Jul 2011 21:42:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qg5Vh-0005J7-7Y for qemu-devel@nongnu.org; Sun, 10 Jul 2011 21:42:10 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:41020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qg5Vh-0005J1-57 for qemu-devel@nongnu.org; Sun, 10 Jul 2011 21:42:09 -0400 Received: by yxt3 with SMTP id 3so1650711yxt.4 for ; Sun, 10 Jul 2011 18:42:07 -0700 (PDT) Message-ID: <4E1A54ED.7040606@codemonkey.ws> Date: Sun, 10 Jul 2011 20:42:05 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1310321709-30770-1-git-send-email-avi@redhat.com> <1310321709-30770-32-git-send-email-avi@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org On 07/10/2011 03:33 PM, malc wrote: > On Sun, 10 Jul 2011, Avi Kivity wrote: > >> fixes BAR sizing as well. > > I find this patch disgusting, the read and write handlers in particular. Shouldn't it be possible to do something like: typedef struct OldMemoryRegionOps { MemoryRegionOps parent_ops; CPUReadMemoryFunc *readfn[3]; CPUWriteMemoryFunc *writefn[3]; void *opaque; } OldMemoryRegionOps; That should allow old-style implementations to be converted without introducing trampoline functions everywhere. Regards, Anthony Liguori > > [..snip..] >