From nobody Fri May 10 20:46:33 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1681992230; cv=none; d=zohomail.com; s=zohoarc; b=j8fG2TqbkKIvjcFPSoRc0BOMsiTTpMx0LDhlTg+rs21emiHn8SEzl3xIb/zVQRri7YEVDBCZA2kkWtZQWQZajJwMOULMGDqbVqWsYzAb3X1hScbc4XwQxI/TTf/mGvXXQLCxfh784Jn6QF8FJ0Fi+5QhhAlKV2xtnCQFlvsNyjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681992230; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=yDDw7GwGpkZ2fcujK2MsCgEnswuWmTtczozBGGv9fP0=; b=I7ziHkr9AQKO2oU/JpJITrr921cZ4a5qNmlf59ltOzi2ut6He7Gi4OLpOuH7wWEiF4QsrLuUY9e57Qd83YUe/ftBlMWPhEUQq8p1iea0o58stgRp8iddlz18l3pHHyt9OLy8hRnM/9voi0uWXqwNxAPL2e0cCEV+8Q0zP0FtxVc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1681992230010750.4357398813997; Thu, 20 Apr 2023 05:03:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppT0E-0007yK-Ma; Thu, 20 Apr 2023 08:03:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppT0C-0007oP-6V for qemu-devel@nongnu.org; Thu, 20 Apr 2023 08:03:04 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppT0A-0001Nw-J2 for qemu-devel@nongnu.org; Thu, 20 Apr 2023 08:03:03 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-92-G50z0tmRNTGh3nk1vT37xA-1; Thu, 20 Apr 2023 08:03:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD963800B35 for ; Thu, 20 Apr 2023 12:02:59 +0000 (UTC) Received: from secure.mitica (unknown [10.39.192.171]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA24B2166B33; Thu, 20 Apr 2023 12:02:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681992181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yDDw7GwGpkZ2fcujK2MsCgEnswuWmTtczozBGGv9fP0=; b=M8V+cBJcJbjF1I4ADFAzurLX1GSG/3lCDS4lHoTqIZOs4rf2PjyiZwY1PzCZO2Zyagg6yV J2QettOxOzi0LxtPNWRi6EUiCGOwX+++sqKktk8dt9SzJ5nx7uc5AUQklGGGOV3X1wraow tUm6kaQgzNBGlOl/oYskD7hbr81KQwU= X-MC-Unique: G50z0tmRNTGh3nk1vT37xA-1 From: Juan Quintela To: qemu-devel@nongnu.org Cc: Peter Xu , Juan Quintela , Leonardo Bras Subject: [PATCH v2] migration: move migration_global_dump() to migration-hmp-cmds.c Date: Thu, 20 Apr 2023 14:02:57 +0200 Message-Id: <20230420120257.24790-1-quintela@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=quintela@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681992232199100003 Content-Type: text/plain; charset="utf-8" It is only used there, so we can make it static. Once there, remove spice.h that it is not used. Signed-off-by: Juan Quintela --- include/migration/misc.h | 1 - migration/migration-hmp-cmds.c | 23 +++++++++++++++++++++-- migration/migration.c | 19 ------------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/include/migration/misc.h b/include/migration/misc.h index 8b49841016..5ebe13b4b9 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -66,7 +66,6 @@ bool migration_has_finished(MigrationState *); bool migration_has_failed(MigrationState *); /* ...and after the device transmission */ bool migration_in_postcopy_after_devices(MigrationState *); -void migration_global_dump(Monitor *mon); /* True if incoming migration entered POSTCOPY_INCOMING_DISCARD */ bool migration_in_incoming_postcopy(void); /* True if incoming migration entered POSTCOPY_INCOMING_ADVISE */ diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index 72519ea99f..7dcb289c05 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -15,7 +15,6 @@ =20 #include "qemu/osdep.h" #include "block/qapi.h" -#include "migration/misc.h" #include "migration/snapshot.h" #include "monitor/hmp.h" #include "monitor/monitor.h" @@ -29,7 +28,27 @@ #include "qemu/error-report.h" #include "qemu/sockets.h" #include "sysemu/runstate.h" -#include "ui/qemu-spice.h" +#include "sysemu/sysemu.h" +#include "migration.h" + +static void migration_global_dump(Monitor *mon) +{ + MigrationState *ms =3D migrate_get_current(); + + monitor_printf(mon, "globals:\n"); + monitor_printf(mon, "store-global-state: %s\n", + ms->store_global_state ? "on" : "off"); + monitor_printf(mon, "only-migratable: %s\n", + only_migratable ? "on" : "off"); + monitor_printf(mon, "send-configuration: %s\n", + ms->send_configuration ? "on" : "off"); + monitor_printf(mon, "send-section-footer: %s\n", + ms->send_section_footer ? "on" : "off"); + monitor_printf(mon, "decompress-error-check: %s\n", + ms->decompress_error_check ? "on" : "off"); + monitor_printf(mon, "clear-bitmap-shift: %u\n", + ms->clear_bitmap_shift); +} =20 void hmp_info_migrate(Monitor *mon, const QDict *qdict) { diff --git a/migration/migration.c b/migration/migration.c index f311bb5f93..fd9f41fe37 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -4429,25 +4429,6 @@ void migrate_fd_connect(MigrationState *s, Error *er= ror_in) s->migration_thread_running =3D true; } =20 -void migration_global_dump(Monitor *mon) -{ - MigrationState *ms =3D migrate_get_current(); - - monitor_printf(mon, "globals:\n"); - monitor_printf(mon, "store-global-state: %s\n", - ms->store_global_state ? "on" : "off"); - monitor_printf(mon, "only-migratable: %s\n", - only_migratable ? "on" : "off"); - monitor_printf(mon, "send-configuration: %s\n", - ms->send_configuration ? "on" : "off"); - monitor_printf(mon, "send-section-footer: %s\n", - ms->send_section_footer ? "on" : "off"); - monitor_printf(mon, "decompress-error-check: %s\n", - ms->decompress_error_check ? "on" : "off"); - monitor_printf(mon, "clear-bitmap-shift: %u\n", - ms->clear_bitmap_shift); -} - #define DEFINE_PROP_MIG_CAP(name, x) \ DEFINE_PROP_BOOL(name, MigrationState, enabled_capabilities[x], false) =20 --=20 2.39.2