Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-12 Thread Avi Kivity
On 07/12/2011 01:03 AM, malc wrote: > > Here's a new version: This one looks acceptable[1], original submission said: "fixes BAR sizing as well." what was wrong with it? The nabm BAR, for example, was registered as 64 bytes of byte ioports, 128 bytes of word ioports, and 256 bytes of long io

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-11 Thread malc
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

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-11 Thread Avi Kivity
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 OldMem

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Avi Kivity
> > 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 witho

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Anthony Liguori
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;

Re: [Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread malc
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. [..snip..] -- mailto:av1...@comtv.ru

[Qemu-devel] [RFC v3 31/56] ac97: convert to memory API

2011-07-10 Thread Avi Kivity
fixes BAR sizing as well. Signed-off-by: Avi Kivity --- hw/ac97.c | 126 ++-- 1 files changed, 88 insertions(+), 38 deletions(-) diff --git a/hw/ac97.c b/hw/ac97.c index 0b59896..72a0667 100644 --- a/hw/ac97.c +++ b/hw/ac97.c @@ -160,8 +1