diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-02-23 16:14:17 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-02-23 16:14:17 +0000 |
commit | 1b1624092d1f1f746adea6e1237a07f6788c2e3d (patch) | |
tree | 3dab4aad5542d376ee78ecfb79c14df12d9a7123 /migration | |
parent | 3174c64bb7140d847bec33b14d52821d0a8df04d (diff) | |
parent | b82fc321bf02aaceea0beb4dfabb4ca86a9a5ff6 (diff) |
Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20160223-1' into staging
spice: initial opengl/virgl support, postcopy migration fix.
# gpg: Signature made Tue 23 Feb 2016 12:30:40 GMT using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
* remotes/spice/tags/pull-spice-20160223-1:
Postcopy+spice: Pass spice migration data earlier
spice/gl: tweak debug messages.
spice/gl: add unblock timer
spice: add opengl/virgl/dmabuf support
spice: reset cursor on resize
egl-helpers: add functions for render nodes and dma-buf passing
configure: add dma-buf support detection.
spice: init dcl before registering qxl interface
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index a64cfcdb07..fc5e50b0be 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -905,6 +905,11 @@ bool migration_in_postcopy(MigrationState *s) return (s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE); } +bool migration_in_postcopy_after_devices(MigrationState *s) +{ + return migration_in_postcopy(s) && s->postcopy_after_devices; +} + MigrationState *migrate_init(const MigrationParams *params) { MigrationState *s = migrate_get_current(); @@ -930,6 +935,7 @@ MigrationState *migrate_init(const MigrationParams *params) s->setup_time = 0; s->dirty_sync_count = 0; s->start_postcopy = false; + s->postcopy_after_devices = false; s->migration_thread_running = false; s->last_req_rb = NULL; @@ -1489,6 +1495,14 @@ static int postcopy_start(MigrationState *ms, bool *old_vm_running) goto fail_closefb; } qemu_fclose(fb); + + /* Send a notify to give a chance for anything that needs to happen + * at the transition to postcopy and after the device state; in particular + * spice needs to trigger a transition now + */ + ms->postcopy_after_devices = true; + notifier_list_notify(&migration_state_notifiers, ms); + ms->downtime = qemu_clock_get_ms(QEMU_CLOCK_REALTIME) - time_at_stop; qemu_mutex_unlock_iothread(); |