Commit 02edd2e7 authored by Stefan Hajnoczi's avatar Stefan Hajnoczi

migration: fix spice migration

Commit 29ae8a41 ("rdma: introduce
MIG_STATE_NONE and change MIG_STATE_SETUP state transition") changed the
state transitions during migration setup.

Spice used to be notified with MIG_STATE_ACTIVE and it detected this
using migration_is_active().  Spice is now notified with
MIG_STATE_SETUP and migration_is_active() no longer works.

Replace migration_is_active() with migration_in_setup() to fix spice

Cc: Michael R. Hines <>
Reviewed-by: default avatarKevin Wolf <>
Signed-off-by: default avatarStefan Hajnoczi <>
parent 9287ac27
......@@ -90,7 +90,7 @@ int migrate_fd_close(MigrationState *s);
void add_migration_state_change_notifier(Notifier *notify);
void remove_migration_state_change_notifier(Notifier *notify);
bool migration_is_active(MigrationState *);
bool migration_in_setup(MigrationState *);
bool migration_has_finished(MigrationState *);
bool migration_has_failed(MigrationState *);
MigrationState *migrate_get_current(void);
......@@ -338,9 +338,9 @@ void remove_migration_state_change_notifier(Notifier *notify)
bool migration_is_active(MigrationState *s)
bool migration_in_setup(MigrationState *s)
return s->state == MIG_STATE_ACTIVE;
return s->state == MIG_STATE_SETUP;
bool migration_has_finished(MigrationState *s)
......@@ -563,7 +563,7 @@ static void migration_state_notifier(Notifier *notifier, void *data)
MigrationState *s = data;
if (migration_is_active(s)) {
if (migration_in_setup(s)) {
} else if (migration_has_finished(s)) {
spice_server_migrate_end(spice_server, true);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment