aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2024-06-14 11:52:53 +0200
committerCédric Le Goater <clg@redhat.com>2024-06-24 23:15:30 +0200
commit3ad35d9158bde0500aeaea4147345d39ad0ae1c0 (patch)
tree1257f28689104132debe7f8ffa26adb121131cbd /include/sysemu
parent817ef10da23cd9a6ee61c8f31f55b845c7a74760 (diff)
HostIOMMUDevice: Introduce get_iova_ranges callback
Introduce a new HostIOMMUDevice callback that allows to retrieve the usable IOVA ranges. Implement this callback in the legacy VFIO and IOMMUFD VFIO host iommu devices. This relies on the VFIODevice agent's base container iova_ranges resource. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/host_iommu_device.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sysemu/host_iommu_device.h b/include/sysemu/host_iommu_device.h
index 3e5f058e7b..40e0fa13ef 100644
--- a/include/sysemu/host_iommu_device.h
+++ b/include/sysemu/host_iommu_device.h
@@ -80,6 +80,14 @@ struct HostIOMMUDeviceClass {
* i.e., HOST_IOMMU_DEVICE_CAP_AW_BITS.
*/
int (*get_cap)(HostIOMMUDevice *hiod, int cap, Error **errp);
+ /**
+ * @get_iova_ranges: Return the list of usable iova_ranges along with
+ * @hiod Host IOMMU device
+ *
+ * @hiod: handle to the host IOMMU device
+ * @errp: error handle
+ */
+ GList* (*get_iova_ranges)(HostIOMMUDevice *hiod, Error **errp);
};
/*