Re: [PATCH RFC v2 03/11] iommu/sva: Add iommu_domain type for SVA

2022-04-02 Thread Jason Gunthorpe via iommu
On Sat, Apr 02, 2022 at 08:43:16AM +, Tian, Kevin wrote: > > This assumes any domain is interchangeable with any device, which is > > not the iommu model. We need a domain op to check if a device is > > compatiable with the domain for vfio an iommufd, this should do the > > same. > > This

Re: [PATCH RFC v2 02/11] iommu: Add iommu_group_singleton_lockdown()

2022-04-02 Thread Jason Gunthorpe via iommu
On Sat, Apr 02, 2022 at 07:12:12AM +, Tian, Kevin wrote: > That is one scenario of dma aliasing. Another is like Alex replied where > one device has an alias requestor ID due to PCI quirks. The alias RID > may or may not map to a real device but probably what we really care > here regarding

[PATCH] iommu/fsl_pamu: Prepare cleanup of powerpc's asm/prom.h

2022-04-02 Thread Christophe Leroy
powerpc's asm/prom.h brings some headers that it doesn't need itself. In order to clean it up, first add missing headers in users of asm/prom.h Signed-off-by: Christophe Leroy --- drivers/iommu/fsl_pamu.c| 3 +++ drivers/iommu/fsl_pamu_domain.c | 1 + 2 files changed, 4 insertions(+)

RE: [PATCH RFC v2 03/11] iommu/sva: Add iommu_domain type for SVA

2022-04-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, March 31, 2022 3:02 AM > > On Tue, Mar 29, 2022 at 01:37:52PM +0800, Lu Baolu wrote: > > @@ -95,6 +101,7 @@ struct iommu_domain { > > void *handler_token; > > struct iommu_domain_geometry geometry; > > struct iommu_dma_cookie *iova_cookie; >

RE: [PATCH RFC v2 02/11] iommu: Add iommu_group_singleton_lockdown()

2022-04-02 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, March 30, 2022 10:30 PM > > On Wed, Mar 30, 2022 at 02:12:57PM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Wednesday, March 30, 2022 7:58 PM > > > > > > On Wed, Mar 30, 2022 at 06:50:11AM +, Tian, Kevin wrote: > > > > > > > One