[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/14] migration: hmp: dump globals
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 10/14] migration: hmp: dump globals |
Date: |
Wed, 28 Jun 2017 13:31:02 +0200 |
From: Peter Xu <address@hidden>
Now we have some globals that can be configured for migration. Dump them
in HMP info migration for better debugging.
(we can also use this to monitor whether COMPAT fields are applied
correctly on compatible machines)
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
hmp.c | 3 +++
include/migration/misc.h | 1 +
migration/migration.c | 11 +++++++++++
3 files changed, 15 insertions(+)
diff --git a/hmp.c b/hmp.c
index 8c72c58..4c41cac 100644
--- a/hmp.c
+++ b/hmp.c
@@ -43,6 +43,7 @@
#include "exec/ramlist.h"
#include "hw/intc/intc.h"
#include "migration/snapshot.h"
+#include "migration/misc.h"
#ifdef CONFIG_SPICE
#include <spice/enums.h>
@@ -164,6 +165,8 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
info = qmp_query_migrate(NULL);
caps = qmp_query_migrate_capabilities(NULL);
+ migration_global_dump(mon);
+
/* do not display parameters during setup */
if (info->has_status && caps) {
monitor_printf(mon, "capabilities: ");
diff --git a/include/migration/misc.h b/include/migration/misc.h
index 854c28d..2255121 100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -54,5 +54,6 @@ bool migration_has_failed(MigrationState *);
/* ...and after the device transmission */
bool migration_in_postcopy_after_devices(MigrationState *);
void migration_only_migratable_set(void);
+void migration_global_dump(Monitor *mon);
#endif
diff --git a/migration/migration.c b/migration/migration.c
index e7e6cf3..b1b0825 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -43,6 +43,7 @@
#include "io/channel-buffer.h"
#include "migration/colo.h"
#include "hw/boards.h"
+#include "monitor/monitor.h"
#define MAX_THROTTLE (32 << 20) /* Migration transfer speed throttling */
@@ -1993,6 +1994,16 @@ void migrate_fd_connect(MigrationState *s)
s->migration_thread_running = true;
}
+void migration_global_dump(Monitor *mon)
+{
+ MigrationState *ms = migrate_get_current();
+
+ monitor_printf(mon, "globals: store-global-state=%d, only_migratable=%d, "
+ "send-configuration=%d, send-section-footer=%d\n",
+ ms->store_global_state, ms->only_migratable,
+ ms->send_configuration, ms->send_section_footer);
+}
+
static Property migration_properties[] = {
DEFINE_PROP_BOOL("store-global-state", MigrationState,
store_global_state, true),
--
2.9.4
- [Qemu-devel] [PULL 01/14] machine: export register_compat_prop(), (continued)
- [Qemu-devel] [PULL 01/14] machine: export register_compat_prop(), Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 03/14] vl: clean up global property registration, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 02/14] accel: introduce AccelClass.global_props, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 04/14] migration: let MigrationState be a qdev, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 07/14] migration: move skip_configuration out, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 05/14] migration: move global_state.optional out, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 08/14] migration: move skip_section_footers, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 09/14] migration: merge enforce_config_section somewhat, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 06/14] migration: move only_migratable to MigrationState, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 11/14] migration: add comment for TYPE_MIGRATE, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 10/14] migration: hmp: dump globals,
Juan Quintela <=
- [Qemu-devel] [PULL 13/14] migration: add "return-path" capability, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 14/14] exec: fix access to ram_list.dirty_memory when sync dirty bitmap, Juan Quintela, 2017/06/28
- [Qemu-devel] [PULL 12/14] vmstate: error hint for failed equal checks, Juan Quintela, 2017/06/28
- Re: [Qemu-devel] [PULL 00/14] Migration pull request for 20170628, Peter Maydell, 2017/06/29