iommu/s390: allow larger region tables
authorMatthew Rosato <mjrosato@linux.ibm.com>
Fri, 11 Apr 2025 20:24:33 +0000 (16:24 -0400)
committerJoerg Roedel <jroedel@suse.de>
Thu, 17 Apr 2025 14:43:12 +0000 (16:43 +0200)
commit81244074b518aeb90de5f68e7e825564c29c5c50
tree70ea1e71d921d9f9831521eff53925ea9d6854ea
parentd5fbc5efbd98a6c49f9acfca8595efd0f1e59ad8
iommu/s390: allow larger region tables

Extend the aperture calculation to consider sizes beyond the maximum
size of a region third table.  Attempt to always use the smallest
table size possible to avoid unnecessary extra steps during translation.
Update reserved region calculations to use the appropriate table size.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Link: https://lore.kernel.org/r/20250411202433.181683-6-mjrosato@linux.ibm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
arch/s390/include/asm/pci_dma.h
drivers/iommu/s390-iommu.c