qemu-devel
[Top][All Lists]
Advanced

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

[PATCH v1 4/4] migration/debug: add DEBUG_MIGRATION_CONSISTENCY_CHECK ma


From: Chuan Zheng
Subject: [PATCH v1 4/4] migration/debug: add DEBUG_MIGRATION_CONSISTENCY_CHECK macros
Date: Mon, 26 Oct 2020 21:58:45 +0800

Signed-off-by: Chuan Zheng <zhengchuan@huawei.com>
---
 migration/migration.c | 2 ++
 migration/savevm.c    | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/migration/migration.c b/migration/migration.c
index f4434c4..fe2bb3a 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1678,7 +1678,9 @@ static void migrate_fd_cleanup(MigrationState *s)
         tmp = s->to_dst_file;
         s->to_dst_file = NULL;
         qemu_mutex_unlock(&s->qemu_file_lock);
+#ifdef DEBUG_MIGRATION_CONSISTENCY_CHECK
         MIGRATION_RAM_CONSISTENCY_CHECK();
+#endif
         /*
          * Close the file handle without the lock to make sure the
          * critical section won't block for long.
diff --git a/migration/savevm.c b/migration/savevm.c
index 5f989a8..102cd0e 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2636,12 +2636,14 @@ int qemu_loadvm_state(QEMUFile *f)
     }
 
     qemu_loadvm_state_cleanup();
+#ifdef DEBUG_MIGRATION_CONSISTENCY_CHECK
     /*
      * cpu_synchronize_all_post_init->kvm_put_msrs will update the
      * kvmclock share-mem.
      * So this's the latest point at which the ram is the same as source
      */
     MIGRATION_RAM_CONSISTENCY_CHECK();
+#endif
 
     cpu_synchronize_all_post_init();
 
-- 
1.8.3.1




reply via email to

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