diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2023-10-25 21:42:12 -0700 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2023-10-26 11:16:33 -0300 |
commit | 111bf85c68f6edb2d06c6705faab9d1649348bdb (patch) | |
tree | bc3ef1a6e4ca60f73371d56aeabde68a88ff2d42 /drivers/iommu/intel/pasid.h | |
parent | 79ae1eccd3f7fb010064c0f6242da8f8944c21fd (diff) |
iommu/vt-d: Add helper to setup pasid nested translation
The configurations are passed in from the user when the user domain is
allocated. This helper interprets these configurations according to the
data structure defined in uapi/linux/iommufd.h. The EINVAL error will be
returned if any of configurations are not compatible with the hardware
capabilities. The caller can retry with another compatible user domain.
The encoding of fields of each pasid entry is defined in section 9.6 of
the VT-d spec.
Link: https://lore.kernel.org/r/20231026044216.64964-5-yi.l.liu@intel.com
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/iommu/intel/pasid.h')
-rw-r--r-- | drivers/iommu/intel/pasid.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/intel/pasid.h b/drivers/iommu/intel/pasid.h index 958050b093aa..dd37611175cc 100644 --- a/drivers/iommu/intel/pasid.h +++ b/drivers/iommu/intel/pasid.h @@ -113,6 +113,8 @@ int intel_pasid_setup_dirty_tracking(struct intel_iommu *iommu, int intel_pasid_setup_pass_through(struct intel_iommu *iommu, struct dmar_domain *domain, struct device *dev, u32 pasid); +int intel_pasid_setup_nested(struct intel_iommu *iommu, struct device *dev, + u32 pasid, struct dmar_domain *domain); void intel_pasid_tear_down_entry(struct intel_iommu *iommu, struct device *dev, u32 pasid, bool fault_ignore); |