Re: [PATCH v10 05/12] iommu: Add IOMMU SVA domain support

From: Jason Gunthorpe
Date: Sat Jul 23 2022 - 10:15:26 EST


On Tue, Jul 05, 2022 at 01:07:03PM +0800, Lu Baolu wrote:
> The sva iommu_domain represents a hardware pagetable that the IOMMU
> hardware could use for SVA translation. This adds some infrastructure
> to support SVA domain in the iommu common layer. It includes:
>
> - Extend the iommu_domain to support a new IOMMU_DOMAIN_SVA domain
> type. The IOMMU drivers that support allocation of the SVA domain
> should provide its own sva domain specific iommu_domain_ops.
> - Add a helper to allocate an SVA domain. The iommu_domain_free()
> is still used to free an SVA domain.
>
> The report_iommu_fault() should be replaced by the new
> iommu_report_device_fault(). Leave the existing fault handler with the
> existing users and the newly added SVA members excludes it.
>
> Suggested-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Signed-off-by: Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
> Reviewed-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> Tested-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
> Tested-by: Tony Zhu <tony.zhu@xxxxxxxxx>
> ---
> include/linux/iommu.h | 24 ++++++++++++++++++++++--
> drivers/iommu/iommu.c | 20 ++++++++++++++++++++
> 2 files changed, 42 insertions(+), 2 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason