From nobody Thu Nov 6 06:39:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 149819374336573.5281068825401; Thu, 22 Jun 2017 21:55:43 -0700 (PDT) Received: from localhost ([::1]:33594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOGdC-0004Mt-1x for importer@patchew.org; Fri, 23 Jun 2017 00:55:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dOGVS-0006Ga-L3 for qemu-devel@nongnu.org; Fri, 23 Jun 2017 00:47:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dOGVR-0001P7-PL for qemu-devel@nongnu.org; Fri, 23 Jun 2017 00:47:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56756) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dOGVR-0001Oq-GF for qemu-devel@nongnu.org; Fri, 23 Jun 2017 00:47:41 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6BD04723B8 for ; Fri, 23 Jun 2017 04:47:40 +0000 (UTC) Received: from pxdev.xzpeter.org.com (ovpn-12-47.pek2.redhat.com [10.72.12.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7FAD67052D; Fri, 23 Jun 2017 04:47:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6BD04723B8 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=peterx@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6BD04723B8 From: Peter Xu To: qemu-devel@nongnu.org Date: Fri, 23 Jun 2017 12:46:46 +0800 Message-Id: <1498193206-18007-11-git-send-email-peterx@redhat.com> In-Reply-To: <1498193206-18007-1-git-send-email-peterx@redhat.com> References: <1498193206-18007-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 23 Jun 2017 04:47:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v5 10/10] migration: hmp: dump globals X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Eduardo Habkost , Juan Quintela , "Dr . David Alan Gilbert" , peterx@redhat.com, Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Signed-off-by: Peter Xu --- 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" =20 #ifdef CONFIG_SPICE #include @@ -164,6 +165,8 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict) info =3D qmp_query_migrate(NULL); caps =3D qmp_query_migrate_capabilities(NULL); =20 + 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); =20 #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" =20 #define MAX_THROTTLE (32 << 20) /* Migration transfer speed throttli= ng */ =20 @@ -1993,6 +1994,16 @@ void migrate_fd_connect(MigrationState *s) s->migration_thread_running =3D true; } =20 +void migration_global_dump(Monitor *mon) +{ + MigrationState *ms =3D migrate_get_current(); + + monitor_printf(mon, "globals: store-global-state=3D%d, only_migratable= =3D%d, " + "send-configuration=3D%d, send-section-footer=3D%d\n", + ms->store_global_state, ms->only_migratable, + ms->send_configuration, ms->send_section_footer); +} + static Property migration_properties[] =3D { DEFINE_PROP_BOOL("store-global-state", MigrationState, store_global_state, true), --=20 2.7.4