We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8596d6 commit c33e208Copy full SHA for c33e208
drivers/iommu/intel/iommu.c
@@ -4154,6 +4154,9 @@ static int intel_iommu_set_dev_pasid(struct iommu_domain *domain,
4154
struct dev_pasid_info *dev_pasid;
4155
int ret;
4156
4157
+ if (WARN_ON_ONCE(!(domain->type & __IOMMU_DOMAIN_PAGING)))
4158
+ return -EINVAL;
4159
+
4160
if (!pasid_supported(iommu) || dev_is_real_dma_subdevice(dev))
4161
return -EOPNOTSUPP;
4162
@@ -4182,8 +4185,7 @@ static int intel_iommu_set_dev_pasid(struct iommu_domain *domain,
4182
4185
4183
4186
domain_remove_dev_pasid(old, dev, pasid);
4184
4187
- if (domain->type & __IOMMU_DOMAIN_PAGING)
- intel_iommu_debugfs_create_dev_pasid(dev_pasid);
4188
+ intel_iommu_debugfs_create_dev_pasid(dev_pasid);
4189
4190
return 0;
4191
0 commit comments