mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
migration: allow dst vm pause on postcopy
When there is IO error on the incoming channel (e.g., network down), instead of bailing out immediately, we allow the dst vm to switch to the new POSTCOPY_PAUSE state. Currently it is still simple - it waits the new semaphore, until someone poke it for another attempt. One note is that here on ram loading thread we cannot detect the POSTCOPY_ACTIVE state, but we need to detect the more specific POSTCOPY_INCOMING_RUNNING state, to make sure we have already loaded all the device states. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20180502104740.12123-5-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
b23c2ade25
commit
b411b844fb
4 changed files with 67 additions and 2 deletions
|
@ -159,6 +159,7 @@ MigrationIncomingState *migration_incoming_get_current(void)
|
|||
sizeof(struct PostCopyFD));
|
||||
qemu_mutex_init(&mis_current.rp_mutex);
|
||||
qemu_event_init(&mis_current.main_thread_load_event, false);
|
||||
qemu_sem_init(&mis_current.postcopy_pause_sem_dst, 0);
|
||||
|
||||
init_dirty_bitmap_incoming_migration();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue