Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-02-03 Thread Joerg Roedel
On Tue, Feb 03, 2015 at 01:25:07PM +0100, Thierry Reding wrote: Sorry for my ignorance, but I don't understand what IOMMU groups are supposed to be or how to make use of them. It seems like a common idiom is to simply allocate a new group and add a device to it in the IOMMU's -add_device()

Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-02-03 Thread Thierry Reding
On Tue, Jan 27, 2015 at 01:08:57AM +0100, Joerg Roedel wrote: From: Joerg Roedel jroe...@suse.de This patch changes the behavior of the iommu_attach_device and iommu_detach_device functions. With this change these functions only work on devices that have their own group. For all other

Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-02-02 Thread Will Deacon
On Fri, Jan 30, 2015 at 12:28:14PM +, Joerg Roedel wrote: On Wed, Jan 28, 2015 at 02:35:24PM +, Will Deacon wrote: On Tue, Jan 27, 2015 at 12:08:57AM +, Joerg Roedel wrote: @@ -51,6 +51,7 @@ struct iommu_group { void (*iommu_data_release)(void *iommu_data); char *name;

Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-01-30 Thread Joerg Roedel
On Wed, Jan 28, 2015 at 02:35:24PM +, Will Deacon wrote: On Tue, Jan 27, 2015 at 12:08:57AM +, Joerg Roedel wrote: @@ -51,6 +51,7 @@ struct iommu_group { void (*iommu_data_release)(void *iommu_data); char *name; int id; + unsigned dev_cnt; Is this actually used

Re: [PATCH 3/5] iommu: Limit iommu_attach/detach_device to devices with their own group

2015-01-28 Thread Will Deacon
On Tue, Jan 27, 2015 at 12:08:57AM +, Joerg Roedel wrote: From: Joerg Roedel jroe...@suse.de This patch changes the behavior of the iommu_attach_device and iommu_detach_device functions. With this change these functions only work on devices that have their own group. For all other