lkml.org 
[lkml]   [2024]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFCv1 07/14] iommufd: Add viommu set/unset_dev_id ops
On Fri, Apr 12, 2024 at 08:47:04PM -0700, Nicolin Chen wrote:
> @@ -94,9 +94,13 @@ struct iommufd_viommu {
> * struct iommufd_viommu_ops - viommu specific operations
> * @free: Free all driver-specific parts of an iommufd_viommu. The memory
> * of the entire viommu will be free-ed by iommufd core
> + * @set/unset_dev_id: set/unset a user space virtual id for a device
> */
> struct iommufd_viommu_ops {
> void (*free)(struct iommufd_viommu *viommu);
> + int (*set_dev_id)(struct iommufd_viommu *viommu,
> + struct device *dev, u64 dev_id);
> + void (*unset_dev_id)(struct iommufd_viommu *viommu, struct
> device *dev);

Actually, looking at this more closely, why doesn't the core pass in
dev_id to unset_dev_id? Not doing so seems like it will crease a bunch
of unnecessary work for the driver.

Jason

\
 
 \ /
  Last update: 2024-05-27 18:25    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog