[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 20/38] vfio: Set IOMMU page size as per host supported page siz
From: |
Michael S. Tsirkin |
Subject: |
[PULL v2 20/38] vfio: Set IOMMU page size as per host supported page size |
Date: |
Tue, 3 Nov 2020 23:51:36 -0500 |
From: Bharat Bhushan <bbhushan2@marvell.com>
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>
---
hw/vfio/common.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index e18ea2cf91..35895b18a6 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) {
--
MST
- [PULL v2 03/38] virtio-mem: Make sure "usable_region_size" is always multiples of the block size, (continued)
- [PULL v2 03/38] virtio-mem: Make sure "usable_region_size" is always multiples of the block size, Michael S. Tsirkin, 2020/11/03
- [PULL v2 04/38] virtio-mem: Probe THP size to determine default block size, Michael S. Tsirkin, 2020/11/03
- [PULL v2 05/38] memory-device: Support big alignment requirements, Michael S. Tsirkin, 2020/11/03
- [PULL v2 07/38] virito-mem: Implement get_min_alignment(), Michael S. Tsirkin, 2020/11/03
- [PULL v2 06/38] memory-device: Add get_min_alignment() callback, Michael S. Tsirkin, 2020/11/03
- [PULL v2 08/38] hw/acpi : Don't use '#' flag of printf format, Michael S. Tsirkin, 2020/11/03
- [PULL v2 13/38] virtio-iommu: Fix virtio_iommu_mr(), Michael S. Tsirkin, 2020/11/03
- [PULL v2 15/38] virtio-iommu: Add memory notifiers for map/unmap, Michael S. Tsirkin, 2020/11/03
- [PULL v2 17/38] virtio-iommu: Add replay() memory region callback, Michael S. Tsirkin, 2020/11/03
- [PULL v2 19/38] memory: Add interface to set iommu page size mask, Michael S. Tsirkin, 2020/11/03
- [PULL v2 20/38] vfio: Set IOMMU page size as per host supported page size,
Michael S. Tsirkin <=
- [PULL v2 21/38] virtio-iommu: Set supported page size mask, Michael S. Tsirkin, 2020/11/03
- [PULL v2 22/38] vfio: Don't issue full 2^64 unmap, Michael S. Tsirkin, 2020/11/03
- [PULL v2 23/38] vhost-vdpa: Add qemu_close in vhost_vdpa_cleanup, Michael S. Tsirkin, 2020/11/03
- [PULL v2 09/38] hw/acpi : add space before the open parenthesis '(', Michael S. Tsirkin, 2020/11/03
- [PULL v2 24/38] net: Add vhost-vdpa in show_netdevs(), Michael S. Tsirkin, 2020/11/03
- [PULL v2 25/38] Revert "vhost-blk: set features before setting inflight feature", Michael S. Tsirkin, 2020/11/03
- [PULL v2 26/38] vhost-blk: set features before setting inflight feature, Michael S. Tsirkin, 2020/11/03
- [PULL v2 27/38] libvhost-user: follow QEMU comment style, Michael S. Tsirkin, 2020/11/03
- [PULL v2 29/38] block/export: make vhost-user-blk config space little-endian, Michael S. Tsirkin, 2020/11/03
- [PULL v2 11/38] hw/virtio/vhost-backend: Fix Coverity CID 1432871, Michael S. Tsirkin, 2020/11/03