common.c (7dcb3c87d87cbf3359c9bbef8066e5195ee92f4d) | common.c (3a6813b68cf21a366522564f83f885bf2657dcc8) |
---|---|
1/* 2 * generic functions used by VFIO devices 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Authors: 7 * Alex Williamson <alex.williamson@redhat.com> 8 * --- 168 unchanged lines hidden (view full) --- 177 migration->device_state == VFIO_DEVICE_STATE_PRE_COPY_P2P; 178} 179 180static bool vfio_devices_all_dirty_tracking(VFIOContainerBase *bcontainer) 181{ 182 VFIODevice *vbasedev; 183 MigrationState *ms = migrate_get_current(); 184 | 1/* 2 * generic functions used by VFIO devices 3 * 4 * Copyright Red Hat, Inc. 2012 5 * 6 * Authors: 7 * Alex Williamson <alex.williamson@redhat.com> 8 * --- 168 unchanged lines hidden (view full) --- 177 migration->device_state == VFIO_DEVICE_STATE_PRE_COPY_P2P; 178} 179 180static bool vfio_devices_all_dirty_tracking(VFIOContainerBase *bcontainer) 181{ 182 VFIODevice *vbasedev; 183 MigrationState *ms = migrate_get_current(); 184 |
185 if (ms->state != MIGRATION_STATUS_ACTIVE && | 185 if (!migration_is_active() && |
186 ms->state != MIGRATION_STATUS_DEVICE) { 187 return false; 188 } 189 190 QLIST_FOREACH(vbasedev, &bcontainer->device_list, container_next) { 191 VFIOMigration *migration = vbasedev->migration; 192 193 if (!migration) { --- 26 unchanged lines hidden (view full) --- 220 * Check if all VFIO devices are running and migration is active, which is 221 * essentially equivalent to the migration being in pre-copy phase. 222 */ 223bool 224vfio_devices_all_running_and_mig_active(const VFIOContainerBase *bcontainer) 225{ 226 VFIODevice *vbasedev; 227 | 186 ms->state != MIGRATION_STATUS_DEVICE) { 187 return false; 188 } 189 190 QLIST_FOREACH(vbasedev, &bcontainer->device_list, container_next) { 191 VFIOMigration *migration = vbasedev->migration; 192 193 if (!migration) { --- 26 unchanged lines hidden (view full) --- 220 * Check if all VFIO devices are running and migration is active, which is 221 * essentially equivalent to the migration being in pre-copy phase. 222 */ 223bool 224vfio_devices_all_running_and_mig_active(const VFIOContainerBase *bcontainer) 225{ 226 VFIODevice *vbasedev; 227 |
228 if (!migration_is_active(migrate_get_current())) { | 228 if (!migration_is_active()) { |
229 return false; 230 } 231 232 QLIST_FOREACH(vbasedev, &bcontainer->device_list, container_next) { 233 VFIOMigration *migration = vbasedev->migration; 234 235 if (!migration) { 236 return false; --- 1287 unchanged lines hidden --- | 229 return false; 230 } 231 232 QLIST_FOREACH(vbasedev, &bcontainer->device_list, container_next) { 233 VFIOMigration *migration = vbasedev->migration; 234 235 if (!migration) { 236 return false; --- 1287 unchanged lines hidden --- |