vfio iommu: Add dma available capability
authorMatthew Rosato <mjrosato@linux.ibm.com>
Tue, 15 Sep 2020 19:05:18 +0000 (15:05 -0400)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 21 Sep 2020 20:58:34 +0000 (14:58 -0600)
commit7d6e1329652ed971d1b6e0e7bea66fba5044e271
treecc46122738f89fed688be8c3af783ed592a3a3eb
parentba4f184e126b751d1bffad5897f263108befc780
vfio iommu: Add dma available capability

Commit 492855939bdb ("vfio/type1: Limit DMA mappings per container")
added the ability to limit the number of memory backed DMA mappings.
However on s390x, when lazy mapping is in use, we use a very large
number of concurrent mappings.  Let's provide the current allowable
number of DMA mappings to userspace via the IOMMU info chain so that
userspace can take appropriate mitigation.

Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio_iommu_type1.c
include/uapi/linux/vfio.h