summaryrefslogtreecommitdiff
path: root/.get_maintainer.ignore
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2022-10-25 14:56:54 +0300
committerJoerg Roedel <jroedel@suse.de>2022-11-03 17:40:53 +0300
commitcbf7827bc5dcfa4301aaea6f57eba9a94dbee7b1 (patch)
treeff3207db4bdbee5eef430d32b27d176fbc885296 /.get_maintainer.ignore
parent1a3a7d64bbce3179401f4e691522ff992aa1b8a1 (diff)
downloadlinux-cbf7827bc5dcfa4301aaea6f57eba9a94dbee7b1.tar.xz
iommu/s390: Fix potential s390_domain aperture shrinking
The s390 IOMMU driver currently sets the IOMMU domain's aperture to match the device specific DMA address range of the device that is first attached. This is not ideal. For one if the domain has no device attached in the meantime the aperture could be shrunk allowing translations outside the aperture to exist in the translation tables. Also this is a bit of a misuse of the aperture which really should describe what addresses can be translated and not some device specific limitations. Instead of misusing the aperture like this we can instead create reserved ranges for the ranges inaccessible to the attached devices allowing devices with overlapping ranges to still share an IOMMU domain. This also significantly simplifies s390_iommu_attach_device() allowing us to move the aperture check to the beginning of the function and removing the need to hold the device list's lock to check the aperture. As we then use the same aperture for all domains and it only depends on the table properties we can already check zdev->start_dma/end_dma at probe time and turn the check on attach into a WARN_ON(). Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Link: https://lore.kernel.org/r/20221025115657.1666860-4-schnelle@linux.ibm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to '.get_maintainer.ignore')
0 files changed, 0 insertions, 0 deletions