@@ -3250,10 +3250,15 @@ static int blocking_domain_attach_dev(struct iommu_domain *domain,
3250
3250
return 0 ;
3251
3251
}
3252
3252
3253
+ static int blocking_domain_set_dev_pasid (struct iommu_domain * domain ,
3254
+ struct device * dev , ioasid_t pasid ,
3255
+ struct iommu_domain * old );
3256
+
3253
3257
static struct iommu_domain blocking_domain = {
3254
3258
.type = IOMMU_DOMAIN_BLOCKED ,
3255
3259
.ops = & (const struct iommu_domain_ops ) {
3256
3260
.attach_dev = blocking_domain_attach_dev ,
3261
+ .set_dev_pasid = blocking_domain_set_dev_pasid ,
3257
3262
}
3258
3263
};
3259
3264
@@ -4099,13 +4104,16 @@ void domain_remove_dev_pasid(struct iommu_domain *domain,
4099
4104
kfree (dev_pasid );
4100
4105
}
4101
4106
4102
- static void intel_iommu_remove_dev_pasid (struct device * dev , ioasid_t pasid ,
4103
- struct iommu_domain * domain )
4107
+ static int blocking_domain_set_dev_pasid (struct iommu_domain * domain ,
4108
+ struct device * dev , ioasid_t pasid ,
4109
+ struct iommu_domain * old )
4104
4110
{
4105
4111
struct device_domain_info * info = dev_iommu_priv_get (dev );
4106
4112
4107
4113
intel_pasid_tear_down_entry (info -> iommu , dev , pasid , false);
4108
- domain_remove_dev_pasid (domain , dev , pasid );
4114
+ domain_remove_dev_pasid (old , dev , pasid );
4115
+
4116
+ return 0 ;
4109
4117
}
4110
4118
4111
4119
struct dev_pasid_info *
@@ -4478,7 +4486,6 @@ const struct iommu_ops intel_iommu_ops = {
4478
4486
.dev_disable_feat = intel_iommu_dev_disable_feat ,
4479
4487
.is_attach_deferred = intel_iommu_is_attach_deferred ,
4480
4488
.def_domain_type = device_def_domain_type ,
4481
- .remove_dev_pasid = intel_iommu_remove_dev_pasid ,
4482
4489
.pgsize_bitmap = SZ_4K ,
4483
4490
.page_response = intel_iommu_page_response ,
4484
4491
.default_domain_ops = & (const struct iommu_domain_ops ) {
0 commit comments