Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 19:47, Alex Williamson ha scritto: > We'll see about that ;) At the very least you broke the tie. :) > It's true that it's simply a mental model of > doing the required steps, then optimizing that makes vfio need a > sprinkling of set ownership calls. Paolo, your patch to move the

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Alex Williamson
On Tue, 2013-06-04 at 18:50 +0200, Paolo Bonzini wrote: > Il 04/06/2013 15:24, Paolo Bonzini ha scritto: > > Il 04/06/2013 14:36, Peter Maydell ha scritto: > >> On 4 June 2013 13:31, Paolo Bonzini wrote: > >>> Il 04/06/2013 14:24, Peter Maydell ha scritto: > On 4 June 2013 13:13, Paolo Bonzin

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 15:24, Paolo Bonzini ha scritto: > Il 04/06/2013 14:36, Peter Maydell ha scritto: >> On 4 June 2013 13:31, Paolo Bonzini wrote: >>> Il 04/06/2013 14:24, Peter Maydell ha scritto: On 4 June 2013 13:13, Paolo Bonzini wrote: This is much less flexible than just using sysbus_m

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 16:56, Peter Maydell ha scritto: >>> As a concrete example, if somebody submitted cirrus_vga >>> as a new driver, I have no idea how to tell that it needs >>> to set the owner for its memory regions, when 99% of >>> other devices don't. I think this is going to result in >>> "forgot t

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Peter Maydell
On 4 June 2013 15:27, Paolo Bonzini wrote: > Il 04/06/2013 16:11, Peter Maydell ha scritto: >> We've already got a working implementation, in the shape >> of sysbus_mmio_get_region(). This is exactly the right way >> to do this API -- we have one API which says "give me a >> MemoryRegion*" and one

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 16:11, Peter Maydell ha scritto: > We've already got a working implementation, in the shape > of sysbus_mmio_get_region(). This is exactly the right way > to do this API -- we have one API which says "give me a > MemoryRegion*" and one which says "I have a MemoryRegion*, > please expo

[Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
This matches sysbus_pass_irq in cases where a device is a thin wrapper of another. MMIO regions will keep the subdevice as the owner. Signed-off-by: Paolo Bonzini --- hw/core/sysbus.c | 12 hw/cpu/arm11mpcore.c | 2 +- include/hw/sysbus.h | 1 + 3 files changed, 14 insertion

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Peter Maydell
On 4 June 2013 14:24, Paolo Bonzini wrote: > Il 04/06/2013 14:36, Peter Maydell ha scritto: >> On 4 June 2013 13:31, Paolo Bonzini wrote: >>> Il 04/06/2013 14:24, Peter Maydell ha scritto: On 4 June 2013 13:13, Paolo Bonzini wrote: This is much less flexible than just using sysbus_mmio

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 14:36, Peter Maydell ha scritto: > On 4 June 2013 13:31, Paolo Bonzini wrote: >> Il 04/06/2013 14:24, Peter Maydell ha scritto: >>> On 4 June 2013 13:13, Paolo Bonzini wrote: >>> This is much less flexible than just using sysbus_mmio_get_region(), >>> because it only lets you pass t

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Peter Maydell
On 4 June 2013 13:31, Paolo Bonzini wrote: > Il 04/06/2013 14:24, Peter Maydell ha scritto: >> On 4 June 2013 13:13, Paolo Bonzini wrote: >> This is much less flexible than just using sysbus_mmio_get_region(), >> because it only lets you pass the whole set of MMIOs from the >> other device throug

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Paolo Bonzini
Il 04/06/2013 14:24, Peter Maydell ha scritto: > On 4 June 2013 13:13, Paolo Bonzini wrote: >> This matches sysbus_pass_irq in cases where a device is a thin wrapper >> of another. MMIO regions will keep the subdevice as the owner. >> >> Signed-off-by: Paolo Bonzini >> --- >> hw/core/sysbus.c

Re: [Qemu-devel] [PATCH v2 06/17] sysbus: add sysbus_pass_mmio

2013-06-04 Thread Peter Maydell
On 4 June 2013 13:13, Paolo Bonzini wrote: > This matches sysbus_pass_irq in cases where a device is a thin wrapper > of another. MMIO regions will keep the subdevice as the owner. > > Signed-off-by: Paolo Bonzini > --- > hw/core/sysbus.c | 12 > hw/cpu/arm11mpcore.c | 2 +- >