Skip to content

Commit 333fcc1

Browse files
committed
iommu/vt-d: Add IOMMU_HWPT_ALLOC_PASID support
JIRA: https://issues.redhat.com/browse/RHEL-114131 Upstream-Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git commit ce15c13 Author: Yi Liu <yi.l.liu@intel.com> Date: Fri Mar 21 10:19:35 2025 -0700 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/20250321171940.7213-14-yi.l.liu@intel.com Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Yi Liu <yi.l.liu@intel.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> (cherry picked from commit ce15c13) Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>
1 parent 15129f6 commit 333fcc1

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
@@ -3383,7 +3383,8 @@ intel_iommu_domain_alloc_paging_flags(struct device *dev, u32 flags,
33833383
bool first_stage;
33843384

33853385
if (flags &
3386-
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING)))
3386+
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING |
3387+
IOMMU_HWPT_ALLOC_PASID)))
33873388
return ERR_PTR(-EOPNOTSUPP);
33883389
if (nested_parent && !nested_supported(iommu))
33893390
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)