qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH COLO-Frame v8 04/34] colo-comm/migration: skip colo


From: zhanghailiang
Subject: [Qemu-devel] [PATCH COLO-Frame v8 04/34] colo-comm/migration: skip colo info section for special cases
Date: Wed, 29 Jul 2015 16:45:14 +0800

For older machine types, we skip the colo info section when do
migration, in this way, we can migrate successfully between older mainchine and
the new one.

We also skip this section if colo is not enabled (i.e.
migrate_set_capability colo on), so that, It not break compatibility with 
migration
however the --enable-colo/disable-colo on the source/destination;

Signed-off-by: zhanghailiang <address@hidden>
---
 migration/colo-comm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/migration/colo-comm.c b/migration/colo-comm.c
index 2b1d70c..4330bd8 100644
--- a/migration/colo-comm.c
+++ b/migration/colo-comm.c
@@ -31,12 +31,17 @@ static void colo_info_pre_save(void *opaque)
     }
 }
 
+static bool colo_info_need(void *opaque)
+{
+   return migrate_enable_colo();
+}
 
 static const VMStateDescription colo_state = {
      .name = "COLOState",
      .version_id = 1,
      .minimum_version_id = 1,
      .pre_save = colo_info_pre_save,
+     .needed = colo_info_need,
      .fields = (VMStateField[]) {
          VMSTATE_UINT32(colo_requested, COLOInfo),
          VMSTATE_END_OF_LIST()
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]