File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ struct device;
16
16
struct file ;
17
17
struct iommu_group ;
18
18
struct iommu_user_data ;
19
+ struct iommu_user_data_array ;
19
20
struct iommufd_access ;
20
21
struct iommufd_ctx ;
21
22
struct iommufd_device ;
@@ -105,12 +106,21 @@ struct iommufd_viommu {
105
106
* must be defined in include/uapi/linux/iommufd.h.
106
107
* It must fully initialize the new iommu_domain before
107
108
* returning. Upon failure, ERR_PTR must be returned.
109
+ * @cache_invalidate: Flush hardware cache used by a vIOMMU. It can be used for
110
+ * any IOMMU hardware specific cache: TLB and device cache.
111
+ * The @array passes in the cache invalidation requests, in
112
+ * form of a driver data structure. A driver must update the
113
+ * array->entry_num to report the number of handled requests.
114
+ * The data structure of the array entry must be defined in
115
+ * include/uapi/linux/iommufd.h
108
116
*/
109
117
struct iommufd_viommu_ops {
110
118
void (* destroy )(struct iommufd_viommu * viommu );
111
119
struct iommu_domain * (* alloc_domain_nested )(
112
120
struct iommufd_viommu * viommu , u32 flags ,
113
121
const struct iommu_user_data * user_data );
122
+ int (* cache_invalidate )(struct iommufd_viommu * viommu ,
123
+ struct iommu_user_data_array * array );
114
124
};
115
125
116
126
#if IS_ENABLED (CONFIG_IOMMUFD )
You can’t perform that action at this time.
0 commit comments