mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
migration: Recover behavior of preempt channel creation for pre-7.2
In 8.0 devel window we reworked preempt channel creation, so that there'll be no race condition when the migration channel and preempt channel got established in the wrong order in commit5655aab079
. However no one noticed that the change will also be not compatible with older qemus, majorly 7.1/7.2 versions where preempt mode started to be supported. Leverage the same pre-7.2 flag introduced in the previous patch to recover the behavior hopefully before 8.0 releases, so we don't break migration when we migrate from 8.0 to older qemu binaries. Fixes:5655aab079
("migration: Postpone postcopy preempt channel to be after main") Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
6621883f93
commit
06064a6715
3 changed files with 24 additions and 2 deletions
|
@ -4388,6 +4388,15 @@ void migrate_fd_connect(MigrationState *s, Error *error_in)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This needs to be done before resuming a postcopy. Note: for newer
|
||||
* QEMUs we will delay the channel creation until postcopy_start(), to
|
||||
* avoid disorder of channel creations.
|
||||
*/
|
||||
if (migrate_postcopy_preempt() && s->preempt_pre_7_2) {
|
||||
postcopy_preempt_setup(s);
|
||||
}
|
||||
|
||||
if (resume) {
|
||||
/* Wakeup the main migration thread to do the recovery */
|
||||
migrate_set_state(&s->state, MIGRATION_STATUS_POSTCOPY_PAUSED,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue