Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
Hi Gerald, On Fri, Apr 28, 2017 at 08:06:12PM +0200, Gerald Schaefer wrote: > On Fri, 28 Apr 2017 16:55:13 +0200 > Joerg Roedel wrote: > Also, IIRC, add_device will get called before attach_dev. Currently we > allow to attach more than one device (apparently from different

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
On Fri, Apr 28, 2017 at 05:25:20PM +0200, Sebastian Ott wrote: > On Fri, 28 Apr 2017, Joerg Roedel wrote: > > That sounds special :) So will every function of a single device end up > > as a seperate device on a seperate root-bus? > > Yes. That's true even for multi-function and SRIOV. Okay, so

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Gerald Schaefer
On Fri, 28 Apr 2017 16:55:13 +0200 Joerg Roedel wrote: > > I am however a bit confused now, about how we would have allowed group > > sharing with the current s390 IOMMU code, or IOW in which scenario would > > iommu_group_get() in the add_device callback find a shareable

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Sebastian Ott
On Fri, 28 Apr 2017, Joerg Roedel wrote: > On Fri, Apr 28, 2017 at 02:46:34PM +0200, Gerald Schaefer wrote: > > On Thu, 27 Apr 2017 23:03:25 +0200 > > Joerg Roedel wrote: > > > > > > Well, there is a separate zpci_dev for each pci_dev on s390, > > > > and each of those has its

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Joerg Roedel
Hi Gerald, On Fri, Apr 28, 2017 at 02:46:34PM +0200, Gerald Schaefer wrote: > On Thu, 27 Apr 2017 23:03:25 +0200 > Joerg Roedel wrote: > > > > Well, there is a separate zpci_dev for each pci_dev on s390, > > > and each of those has its own separate dma-table (thus not shared).

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-28 Thread Gerald Schaefer
Hi Joerg, I guess we are a bit special on s390 (again), see below. Sebastian is more familiar with the base s390 PCI code, he may correct me if I'm wrong. On Thu, 27 Apr 2017 23:03:25 +0200 Joerg Roedel wrote: > > Well, there is a separate zpci_dev for each pci_dev on s390, >

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-27 Thread Joerg Roedel
Hi Gerald, thanks for your reply. I have some more questions, please see below. On Thu, Apr 27, 2017 at 08:10:18PM +0200, Gerald Schaefer wrote: > Well, there is a separate zpci_dev for each pci_dev on s390, > and each of those has its own separate dma-table (thus not shared). Is that true for

Re: [RFC PATCH 0/2] iommu/s390: Fix iommu-groups and add sysfs support

2017-04-27 Thread Gerald Schaefer
On Thu, 27 Apr 2017 17:28:23 +0200 Joerg Roedel wrote: > Hey, > > here are two patches for the s390 PCI and IOMMU code. It is > based on the assumption that every pci_dev that points to > the same zpci_dev shares a single dma-table (and thus a > single address space). Well,