Here are two patches to make the handling more uniform when stop/cont commands are sent to a QEMU instance that is waiting for incoming migration. Right now the handling will change, depending on whether the command came before or after the source has connected.
The behavior that makes most sense is the one you have if the command comes while migration is in progress and the monitor is blocked, so ensure that we always resolve the race like that. This will also help when incoming migration is moved to a coroutine, which (by design) will cause the monitor not to block. Paolo Bonzini (2): qmp: handle stop/cont in INMIGRATE state migration: go to paused state after finishing incoming migration with -S migration.c | 2 +- qapi-schema.json | 7 +------ qerror.h | 3 --- qmp.c | 17 +++++++++++------ vl.c | 2 +- 5 file modificati, 14 inserzioni(+), 17 rimozioni(-) -- 1.7.12.1