diff options
| author | Cédric Le Goater <clg@redhat.com> | 2025-03-26 08:50:52 +0100 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2025-04-25 09:01:37 +0200 |
| commit | eb6caa79162a89a8dcbe6a6d4788acd813b687a2 (patch) | |
| tree | 37d0c11dfd9e11909339743280740549e3f74a4c /hw/vfio/common.c | |
| parent | b553d2c414a1b5c5bd3bf8bce0b648ba7f8e2baf (diff) | |
| download | focaccia-qemu-eb6caa79162a89a8dcbe6a6d4788acd813b687a2.tar.gz focaccia-qemu-eb6caa79162a89a8dcbe6a6d4788acd813b687a2.zip | |
vfio: Move vfio_device_state_is_running/precopy() into migration.c
These routines are migration related. Move their declaration and implementation under the migration files. Reviewed-by: Prasad Pandit <pjp@fedoraproject.org> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-8-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/common.c')
| -rw-r--r-- | hw/vfio/common.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index bef5414dd7..8f55e7b212 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -66,22 +66,6 @@ int vfio_kvm_device_fd = -1; */ -bool vfio_device_state_is_running(VFIODevice *vbasedev) -{ - VFIOMigration *migration = vbasedev->migration; - - return migration->device_state == VFIO_DEVICE_STATE_RUNNING || - migration->device_state == VFIO_DEVICE_STATE_RUNNING_P2P; -} - -bool vfio_device_state_is_precopy(VFIODevice *vbasedev) -{ - VFIOMigration *migration = vbasedev->migration; - - return migration->device_state == VFIO_DEVICE_STATE_PRE_COPY || - migration->device_state == VFIO_DEVICE_STATE_PRE_COPY_P2P; -} - static bool vfio_devices_all_device_dirty_tracking_started( const VFIOContainerBase *bcontainer) { |