diff options
| -rw-r--r-- | migration/savevm.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/migration/savevm.c b/migration/savevm.c index 8937496d9f..34b7a28d38 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2534,7 +2534,7 @@ static int loadvm_process_enable_colo(MigrationIncomingState *mis, return ret; } -static int loadvm_postcopy_handle_switchover_start(void) +static int loadvm_postcopy_handle_switchover_start(Error **errp) { SaveStateEntry *se; @@ -2547,6 +2547,7 @@ static int loadvm_postcopy_handle_switchover_start(void) ret = se->ops->switchover_start(se->opaque); if (ret < 0) { + error_setg(errp, "Switchover start failed: %d", ret); return ret; } } @@ -2655,11 +2656,7 @@ static int loadvm_process_command(QEMUFile *f, Error **errp) return loadvm_process_enable_colo(mis, errp); case MIG_CMD_SWITCHOVER_START: - ret = loadvm_postcopy_handle_switchover_start(); - if (ret < 0) { - error_setg(errp, "Failed to load device state command: %d", ret); - } - return ret; + return loadvm_postcopy_handle_switchover_start(errp); } return 0; |