[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 07/18] COLO: Add a new RunState RUN_STATE_COLO
From: |
Amit Shah |
Subject: |
[Qemu-devel] [PULL 07/18] COLO: Add a new RunState RUN_STATE_COLO |
Date: |
Sun, 30 Oct 2016 16:16:59 +0530 |
From: zhanghailiang <address@hidden>
Guest will enter this state when paused to save/restore VM state
under COLO checkpoint.
Cc: Eric Blake <address@hidden>
Cc: Markus Armbruster <address@hidden>
Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Li Zhijian <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Amit Shah <address@hidden>
Signed-off-by: Amit Shah <address@hidden>
---
qapi-schema.json | 5 ++++-
vl.c | 8 ++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index cafada8..ee58fe6 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -175,12 +175,15 @@
# @watchdog: the watchdog action is configured to pause and has been triggered
#
# @guest-panicked: guest has been panicked as a result of guest OS panic
+#
+# @colo: guest is paused to save/restore VM state under colo checkpoint (since
+# 2.8)
##
{ 'enum': 'RunState',
'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
- 'guest-panicked' ] }
+ 'guest-panicked', 'colo' ] }
##
# @StatusInfo:
diff --git a/vl.c b/vl.c
index a1cee4f..0360808 100644
--- a/vl.c
+++ b/vl.c
@@ -614,6 +614,7 @@ static const RunStateTransition runstate_transitions_def[]
= {
{ RUN_STATE_INMIGRATE, RUN_STATE_FINISH_MIGRATE },
{ RUN_STATE_INMIGRATE, RUN_STATE_PRELAUNCH },
{ RUN_STATE_INMIGRATE, RUN_STATE_POSTMIGRATE },
+ { RUN_STATE_INMIGRATE, RUN_STATE_COLO },
{ RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED },
{ RUN_STATE_INTERNAL_ERROR, RUN_STATE_FINISH_MIGRATE },
@@ -626,6 +627,7 @@ static const RunStateTransition runstate_transitions_def[]
= {
{ RUN_STATE_PAUSED, RUN_STATE_RUNNING },
{ RUN_STATE_PAUSED, RUN_STATE_FINISH_MIGRATE },
{ RUN_STATE_PAUSED, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_PAUSED, RUN_STATE_COLO},
{ RUN_STATE_POSTMIGRATE, RUN_STATE_RUNNING },
{ RUN_STATE_POSTMIGRATE, RUN_STATE_FINISH_MIGRATE },
@@ -638,10 +640,13 @@ static const RunStateTransition
runstate_transitions_def[] = {
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_RUNNING },
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_POSTMIGRATE },
{ RUN_STATE_FINISH_MIGRATE, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_FINISH_MIGRATE, RUN_STATE_COLO},
{ RUN_STATE_RESTORE_VM, RUN_STATE_RUNNING },
{ RUN_STATE_RESTORE_VM, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_COLO, RUN_STATE_RUNNING },
+
{ RUN_STATE_RUNNING, RUN_STATE_DEBUG },
{ RUN_STATE_RUNNING, RUN_STATE_INTERNAL_ERROR },
{ RUN_STATE_RUNNING, RUN_STATE_IO_ERROR },
@@ -652,6 +657,7 @@ static const RunStateTransition runstate_transitions_def[]
= {
{ RUN_STATE_RUNNING, RUN_STATE_SHUTDOWN },
{ RUN_STATE_RUNNING, RUN_STATE_WATCHDOG },
{ RUN_STATE_RUNNING, RUN_STATE_GUEST_PANICKED },
+ { RUN_STATE_RUNNING, RUN_STATE_COLO},
{ RUN_STATE_SAVE_VM, RUN_STATE_RUNNING },
@@ -664,10 +670,12 @@ static const RunStateTransition
runstate_transitions_def[] = {
{ RUN_STATE_SUSPENDED, RUN_STATE_RUNNING },
{ RUN_STATE_SUSPENDED, RUN_STATE_FINISH_MIGRATE },
{ RUN_STATE_SUSPENDED, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_SUSPENDED, RUN_STATE_COLO},
{ RUN_STATE_WATCHDOG, RUN_STATE_RUNNING },
{ RUN_STATE_WATCHDOG, RUN_STATE_FINISH_MIGRATE },
{ RUN_STATE_WATCHDOG, RUN_STATE_PRELAUNCH },
+ { RUN_STATE_WATCHDOG, RUN_STATE_COLO},
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_RUNNING },
{ RUN_STATE_GUEST_PANICKED, RUN_STATE_FINISH_MIGRATE },
--
2.7.4
- [Qemu-devel] [PULL 00/18] migration: COLO, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 01/18] migration: Introduce capability 'x-colo' to migration, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 02/18] COLO: migrate COLO related info to secondary node, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 03/18] migration: Enter into COLO mode after migration if COLO is enabled, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 04/18] migration: Switch to COLO process after finishing loadvm, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 05/18] COLO: Establish a new communicating path for COLO, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 06/18] COLO: Introduce checkpointing protocol, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 07/18] COLO: Add a new RunState RUN_STATE_COLO,
Amit Shah <=
- [Qemu-devel] [PULL 08/18] COLO: Send PVM state to secondary side when do checkpoint, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 09/18] COLO: Load VMState into QIOChannelBuffer before restore it, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 10/18] COLO: Add checkpoint-delay parameter for migrate-set-parameters, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 11/18] COLO: Synchronize PVM's state to SVM periodically, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 12/18] COLO: Add 'x-colo-lost-heartbeat' command to trigger failover, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 13/18] COLO: Introduce state to record failover process, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 14/18] COLO: Implement the process of failover for primary VM, Amit Shah, 2016/10/30
- [Qemu-devel] [PULL 15/18] COLO: Implement failover work for secondary VM, Amit Shah, 2016/10/30