Re: [PATCH v6 02/12] iommu: Add pasid_bits field in struct dev_iommu

2022-05-11 Thread Jason Gunthorpe via iommu
On Wed, May 11, 2022 at 09:00:50AM +0100, Jean-Philippe Brucker wrote: > > /** > > * struct iommu_device - IOMMU core representation of one IOMMU hardware > > * instance > > * @list: Used by the iommu-core to keep a list of registered iommus > > * @ops: iommu-ops for

Re: [PATCH v6 02/12] iommu: Add pasid_bits field in struct dev_iommu

2022-05-11 Thread Jean-Philippe Brucker
On Wed, May 11, 2022 at 10:25:48AM +0800, Baolu Lu wrote: > On 2022/5/10 22:34, Jason Gunthorpe wrote: > > On Tue, May 10, 2022 at 02:17:28PM +0800, Lu Baolu wrote: > > > > > int iommu_device_register(struct iommu_device *iommu, > > > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >

Re: [PATCH v6 02/12] iommu: Add pasid_bits field in struct dev_iommu

2022-05-10 Thread Baolu Lu
On 2022/5/10 22:34, Jason Gunthorpe wrote: On Tue, May 10, 2022 at 02:17:28PM +0800, Lu Baolu wrote: int iommu_device_register(struct iommu_device *iommu, diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 627a3ed5ee8f..afc63fce6107

Re: [PATCH v6 02/12] iommu: Add pasid_bits field in struct dev_iommu

2022-05-10 Thread Jason Gunthorpe via iommu
On Tue, May 10, 2022 at 02:17:28PM +0800, Lu Baolu wrote: > int iommu_device_register(struct iommu_device *iommu, > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c > index 627a3ed5ee8f..afc63fce6107 100644 > +++

[PATCH v6 02/12] iommu: Add pasid_bits field in struct dev_iommu

2022-05-10 Thread Lu Baolu
Use this field to save the pasid/ssid bits that a device is able to support with its IOMMU hardware. It is a generic attribute of a device and lifting it into the per-device dev_iommu struct makes it possible to allocate a PASID for device without calls into the IOMMU drivers. Any iommu driver