Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 06:36 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2014-05-27 at 12:27 -0600, Alex Williamson wrote: > > > Ugh, the patches are flying too fast, I can't even keep track that this > > is a QEMU patch. I'm not as concerned about the "get" in QEMU, but do > > we really want t

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Benjamin Herrenschmidt
On Tue, 2014-05-27 at 15:32 -0600, Alex Williamson wrote: > We could also make a single wrapper > > int vfio_pci_container_ioctl(int iommu_group_id, int request, ...); > > I think that would make it's usage harder to get wrong than exposing a > data element and trusting the consumer not to use it

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Benjamin Herrenschmidt
On Tue, 2014-05-27 at 12:27 -0600, Alex Williamson wrote: > Ugh, the patches are flying too fast, I can't even keep track that this > is a QEMU patch. I'm not as concerned about the "get" in QEMU, but do > we really want to create a future hotplug issue where we've handed out a > file descriptor

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Alex Williamson
On Wed, 2014-05-28 at 01:17 +1000, Gavin Shan wrote: > On Tue, May 27, 2014 at 08:16:47AM -0600, Alex Williamson wrote: > >On Tue, 2014-05-27 at 18:51 +1000, Gavin Shan wrote: > >> The patch adds function vfio_get_container_fd_by_group_id() to retrieve > >> the container's fd of the specified VFIO

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Gavin Shan
On Tue, May 27, 2014 at 08:16:47AM -0600, Alex Williamson wrote: >On Tue, 2014-05-27 at 18:51 +1000, Gavin Shan wrote: >> The patch adds function vfio_get_container_fd_by_group_id() to retrieve >> the container's fd of the specified VFIO group. The fd will be used >> by subsequent patches. >> >> S

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Gavin Shan
On Tue, May 27, 2014 at 08:16:47AM -0600, Alex Williamson wrote: >On Tue, 2014-05-27 at 18:51 +1000, Gavin Shan wrote: >> The patch adds function vfio_get_container_fd_by_group_id() to retrieve >> the container's fd of the specified VFIO group. The fd will be used >> by subsequent patches. >> >> S

Re: [Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Alex Williamson
On Tue, 2014-05-27 at 18:51 +1000, Gavin Shan wrote: > The patch adds function vfio_get_container_fd_by_group_id() to retrieve > the container's fd of the specified VFIO group. The fd will be used > by subsequent patches. > > Signed-off-by: Gavin Shan > --- > hw/misc/vfio.c | 17

[Qemu-devel] [PATCH v7 2/3] VFIO: Helper function to retrieve container fd

2014-05-27 Thread Gavin Shan
The patch adds function vfio_get_container_fd_by_group_id() to retrieve the container's fd of the specified VFIO group. The fd will be used by subsequent patches. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 17 + include/hw/misc/vfio.h | 1 + 2 files changed, 18 inser