Alexey Kardashevskiy f682e9c244 memory: Add reporting of supported page sizes
Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate
uses when translating, however this information is not available outside
the translate context for various checks.

This adds a get_min_page_size callback to MemoryRegionIOMMUOps and
a wrapper for it so IOMMU users (such as VFIO) can know the minimum
actual page size supported by an IOMMU.

As IOMMU MR represents a guest IOMMU, this uses TARGET_PAGE_SIZE
as fallback.

This removes vfio_container_granularity() and uses new helper in
memory_region_iommu_replay() when replaying IOMMU mappings on added
IOMMU memory region.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
[dwg: Removed an unnecessary calculation]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-06-22 11:13:09 +10:00
..
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-17 16:33:48 +10:00
2016-05-29 09:11:10 +02:00
2016-06-14 15:59:13 +01:00
2016-06-14 15:59:15 +01:00
2016-06-20 22:30:34 +01:00
2016-05-18 15:04:27 +03:00
2016-06-07 18:02:48 +03:00
2016-05-29 09:11:10 +02:00
2016-06-07 15:39:28 +03:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-17 03:28:03 +03:00
2016-01-29 15:07:25 +00:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-05-19 16:42:29 +02:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-20 22:30:34 +01:00
2016-06-16 18:39:03 +02:00
2016-05-23 13:30:03 +02:00
2015-12-22 18:39:19 +02:00