There is no need for vfio_dma_unmap_dirty_sync_needed(), as it simply
calls vfio_devices_all_dirty_tracking_started().
Drop vfio_dma_unmap_dirty_sync_needed(), export
vfio_devices_all_dirty_tracking_started() and use it instead.
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
---
include/hw/vfio/vfio-common.h | 3 ++-
hw/vfio/common.c | 9 ++-------
hw/vfio/container.c | 2 +-
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index c23ca34871..c5aa606890 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -296,7 +296,8 @@ bool vfio_migration_realize(VFIODevice *vbasedev, Error
**errp);
void vfio_migration_exit(VFIODevice *vbasedev);
int vfio_bitmap_alloc(VFIOBitmap *vbmap, hwaddr size);
-bool vfio_dma_unmap_dirty_sync_needed(const VFIOContainerBase *bcontainer);
+bool vfio_devices_all_dirty_tracking_started(
+ const VFIOContainerBase *bcontainer);
bool
vfio_devices_all_device_dirty_tracking(const VFIOContainerBase *bcontainer);
int vfio_devices_query_dirty_bitmap(const VFIOContainerBase *bcontainer,
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 45783982c9..6e4654218a 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -184,8 +184,8 @@ static bool vfio_devices_all_device_dirty_tracking_started(
return true;
}
-static bool
-vfio_devices_all_dirty_tracking_started(const VFIOContainerBase *bcontainer)
+bool vfio_devices_all_dirty_tracking_started(
+ const VFIOContainerBase *bcontainer)
{
if (!migration_is_running()) {
return false;
@@ -235,11 +235,6 @@ bool vfio_devices_all_device_dirty_tracking(const
VFIOContainerBase *bcontainer)
return true;
}
-bool vfio_dma_unmap_dirty_sync_needed(const VFIOContainerBase *bcontainer)
-{
- return vfio_devices_all_dirty_tracking_started(bcontainer);
-}
-