i6300esb watchdog: bugfix: Add a runstate transition
QEMU will abort() for the reasons now:
invalid runstate transition: 'prelaunch' -> 'postmigrate'
Aborted
This happens when:
|<- watchdog timeout happened, then sets reset_requested to
| SHUTDOWN_CAUSE_GUEST_RESET;
|<- hot-migration thread sets vm state to RUN_STATE_FINISH_MIGRATE
| before the last time of migration;
|<- main thread gets the change of reset_requested and triggers
| reset, then sets vm state to RUN_STATE_PRELAUNCH;
|<- hot-migration thread sets vm state to RUN_STATE_POSTMIGRATE.
Then 'prelaunch' -> 'postmigrate' runstate transition will happen.
It is legal so add this transition to runstate_transitions_def.
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
This commit is contained in:
parent
38cbd1be35
commit
6176fc3be0
42
i6300esb-watchdog-bugfix-Add-a-runstate-transition.patch
Normal file
42
i6300esb-watchdog-bugfix-Add-a-runstate-transition.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 3c283ea7ca1902b9d221897fd65c5edb1d16e004 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jinhua Cao <caojinhua1@huawei.com>
|
||||||
|
Date: Fri, 11 Feb 2022 20:33:47 +0800
|
||||||
|
Subject: [PATCH] i6300esb watchdog: bugfix: Add a runstate transition
|
||||||
|
|
||||||
|
QEMU will abort() for the reasons now:
|
||||||
|
|
||||||
|
invalid runstate transition: 'prelaunch' -> 'postmigrate'
|
||||||
|
Aborted
|
||||||
|
|
||||||
|
This happens when:
|
||||||
|
|<- watchdog timeout happened, then sets reset_requested to
|
||||||
|
| SHUTDOWN_CAUSE_GUEST_RESET;
|
||||||
|
|<- hot-migration thread sets vm state to RUN_STATE_FINISH_MIGRATE
|
||||||
|
| before the last time of migration;
|
||||||
|
|<- main thread gets the change of reset_requested and triggers
|
||||||
|
| reset, then sets vm state to RUN_STATE_PRELAUNCH;
|
||||||
|
|<- hot-migration thread sets vm state to RUN_STATE_POSTMIGRATE.
|
||||||
|
|
||||||
|
Then 'prelaunch' -> 'postmigrate' runstate transition will happen.
|
||||||
|
It is legal so add this transition to runstate_transitions_def.
|
||||||
|
|
||||||
|
Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
|
||||||
|
---
|
||||||
|
softmmu/runstate.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/softmmu/runstate.c b/softmmu/runstate.c
|
||||||
|
index 5736d908db..680994cdf8 100644
|
||||||
|
--- a/softmmu/runstate.c
|
||||||
|
+++ b/softmmu/runstate.c
|
||||||
|
@@ -115,6 +115,7 @@ static const RunStateTransition runstate_transitions_def[] = {
|
||||||
|
{ RUN_STATE_PRELAUNCH, RUN_STATE_RUNNING },
|
||||||
|
{ RUN_STATE_PRELAUNCH, RUN_STATE_FINISH_MIGRATE },
|
||||||
|
{ RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
|
||||||
|
+ { RUN_STATE_PRELAUNCH, RUN_STATE_POSTMIGRATE },
|
||||||
|
|
||||||
|
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
|
||||||
|
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_PAUSED },
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user