diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/migration.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/migration.c b/lib/migration.c index 31a8d9d..c4eb6f6 100644 --- a/lib/migration.c +++ b/lib/migration.c @@ -450,6 +450,12 @@ migration_region_access(vfu_ctx_t *vfu_ctx, char *buf, size_t count, assert(migr != NULL); assert(buf != NULL); + /* + * FIXME don't call the device callback if the migration state is in not in + * pre-copy/stop-and-copy/resuming state, since the behavior is undefined + * in that case. + */ + if (pos + count <= sizeof(struct vfio_device_migration_info)) { ret = migration_region_access_registers(vfu_ctx, buf, count, pos, is_write); |