diff options
author | Bharat Bhushan <bbhushan2@marvell.com> | 2020-10-30 19:05:08 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-11-03 07:19:27 -0500 |
commit | b917749842493abdfa49f5265ea236c922c05cb2 (patch) | |
tree | 1de5518479fa548188fbeadaf17bd32f38b613f6 /hw | |
parent | 457f8cbbd80f631cee02057c3c844a43ca65b5c4 (diff) | |
download | qemu-b917749842493abdfa49f5265ea236c922c05cb2.zip qemu-b917749842493abdfa49f5265ea236c922c05cb2.tar.gz qemu-b917749842493abdfa49f5265ea236c922c05cb2.tar.bz2 |
vfio: Set IOMMU page size as per host supported page size
Set IOMMU supported page size mask same as host Linux supported page
size mask.
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Message-Id: <20201030180510.747225-9-jean-philippe@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/vfio/common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index e18ea2c..35895b1 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -789,6 +789,14 @@ static void vfio_listener_region_add(MemoryListener *listener, int128_get64(llend), iommu_idx); + ret = memory_region_iommu_set_page_size_mask(giommu->iommu, + container->pgsizes, + &err); + if (ret) { + g_free(giommu); + goto fail; + } + ret = memory_region_register_iommu_notifier(section->mr, &giommu->n, &err); if (ret) { |