vfio_mig_active() is part of the VFIO migration API. Move the definitions where VFIO migration is implemented.
Reviewed-by: Avihai Horon <avih...@nvidia.com> Reviewed-by: John Levon <john.le...@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-2-...@redhat.com Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-2-...@redhat.com Signed-off-by: Cédric Le Goater <c...@redhat.com> --- hw/vfio/common.c | 16 ---------------- hw/vfio/migration.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index a591ce5b97ff41cdc8249e9eeafc8dc347d45fac..e0482a796ff89afae2f017ae4e87f6f4056328fe 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -66,22 +66,6 @@ int vfio_kvm_device_fd = -1; * Device state interfaces */ -bool vfio_mig_active(void) -{ - VFIODevice *vbasedev; - - if (QLIST_EMPTY(&vfio_device_list)) { - return false; - } - - QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { - if (vbasedev->migration_blocker) { - return false; - } - } - return true; -} - static Error *multiple_devices_migration_blocker; /* diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index fbff46cfc35e0ee69e9599c9f8efc7437bbe3370..b5fb0d218808d010d8210612d3182dde8f33514b 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -1062,6 +1062,22 @@ void vfio_mig_add_bytes_transferred(unsigned long val) qatomic_add(&bytes_transferred, val); } +bool vfio_mig_active(void) +{ + VFIODevice *vbasedev; + + if (QLIST_EMPTY(&vfio_device_list)) { + return false; + } + + QLIST_FOREACH(vbasedev, &vfio_device_list, global_next) { + if (vbasedev->migration_blocker) { + return false; + } + } + return true; +} + /* * Return true when either migration initialized or blocker registered. * Currently only return false when adding blocker fails which will -- 2.49.0