aboutsummaryrefslogtreecommitdiff
path: root/softmmu
diff options
context:
space:
mode:
authorRao, Lei <lei.rao@intel.com>2020-10-16 13:52:02 +0800
committerJason Wang <jasowang@redhat.com>2020-11-11 16:52:23 +0800
commit5647051f432b7c9b57525470b0a79a31339062d2 (patch)
tree6b0984fef9781afcc4bbfa48f6e9df0fbf8966c6 /softmmu
parentb70cb3b4854dc4d65c89a8f6704c0f1e9d900ac3 (diff)
downloadqemu-5647051f432b7c9b57525470b0a79a31339062d2.zip
qemu-5647051f432b7c9b57525470b0a79a31339062d2.tar.gz
qemu-5647051f432b7c9b57525470b0a79a31339062d2.tar.bz2
Fix the qemu crash when guest shutdown in COLO mode
In COLO mode, if the startup parameters of QEMU include "no-shutdown", QEMU will crash when the guest shutdown. The root cause is when the guest shutdown, the state of VM will switch COLO to SHUTDOWN. When do checkpoint again, the state will be changed to COLO. But the state switch is undefined in runstate_transitions_def, we should add it. This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'shutdown' -> 'colo' Aborted Signed-off-by: Lei Rao <lei.rao@intel.com> Signed-off-by: Zhang Chen <chen.zhang@intel.com> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r--softmmu/vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index a711644..e32fd48 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -632,6 +632,7 @@ static const RunStateTransition runstate_transitions_def[] = {
{ RUN_STATE_SHUTDOWN, RUN_STATE_PAUSED },
{ RUN_STATE_SHUTDOWN, RUN_STATE_FINISH_MIGRATE },
{ RUN_STATE_SHUTDOWN, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_SHUTDOWN, RUN_STATE_COLO },
{ RUN_STATE_DEBUG, RUN_STATE_SUSPENDED },
{ RUN_STATE_RUNNING, RUN_STATE_SUSPENDED },