softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH
commit669846c530dc4ab4afa0d2ad827fec651cb7510c
authorZhang Chen <chen.zhang@intel.com>
Fri, 1 Apr 2022 03:46:59 +0000 (1 11:46 +0800)
committerJason Wang <jasowang@redhat.com>
Wed, 20 Jul 2022 08:58:08 +0000 (20 16:58 +0800)
treed9fc1c1c242d251745ddab098e2c0a21d4eb0156
parent1576dbb5bbc49344c606e969ec749be70c0fd94e
softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH

If the checkpoint occurs when the guest finishes restarting
but has not started running, the runstate_set() may reject
the transition from COLO to PRELAUNCH with the crash log:

{"timestamp": {"seconds": 1593484591, "microseconds": 26605},\
"event": "RESET", "data": {"guest": true, "reason": "guest-reset"}}
qemu-system-x86_64: invalid runstate transition: 'colo' -> 'prelaunch'

Long-term testing says that it's pretty safe.

Signed-off-by: Like Xu <like.xu@linux.intel.com>
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
softmmu/runstate.c