Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-05 Thread Andreas Färber
Am 05.03.2014 02:23, schrieb Alex Williamson: On Tue, 2014-03-04 at 18:24 -0600, Kim Phillips wrote: On Fri, 28 Feb 2014 11:03:18 -0700 Alex Williamson alex.william...@redhat.com wrote: This all looks reasonable, but I suspect it would be cleaner if vfio_find_get_group() was in a common file

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-05 Thread Paolo Bonzini
Il 05/03/2014 12:28, Andreas Färber ha scritto: Am 05.03.2014 02:23, schrieb Alex Williamson: On Tue, 2014-03-04 at 18:24 -0600, Kim Phillips wrote: On Fri, 28 Feb 2014 11:03:18 -0700 Alex Williamson alex.william...@redhat.com wrote: This all looks reasonable, but I suspect it would be

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-04 Thread Kim Phillips
On Fri, 28 Feb 2014 11:03:18 -0700 Alex Williamson alex.william...@redhat.com wrote: On Tue, 2014-02-25 at 20:37 -0600, Kim Phillips wrote: - support allocating a variable number of regions - VFIODevice's bars[] become dynamically allocated *regions - VFIOBAR's device fd replaced with

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-04 Thread Alex Williamson
On Tue, 2014-03-04 at 18:24 -0600, Kim Phillips wrote: On Fri, 28 Feb 2014 11:03:18 -0700 Alex Williamson alex.william...@redhat.com wrote: On Tue, 2014-02-25 at 20:37 -0600, Kim Phillips wrote: - support allocating a variable number of regions - VFIODevice's bars[] become

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-03-04 Thread Eric Auger
Hi Kim, 1) I agree with Alex on the fact I would prefer to have the qemu-side platform device code separated from PCI device one, both using a separate generic helper code. Indeed calling functions referencing BAR in the platform device does not look natural to me; although I understand the code

Re: [Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-02-28 Thread Alex Williamson
On Tue, 2014-02-25 at 20:37 -0600, Kim Phillips wrote: We basically add support for the SysBusDevice type in addition to the existing PCIDevice support. This involves taking common code from the existing vfio_initfn(), and putting it under a new vfio_find_get_group(), that both vfio_initfn()

[Qemu-devel] [RFC 2/2] hw/misc/vfio: add vfio-platform support

2014-02-25 Thread Kim Phillips
We basically add support for the SysBusDevice type in addition to the existing PCIDevice support. This involves taking common code from the existing vfio_initfn(), and putting it under a new vfio_find_get_group(), that both vfio_initfn() and the new vfio_platform_realize() call. Since realize()