migration: stop vm for cpr
authorSteve Sistare <steven.sistare@oracle.com>
Thu, 22 Feb 2024 17:28:36 +0000 (09:28 -0800)
committerPeter Xu <peterx@redhat.com>
Wed, 28 Feb 2024 03:31:28 +0000 (11:31 +0800)
commit9867d4ddd0427a108e45c865ff4169f852e844f6
treefe13eb2f203377187753eed92f040261f97b662f
parent4af667f87c629b4439f93a0b116d7674aa0cb1ad
migration: stop vm for cpr

When migration for cpr is initiated, stop the vm and set state
RUN_STATE_FINISH_MIGRATE before ram is saved.  This eliminates the
possibility of ram and device state being out of sync, and guarantees
that a guest in the suspended state remains suspended, because qmp_cont
rejects a cont command in the RUN_STATE_FINISH_MIGRATE state.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/1708622920-68779-11-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
include/migration/misc.h
migration/migration.c
migration/migration.h