Skip to content

Commit cbeb1b7

Browse files
Joelgranadosjoergroedel
authored andcommitted
iommufd: Enable PRI when doing the iommufd_hwpt_alloc
Add IOMMU_HWPT_FAULT_ID_VALID as part of the valid flags when doing an iommufd_hwpt_alloc allowing the use of an iommu fault allocation (iommu_fault_alloc) with the IOMMU_HWPT_ALLOC ioctl. Reviewed-by: Kevin Tian <[email protected]> Signed-off-by: Joel Granados <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 140f5de commit cbeb1b7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3315,7 +3315,8 @@ intel_iommu_domain_alloc_user(struct device *dev, u32 flags,
33153315
}
33163316

33173317
if (flags &
3318-
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING)))
3318+
(~(IOMMU_HWPT_ALLOC_NEST_PARENT | IOMMU_HWPT_ALLOC_DIRTY_TRACKING
3319+
| IOMMU_HWPT_FAULT_ID_VALID)))
33193320
return ERR_PTR(-EOPNOTSUPP);
33203321
if (nested_parent && !nested_supported(iommu))
33213322
return ERR_PTR(-EOPNOTSUPP);

drivers/iommu/iommufd/hw_pagetable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ iommufd_hwpt_paging_alloc(struct iommufd_ctx *ictx, struct iommufd_ioas *ioas,
107107
const struct iommu_user_data *user_data)
108108
{
109109
const u32 valid_flags = IOMMU_HWPT_ALLOC_NEST_PARENT |
110-
IOMMU_HWPT_ALLOC_DIRTY_TRACKING;
110+
IOMMU_HWPT_ALLOC_DIRTY_TRACKING |
111+
IOMMU_HWPT_FAULT_ID_VALID;
111112
const struct iommu_ops *ops = dev_iommu_ops(idev->dev);
112113
struct iommufd_hwpt_paging *hwpt_paging;
113114
struct iommufd_hw_pagetable *hwpt;

0 commit comments

Comments
 (0)