qemu-e2k/hw/vfio
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
..
amd-xgbe.c all: Clean up includes 2016-02-23 12:43:05 +00:00
calxeda-xgmac.c hw/vfio: Clean up includes 2016-01-29 15:07:24 +00:00
common.c memory: Add reporting of supported page sizes 2016-06-22 11:13:09 +10:00
Makefile.objs hw/vfio/platform: amd-xgbe device 2016-02-19 09:42:29 -07:00
pci-quirks.c vfio/pci: Add a separate option for IGD OpRegion support 2016-05-26 11:12:03 -06:00
pci.c os-posix: include sys/mman.h 2016-06-16 18:39:03 +02:00
pci.h vfio/pci: Add a separate option for IGD OpRegion support 2016-05-26 11:12:03 -06:00
platform.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
trace-events trace: split out trace events for hw/vfio/ directory 2016-06-20 17:22:16 +01:00