|
@@ -472,6 +472,8 @@ static int vfio_save_setup(QEMUFile *f, void *opaque, Error **errp)
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
|
+ migration->event_save_iterate_started = false;
|
|
|
+
|
|
|
if (vfio_precopy_supported(vbasedev)) {
|
|
|
switch (migration->device_state) {
|
|
|
case VFIO_DEVICE_STATE_RUNNING:
|
|
@@ -602,6 +604,11 @@ static int vfio_save_iterate(QEMUFile *f, void *opaque)
|
|
|
VFIOMigration *migration = vbasedev->migration;
|
|
|
ssize_t data_size;
|
|
|
|
|
|
+ if (!migration->event_save_iterate_started) {
|
|
|
+ trace_vfio_save_iterate_start(vbasedev->name);
|
|
|
+ migration->event_save_iterate_started = true;
|
|
|
+ }
|
|
|
+
|
|
|
data_size = vfio_save_block(f, migration);
|
|
|
if (data_size < 0) {
|
|
|
return data_size;
|
|
@@ -630,6 +637,8 @@ static int vfio_save_complete_precopy(QEMUFile *f, void *opaque)
|
|
|
int ret;
|
|
|
Error *local_err = NULL;
|
|
|
|
|
|
+ trace_vfio_save_complete_precopy_start(vbasedev->name);
|
|
|
+
|
|
|
/* We reach here with device state STOP or STOP_COPY only */
|
|
|
ret = vfio_migration_set_state(vbasedev, VFIO_DEVICE_STATE_STOP_COPY,
|
|
|
VFIO_DEVICE_STATE_STOP, &local_err);
|