Skip to content

Commit ce15c13

Browse files
yiliu1765jgunthorpe
authored andcommitted
iommu/vt-d: Add IOMMU_HWPT_ALLOC_PASID support
Intel iommu driver just treats it as a nop since Intel VT-d does not have special requirement on domains attached to either the PASID or RID of a PASID-capable device. Link: https://patch.msgid.link/r/[email protected] Reviewed-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Signed-off-by: Yi Liu <[email protected]> Tested-by: Nicolin Chen <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 4c3f4f4 commit ce15c13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3338,7 +3338,8 @@ intel_iommu_domain_alloc_paging_flags(struct device *dev, u32 flags,
33383338
bool first_stage;
33393339

33403340
if (flags &
3341-
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING)))
3341+
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING |
3342+
IOMMU_HWPT_ALLOC_PASID)))
33423343
return ERR_PTR(-EOPNOTSUPP);
33433344
if (nested_parent && !nested_supported(iommu))
33443345
return ERR_PTR(-EOPNOTSUPP);

drivers/iommu/intel/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ intel_iommu_domain_alloc_nested(struct device *dev, struct iommu_domain *parent,
198198
struct dmar_domain *domain;
199199
int ret;
200200

201-
if (!nested_supported(iommu) || flags)
201+
if (!nested_supported(iommu) || flags & ~IOMMU_HWPT_ALLOC_PASID)
202202
return ERR_PTR(-EOPNOTSUPP);
203203

204204
/* Must be nested domain */

0 commit comments

Comments
 (0)