diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-01-26 12:40:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-26 12:40:58 +0000 |
commit | 38d022b63b11e3f504dabab368ea87ff013c8e05 (patch) | |
tree | ea43113ec82b564dbd1639e5ae2b472c06151f21 | |
parent | 863cef18e7debf782afb6b66ebcb55a5ee139389 (diff) | |
download | libvfio-user-38d022b63b11e3f504dabab368ea87ff013c8e05.zip libvfio-user-38d022b63b11e3f504dabab368ea87ff013c8e05.tar.gz libvfio-user-38d022b63b11e3f504dabab368ea87ff013c8e05.tar.bz2 |
don't remain in wrong migration iteration state after data have been prepared (#257)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
-rw-r--r-- | lib/migration.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/migration.c b/lib/migration.c index 489a6fc..e991dbb 100644 --- a/lib/migration.c +++ b/lib/migration.c @@ -277,6 +277,14 @@ handle_data_offset_when_saving(vfu_ctx_t *vfu_ctx, struct migration *migr, if (ret < 0) { return ret; } + /* + * FIXME must first read data_offset and then data_size. They way we've + * implemented it now, if data_size is read before data_offset we + * transition to state VFIO_USER_MIGR_ITER_STATE_DATA_PREPARED without + * calling callbacks.prepare_data, which is wrong. Maybe we need + * separate states for data_offset and data_size. + */ + migr_state_transition(migr, VFIO_USER_MIGR_ITER_STATE_DATA_PREPARED); break; case VFIO_USER_MIGR_ITER_STATE_DATA_PREPARED: /* |