I withdraw this patch. It is not needed if I save ioas_id in cpr-state.
- Steve
On 5/12/2025 11:32 AM, Steve Sistare wrote:
Export iommufd_cdev_get_info_iova_range, for use by CPR in a subsequent
patch to reconstruct the userland device state. No functional change.
Signed-off-by: Steve Sistare <steven.sist...@oracle.com>
---
hw/vfio/iommufd.c | 4 ++--
hw/vfio/vfio-iommufd.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 6eb417a..f645a62 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -459,8 +459,8 @@ static int iommufd_cdev_ram_block_discard_disable(bool
state)
return ram_block_uncoordinated_discard_disable(state);
}
-static bool iommufd_cdev_get_info_iova_range(VFIOIOMMUFDContainer *container,
- uint32_t ioas_id, Error **errp)
+bool iommufd_cdev_get_info_iova_range(VFIOIOMMUFDContainer *container,
+ uint32_t ioas_id, Error **errp)
{
VFIOContainerBase *bcontainer = &container->bcontainer;
g_autofree struct iommu_ioas_iova_ranges *info = NULL;
diff --git a/hw/vfio/vfio-iommufd.h b/hw/vfio/vfio-iommufd.h
index 07ea0f4..5615dcd 100644
--- a/hw/vfio/vfio-iommufd.h
+++ b/hw/vfio/vfio-iommufd.h
@@ -31,4 +31,7 @@ typedef struct VFIOIOMMUFDContainer {
OBJECT_DECLARE_SIMPLE_TYPE(VFIOIOMMUFDContainer, VFIO_IOMMU_IOMMUFD);
+bool iommufd_cdev_get_info_iova_range(VFIOIOMMUFDContainer *container,
+ uint32_t ioas_id, Error **errp);
+
#endif /* HW_VFIO_VFIO_IOMMUFD_H */