1 Commits

Author SHA1 Message Date
Chen Qun
6176fc3be0 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>
2022-03-19 14:42:32 +08:00