Re: [RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-23 Thread Gerald Schaefer
On Wed, 22 Jul 2015 11:10:57 -0600 Alex Williamson alex.william...@redhat.com wrote: On Wed, 2015-07-22 at 10:54 -0600, Alex Williamson wrote: On Tue, 2015-07-21 at 19:44 +0200, Gerald Schaefer wrote: When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed

Re: [RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-23 Thread Gerald Schaefer
On Wed, 22 Jul 2015 10:54:35 -0600 Alex Williamson alex.william...@redhat.com wrote: On Tue, 2015-07-21 at 19:44 +0200, Gerald Schaefer wrote: When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed thereafter (before any other ioctl like

Re: [RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-22 Thread Alex Williamson
On Wed, 2015-07-22 at 10:54 -0600, Alex Williamson wrote: On Tue, 2015-07-21 at 19:44 +0200, Gerald Schaefer wrote: When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed thereafter (before any other ioctl like VFIO_GROUP_GET_DEVICE_FD), then the detach_dev

Re: [RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-22 Thread Alex Williamson
On Tue, 2015-07-21 at 19:44 +0200, Gerald Schaefer wrote: When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed thereafter (before any other ioctl like VFIO_GROUP_GET_DEVICE_FD), then the detach_dev callback of the underlying IOMMU API is never called. This patch

[RFC PATCH 1/1] vfio-pci/iommu: Detach iommu group on remove path

2015-07-21 Thread Gerald Schaefer
When a user completes the VFIO_SET_IOMMU ioctl and the vfio-pci device is removed thereafter (before any other ioctl like VFIO_GROUP_GET_DEVICE_FD), then the detach_dev callback of the underlying IOMMU API is never called. This patch adds a call to vfio_group_try_dissolve_container() to the