RE: [PATCH v5 07/13] iommufd/viommu: Add iommufd_viommu_find_dev helper

2024-10-29 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Monday, October 28, 2024 6:49 AM > > On Sun, Oct 27, 2024 at 11:02:31PM +0800, Zhangfei Gao wrote: > > On Sat, 26 Oct 2024 at 07:51, Nicolin Chen wrote: > > > +/* Caller should xa_lock(&viommu->vdevs) to protect the return value > */ > > > +struct device *iommufd_vio

Re: [PATCH v5 07/13] iommufd/viommu: Add iommufd_viommu_find_dev helper

2024-10-27 Thread Nicolin Chen
On Sun, Oct 27, 2024 at 11:02:31PM +0800, Zhangfei Gao wrote: > On Sat, 26 Oct 2024 at 07:51, Nicolin Chen wrote: > > +/* Caller should xa_lock(&viommu->vdevs) to protect the return value */ > > +struct device *iommufd_viommu_find_dev(struct iommufd_viommu *viommu, > > +

Re: [PATCH v5 07/13] iommufd/viommu: Add iommufd_viommu_find_dev helper

2024-10-27 Thread Zhangfei Gao
On Sat, 26 Oct 2024 at 07:51, Nicolin Chen wrote: > > This avoids a bigger trouble of exposing struct iommufd_device and struct > iommufd_vdevice in the public header. > > Signed-off-by: Nicolin Chen > --- > include/linux/iommufd.h| 8 > drivers/iommu/iommufd/driver.c | 13

[PATCH v5 07/13] iommufd/viommu: Add iommufd_viommu_find_dev helper

2024-10-25 Thread Nicolin Chen
This avoids a bigger trouble of exposing struct iommufd_device and struct iommufd_vdevice in the public header. Signed-off-by: Nicolin Chen --- include/linux/iommufd.h| 8 drivers/iommu/iommufd/driver.c | 13 + 2 files changed, 21 insertions(+) diff --git a/include