summaryrefslogtreecommitdiffstats
path: root/ui/spice-core.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2016-02-22 17:17:32 +0000
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:45:30 -0600
commitf2dde00a7dfade0ed9ce7d7433b370ae6aab7783 (patch)
treec1e0e031265a69668750ff5f12414b646d2fae35 /ui/spice-core.c
parent2031576bc659a61d9b960ec51ce272783fc14d92 (diff)
downloadhqemu-f2dde00a7dfade0ed9ce7d7433b370ae6aab7783.zip
hqemu-f2dde00a7dfade0ed9ce7d7433b370ae6aab7783.tar.gz
Postcopy+spice: Pass spice migration data earlier
Spice hooks the migration status changes to figure out when to transmit information to the new spice server; but the migration status in postcopy doesn't quite fit - the destination starts running before the end of the source migration. It's not a case of hanging off the migration status change to postcopy-active either, since that happens before we stop the guest CPU. Fix it by sending a notify just after sending the device state, and adding a flag that can be tested by the notify receiver. Symptom: spice handover doesn't work with the error: red_worker.c:11540:display_channel_wait_for_migrate_data: timeout Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Message-id: 1456161452-25318-1-git-send-email-dgilbert@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r--ui/spice-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 5abec17..a68a665 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -573,7 +573,8 @@ static void migration_state_notifier(Notifier *notifier, void *data)
if (migration_in_setup(s)) {
spice_server_migrate_start(spice_server);
- } else if (migration_has_finished(s)) {
+ } else if (migration_has_finished(s) ||
+ migration_in_postcopy_after_devices(s)) {
spice_server_migrate_end(spice_server, true);
spice_have_target_host = false;
} else if (migration_has_failed(s)) {
OpenPOWER on IntegriCloud