linux/drivers/iommu/intel
Jean-Philippe Brucker ac6d704679 iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops()
Passing a 64-bit address width to iommu_setup_dma_ops() is valid on
virtual platforms, but isn't currently possible. The overflow check in
iommu_dma_init_domain() prevents this even when @dma_base isn't 0. Pass
a limit address instead of a size, so callers don't have to fake a size
to work around the check.

The base and limit parameters are being phased out, because:
* they are redundant for x86 callers. dma-iommu already reserves the
  first page, and the upper limit is already in domain->geometry.
* they can now be obtained from dev->dma_range_map on Arm.
But removing them on Arm isn't completely straightforward so is left for
future work. As an intermediate step, simplify the x86 callers by
passing dummy limits.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20210618152059.1194210-5-jean-philippe@linaro.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2021-06-25 15:02:43 +02:00
..
cap_audit.c iommu/vt-d: Move capability check code to cap_audit files 2021-02-04 14:42:00 +01:00
cap_audit.h iommu/vt-d: Move capability check code to cap_audit files 2021-02-04 14:42:00 +01:00
debugfs.c iommu/vt-d: Rename intel-pasid.h to pasid.h 2020-07-24 10:51:21 +02:00
dmar.c iommu/vt-d: Fix sysfs leak in alloc_iommu() 2021-05-27 16:07:08 +02:00
iommu.c iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops() 2021-06-25 15:02:43 +02:00
irq_remapping.c pci-v5.13-changes 2021-05-05 13:24:11 -07:00
Kconfig iommu/vt-d: Convert intel iommu driver to the iommu ops 2020-11-25 12:03:49 +00:00
Makefile iommu/vt-d: Audit IOMMU Capabilities and add helper functions 2021-02-04 14:42:00 +01:00
pasid.c iommu/vt-d: Use user privilege for RID2PASID translation 2021-05-19 08:51:02 +02:00
pasid.h iommu/vt-d: Report right snoop capability when using FL for IOVA 2021-04-07 10:41:30 +02:00
svm.c iommu/vt-d: Report the right page fault address 2021-04-07 11:55:46 +02:00
trace.c