[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v11 08/10] vfio: Set IOMMU page size as per host supported page s
From: |
Jean-Philippe Brucker |
Subject: |
[PATCH v11 08/10] vfio: Set IOMMU page size as per host supported page size |
Date: |
Fri, 30 Oct 2020 19:05:08 +0100 |
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>
---
---
hw/vfio/common.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 13471ae2943..e66054b02a7 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -636,6 +636,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) {
--
2.29.1
- [PATCH v11 00/10] virtio-iommu: VFIO integration, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 01/10] virtio-iommu: Fix virtio_iommu_mr(), Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 04/10] virtio-iommu: Call memory notifiers in attach/detach, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 03/10] virtio-iommu: Add memory notifiers for map/unmap, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 06/10] virtio-iommu: Add notify_flag_changed() memory region callback, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 02/10] virtio-iommu: Store memory region in endpoint struct, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 09/10] virtio-iommu: Set supported page size mask, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 08/10] vfio: Set IOMMU page size as per host supported page size,
Jean-Philippe Brucker <=
- [PATCH v11 10/10] vfio: Don't issue full 2^64 unmap, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 05/10] virtio-iommu: Add replay() memory region callback, Jean-Philippe Brucker, 2020/10/30
- [PATCH v11 07/10] memory: Add interface to set iommu page size mask, Jean-Philippe Brucker, 2020/10/30