migration, vl: start migration via qmp_migrate_incoming
commite69d50d621ccc1ab8b1048a3075ad944afebfed5
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Oct 2020 08:22:57 +0000 (27 04:22 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Dec 2020 17:15:14 +0000 (10 12:15 -0500)
treeb5051df8b4510f3d0392e339759100e90106f5f4
parentcca686b44aa1315df4cda4dee56ca601050fab71
migration, vl: start migration via qmp_migrate_incoming

Make qemu_start_incoming_migration local to migration/migration.c.
By using the runstate instead of a separate flag, vl need not do
anything to setup deferred incoming migration.

qmp_migrate_incoming also does not need the deferred_incoming flag
anymore, because "-incoming PROTOCOL" will clear the "once" flag
before the main loop starts.  Therefore, later invocations of
the migrate-incoming command will fail with the existing
"The incoming migration has already been started" error message.

Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/migration/misc.h
migration/migration.c
softmmu/vl.c