Re: [PATCH] iommu/vt-d: Fix sysfs leak in alloc_domain()

2021-04-21 Thread Lu Baolu
Hi Rolf, On 4/22/21 1:39 PM, Rolf Eike Beer wrote: iommu_device_sysfs_add() is called before, so is has to be cleaned on subsequent errors. Fixes: 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device") Cc: sta...@vger.kernel.org # 4.11.x Signed-off-by: Rolf Eike Beer Acked-by:

[PATCH] iommu/vt-d: Fix sysfs leak in alloc_domain()

2021-04-21 Thread Rolf Eike Beer
iommu_device_sysfs_add() is called before, so is has to be cleaned on subsequent errors. Fixes: 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device") Cc: sta...@vger.kernel.org # 4.11.x Signed-off-by: Rolf Eike Beer --- drivers/iommu/intel/dmar.c | 4 +++- 1 file changed, 3

Re: [PATCH] Intel IOMMU: fix sysfs leak in hotplug init path

2021-04-21 Thread Lu Baolu
Hi Rolf, On 4/21/21 11:12 PM, Rolf Eike Beer wrote: Signed-off-by: Rolf Eike Beer Thanks for the patch! Can you please adjust the subject to "iommu/vt-d: Fix sysfs leak in alloc_domain()"? It's not only for hotplug path. Please also add commit message. Add below Fixes tag as well: Fixes:

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Jason Gunthorpe
On Wed, Apr 21, 2021 at 01:33:12PM -0600, Alex Williamson wrote: > > I still expect that VFIO_GROUP_SET_CONTAINER will be used to connect > > /dev/{ioasid,vfio} to the VFIO group and all the group and device > > logic stays inside VFIO. > > But that group and device logic is also tied to the

[PATCH] iommu/qcom: Cleanup resources in case of probe error path

2021-04-21 Thread Amey Narkhede
If device registration fails, remove sysfs attribute and if setting bus callbacks fails, unregister the device and cleanup the sysfs attribute. Signed-off-by: Amey Narkhede --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Alex Williamson
On Wed, 21 Apr 2021 14:52:03 -0300 Jason Gunthorpe wrote: > On Wed, Apr 21, 2021 at 10:54:51AM -0600, Alex Williamson wrote: > > > That's essentially replacing vfio-core, where I think we're more > > I am only talking about /dev/vfio here which is basically the IOMMU > interface part. > > I

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Jason Gunthorpe
On Wed, Apr 21, 2021 at 10:54:51AM -0600, Alex Williamson wrote: > That's essentially replacing vfio-core, where I think we're more I am only talking about /dev/vfio here which is basically the IOMMU interface part. I still expect that VFIO_GROUP_SET_CONTAINER will be used to connect

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Alex Williamson
On Wed, 21 Apr 2021 13:23:07 -0300 Jason Gunthorpe wrote: > On Wed, Apr 21, 2021 at 01:18:07PM +, Liu, Yi L wrote: > > > Ideally this new /dev/ioasid interface, and making use of it as a VFIO > > > IOMMU backend, should replace type1. > > > > yeah, just a double check, I think this also

Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Jason Gunthorpe
On Wed, Apr 21, 2021 at 01:18:07PM +, Liu, Yi L wrote: > > Ideally this new /dev/ioasid interface, and making use of it as a VFIO > > IOMMU backend, should replace type1. > > yeah, just a double check, I think this also requires a new set of uAPIs > (e.g. new MAP/UNMAP), which means the

[PATCH] Intel IOMMU: fix sysfs leak in hotplug init path

2021-04-21 Thread Rolf Eike Beer
Signed-off-by: Rolf Eike Beer --- drivers/iommu/intel/dmar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) I have not actually tested this but I guess it should match the code in free_iommu() just below. diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c index

RE: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs

2021-04-21 Thread Liu, Yi L
Hi Alex, > From: Alex Williamson > Sent: Friday, April 16, 2021 11:46 PM [...] > > This is not a tactic or excuse for not working on the new /dev/ioasid > > interface. In fact, I believe we can benefit from the lessons learned > > while completing the existing. This will give confidence to the

Re: [RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-21 Thread Sakari Ailus
On Tue, Apr 20, 2021 at 05:54:57PM +0300, Andy Shevchenko wrote: > On Tue, Apr 20, 2021 at 05:37:27PM +0300, Sakari Ailus wrote: > > On Tue, Apr 20, 2021 at 02:55:33PM +0300, Andy Shevchenko wrote: > > > On Tue, Apr 20, 2021 at 01:56:40PM +0300, Sakari Ailus wrote: > > > > On Tue, Apr 20, 2021 at

Re: [PATCH v3 04/10] iommu/dma: Add a helper function to reserve RMRs for IOMMU drivers

2021-04-21 Thread kernel test robot
Hi Shameer, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on pm/linux-next] [also build test WARNING on arm/for-next soc/for-next arm64/for-next/core linus/master v5.12-rc8] [cannot apply to iommu/next xlnx/master next-20210420] [If your patch is applied to the

Re: [PATCH v15 00/12] SMMUv3 Nested Stage Setup (IOMMU part)

2021-04-21 Thread Vivek Kumar Gautam
Hi Eric, On 4/11/21 4:42 PM, Eric Auger wrote: SMMUv3 Nested Stage Setup (IOMMU part) [snip] Eric Auger (12): iommu: Introduce attach/detach_pasid_table API iommu: Introduce bind/unbind_guest_msi iommu/smmuv3: Allow s1 and s2 configs to coexist iommu/smmuv3: Get prepared for