From: malc Subject: Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API Date: Tue, 12 Jul 2011 02:03:31 +0400 (MSD) Message-ID: References: <1310321709-30770-1-git-send-email-avi@redhat.com> <1310321709-30770-32-git-send-email-avi@redhat.com> <4E1A54ED.7040606@codemonkey.ws> <4E1AD4B4.2080305@redhat.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Anthony Liguori , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from fe01x03-cgp.akado.ru ([77.232.31.164]:62098 "EHLO akado.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753165Ab1GKWDl (ORCPT ); Mon, 11 Jul 2011 18:03:41 -0400 In-Reply-To: <4E1AD4B4.2080305@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, 11 Jul 2011, Avi Kivity wrote: > On 07/11/2011 04:42 AM, Anthony Liguori wrote: > > 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. > > Here's a new version: This one looks acceptable[1], original submission said: "fixes BAR sizing as well." what was wrong with it? [..snip..] P.S. Sans minor inconsistency with trailing commas. -- mailto:av1474@comtv.ru