aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2024-07-01 10:48:56 +0200
committerCédric Le Goater <clg@redhat.com>2024-07-09 11:50:37 +0200
commit8fe0ebe15d7775be72b1aaceb7405b68d3ec6368 (patch)
treedc1cd40914bd7bc4e539d6c74b9000b121e08da4 /include
parentd59ca1ca17480fc776aa02bf536ca3c87dc79323 (diff)
downloadqemu-8fe0ebe15d7775be72b1aaceb7405b68d3ec6368.zip
qemu-8fe0ebe15d7775be72b1aaceb7405b68d3ec6368.tar.gz
qemu-8fe0ebe15d7775be72b1aaceb7405b68d3ec6368.tar.bz2
HostIOMMUDevice: Introduce get_page_size_mask() callback
This callback will be used to retrieve the page size mask supported along a given Host IOMMU device. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/vfio/vfio-container-base.h7
-rw-r--r--include/sysemu/host_iommu_device.h8
2 files changed, 15 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h
index 45d7c40..62a8b60 100644
--- a/include/hw/vfio/vfio-container-base.h
+++ b/include/hw/vfio/vfio-container-base.h
@@ -88,6 +88,13 @@ int vfio_container_query_dirty_bitmap(const VFIOContainerBase *bcontainer,
GList *vfio_container_get_iova_ranges(const VFIOContainerBase *bcontainer);
+static inline uint64_t
+vfio_container_get_page_size_mask(const VFIOContainerBase *bcontainer)
+{
+ assert(bcontainer);
+ return bcontainer->pgsizes;
+}
+
#define TYPE_VFIO_IOMMU "vfio-iommu"
#define TYPE_VFIO_IOMMU_LEGACY TYPE_VFIO_IOMMU "-legacy"
#define TYPE_VFIO_IOMMU_SPAPR TYPE_VFIO_IOMMU "-spapr"
diff --git a/include/sysemu/host_iommu_device.h b/include/sysemu/host_iommu_device.h
index 05c7324..c1bf74a 100644
--- a/include/sysemu/host_iommu_device.h
+++ b/include/sysemu/host_iommu_device.h
@@ -89,6 +89,14 @@ struct HostIOMMUDeviceClass {
* @hiod: handle to the host IOMMU device
*/
GList* (*get_iova_ranges)(HostIOMMUDevice *hiod);
+ /**
+ *
+ * @get_page_size_mask: Return the page size mask supported along this
+ * @hiod Host IOMMU device
+ *
+ * @hiod: handle to the host IOMMU device
+ */
+ uint64_t (*get_page_size_mask)(HostIOMMUDevice *hiod);
};
/*