From nobody Sun May 19 03:54:45 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=1677160953; cv=none; d=zohomail.com; s=zohoarc; b=HA2ObBywA5WUo3AMDXqUdf5mEw7qpVvCCh6eg2Uj40X0MzP38x41OWVyfpDlvMWoOiuMm8xhI0ouYd0tQhFzCxvxPAMeZbEx/ulm6M7OhzOY1GhAX4F90IOZO4rFf1qRlyPKqVOsm3vWyvlyA4irYYEXaq+1f9SJs+NBmXErEOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677160953; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gLfqio4XE1Bmy6HSaIHpdZ55wAJ+4clU2djHUZUm2Lg=; b=aCry87DOt5/1YCyj0f9z+B/r6/xuj7JPoP2fSmQynSoOXvyfl2GfDBQ//3ce24btcMlSnWyJW5xXRTC0oE/qTJTKE4S2qEqbLR8mVcDhAdcU6/EMIr/JUeQmCEoSaOpGbIkjy3Zw6mWC8q6ep4hOpgax65AxqWg4hxSta6y6n18= 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 1677160953639825.7688353393228; Thu, 23 Feb 2023 06:02:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvf-0001zy-M9; Thu, 23 Feb 2023 08:46:35 -0500 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 1pVBvd-0001wU-1R for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVBva-0001Le-QH for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 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-649-_VVPUysmPy6HySHqCgMrow-1; Thu, 23 Feb 2023 08:46:28 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C7E1C85A5B1; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8BF43C15BA0; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 91E5021E6A20; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gLfqio4XE1Bmy6HSaIHpdZ55wAJ+4clU2djHUZUm2Lg=; b=H5zdM0IR8OIbOZ3MRBG6FS0QgX3WORJLs9A7sdZhy03HaGfriFGS5ithyHv+W1uWFHzCJ6 ypOXqKbG9PG//dCj58xj/V3HT+HbLlBXmxpFhMtS6WHF/xcyT3KDWuLxh9Eu+koggcbaEB 3lKTpMcjc3ECwmOfkxzKMUibV7/J88U= X-MC-Unique: _VVPUysmPy6HySHqCgMrow-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela , Konstantin Kostiuk Subject: [PULL 01/12] error: Drop superfluous #include "qapi/qmp/qerror.h" Date: Thu, 23 Feb 2023 14:46:15 +0100 Message-Id: <20230223134626.2107382-2-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.129.124; envelope-from=armbru@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 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: 1677160991663100001 Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-2-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela Reviewed-by: Konstantin Kostiuk --- authz/listfile.c | 1 - backends/cryptodev-vhost.c | 1 - backends/rng.c | 1 - backends/vhost-user.c | 1 - block/backup.c | 1 - block/commit.c | 1 - block/mirror.c | 1 - block/stream.c | 1 - hw/core/machine.c | 1 - hw/i386/pc.c | 1 - hw/i386/x86.c | 1 - hw/misc/xlnx-zynqmp-apu-ctrl.c | 1 - migration/colo.c | 1 - migration/migration-hmp-cmds.c | 1 - qga/main.c | 1 - softmmu/qtest.c | 1 - target/i386/monitor.c | 1 - target/i386/sev-sysemu-stub.c | 1 - target/i386/sev.c | 1 - util/qemu-config.c | 1 - 20 files changed, 20 deletions(-) diff --git a/authz/listfile.c b/authz/listfile.c index da3a0e69a2..45a60e987d 100644 --- a/authz/listfile.c +++ b/authz/listfile.c @@ -30,7 +30,6 @@ #include "qapi/qapi-visit-authz.h" #include "qapi/qmp/qjson.h" #include "qapi/qmp/qobject.h" -#include "qapi/qmp/qerror.h" #include "qapi/qobject-input-visitor.h" =20 =20 diff --git a/backends/cryptodev-vhost.c b/backends/cryptodev-vhost.c index 572f87b3be..74ea0ad63d 100644 --- a/backends/cryptodev-vhost.c +++ b/backends/cryptodev-vhost.c @@ -28,7 +28,6 @@ =20 #ifdef CONFIG_VHOST_CRYPTO #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "hw/virtio/virtio-crypto.h" #include "sysemu/cryptodev-vhost-user.h" diff --git a/backends/rng.c b/backends/rng.c index 6c7bf64426..9bbd0c77b6 100644 --- a/backends/rng.c +++ b/backends/rng.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "sysemu/rng.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/module.h" #include "qom/object_interfaces.h" =20 diff --git a/backends/vhost-user.c b/backends/vhost-user.c index 7bfcaef976..0596223ac4 100644 --- a/backends/vhost-user.c +++ b/backends/vhost-user.c @@ -13,7 +13,6 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "qom/object_interfaces.h" #include "sysemu/vhost-user-backend.h" diff --git a/block/backup.c b/block/backup.c index 824d39acaa..5b8863b88c 100644 --- a/block/backup.c +++ b/block/backup.c @@ -22,7 +22,6 @@ #include "block/block-copy.h" #include "block/dirty-bitmap.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/cutils.h" #include "sysemu/block-backend.h" #include "qemu/bitmap.h" diff --git a/block/commit.c b/block/commit.c index 41e3599281..387a720d03 100644 --- a/block/commit.c +++ b/block/commit.c @@ -18,7 +18,6 @@ #include "block/block_int.h" #include "block/blockjob_int.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/ratelimit.h" #include "qemu/memalign.h" #include "sysemu/block-backend.h" diff --git a/block/mirror.c b/block/mirror.c index ab326b67c9..0f6551cf5b 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -21,7 +21,6 @@ #include "block/dirty-bitmap.h" #include "sysemu/block-backend.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/ratelimit.h" #include "qemu/bitmap.h" #include "qemu/memalign.h" diff --git a/block/stream.c b/block/stream.c index 8744ad103f..e77a033233 100644 --- a/block/stream.c +++ b/block/stream.c @@ -16,7 +16,6 @@ #include "block/block_int.h" #include "block/blockjob_int.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qapi/qmp/qdict.h" #include "qemu/ratelimit.h" #include "sysemu/block-backend.h" diff --git a/hw/core/machine.c b/hw/core/machine.c index f73fc4c45c..f29e700ee4 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -13,7 +13,6 @@ #include "qemu/osdep.h" #include "qemu/option.h" #include "qemu/accel.h" -#include "qapi/qmp/qerror.h" #include "sysemu/replay.h" #include "qemu/units.h" #include "hw/boards.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 6e592bd969..a7a2ededf9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -92,7 +92,6 @@ #include "hw/mem/memory-device.h" #include "sysemu/replay.h" #include "target/i386/cpu.h" -#include "qapi/qmp/qerror.h" #include "e820_memory_layout.h" #include "fw_cfg.h" #include "trace.h" diff --git a/hw/i386/x86.c b/hw/i386/x86.c index eaff4227bd..48be7a1c23 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -28,7 +28,6 @@ #include "qemu/datadir.h" #include "qemu/guest-random.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qapi/qapi-visit-common.h" #include "qapi/clone-visitor.h" #include "qapi/qapi-visit-machine.h" diff --git a/hw/misc/xlnx-zynqmp-apu-ctrl.c b/hw/misc/xlnx-zynqmp-apu-ctrl.c index 20de23cf67..3d2be95e6d 100644 --- a/hw/misc/xlnx-zynqmp-apu-ctrl.c +++ b/hw/misc/xlnx-zynqmp-apu-ctrl.c @@ -18,7 +18,6 @@ #include "hw/register.h" =20 #include "qemu/bitops.h" -#include "qapi/qmp/qerror.h" =20 #include "hw/misc/xlnx-zynqmp-apu-ctrl.h" =20 diff --git a/migration/colo.c b/migration/colo.c index 232c8d44b1..0716e64689 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -33,7 +33,6 @@ #include "net/colo.h" #include "block/block.h" #include "qapi/qapi-events-migration.h" -#include "qapi/qmp/qerror.h" #include "sysemu/cpus.h" #include "sysemu/runstate.h" #include "net/filter.h" diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c index ef25bc8929..72519ea99f 100644 --- a/migration/migration-hmp-cmds.c +++ b/migration/migration-hmp-cmds.c @@ -23,7 +23,6 @@ #include "qapi/qapi-commands-migration.h" #include "qapi/qapi-visit-migration.h" #include "qapi/qmp/qdict.h" -#include "qapi/qmp/qerror.h" #include "qapi/string-input-visitor.h" #include "qapi/string-output-visitor.h" #include "qemu/cutils.h" diff --git a/qga/main.c b/qga/main.c index 85b7d6ced5..2b992a55b3 100644 --- a/qga/main.c +++ b/qga/main.c @@ -24,7 +24,6 @@ #include "qapi/qmp/qjson.h" #include "guest-agent-core.h" #include "qga-qapi-init-commands.h" -#include "qapi/qmp/qerror.h" #include "qapi/error.h" #include "channel.h" #include "qemu/cutils.h" diff --git a/softmmu/qtest.c b/softmmu/qtest.c index d3e0ab4eda..34bd2a33a7 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -28,7 +28,6 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "qemu/cutils.h" -#include "qapi/qmp/qerror.h" #include "qom/object_interfaces.h" #include CONFIG_DEVICES #ifdef CONFIG_PSERIES diff --git a/target/i386/monitor.c b/target/i386/monitor.c index ad5b7b8bb5..6512846327 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -28,7 +28,6 @@ #include "monitor/hmp-target.h" #include "monitor/hmp.h" #include "qapi/qmp/qdict.h" -#include "qapi/qmp/qerror.h" #include "sysemu/kvm.h" #include "qapi/error.h" #include "qapi/qapi-commands-misc-target.h" diff --git a/target/i386/sev-sysemu-stub.c b/target/i386/sev-sysemu-stub.c index 7a29295d1e..96e1c15cc3 100644 --- a/target/i386/sev-sysemu-stub.c +++ b/target/i386/sev-sysemu-stub.c @@ -15,7 +15,6 @@ #include "monitor/monitor.h" #include "monitor/hmp-target.h" #include "qapi/qapi-commands-misc-target.h" -#include "qapi/qmp/qerror.h" #include "qapi/error.h" #include "sev.h" =20 diff --git a/target/i386/sev.c b/target/i386/sev.c index 32f7dbac4e..0ec970496e 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -34,7 +34,6 @@ #include "monitor/monitor.h" #include "monitor/hmp-target.h" #include "qapi/qapi-commands-misc-target.h" -#include "qapi/qmp/qerror.h" #include "exec/confidential-guest-support.h" #include "hw/i386/pc.h" #include "exec/address-spaces.h" diff --git a/util/qemu-config.c b/util/qemu-config.c index d63f27438d..42076efe1e 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -2,7 +2,6 @@ #include "block/qdict.h" /* for qdict_extract_subqdict() */ #include "qapi/error.h" #include "qapi/qapi-commands-misc.h" -#include "qapi/qmp/qerror.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qlist.h" #include "qemu/error-report.h" --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161202; cv=none; d=zohomail.com; s=zohoarc; b=Q0awbMZ8RsxWJjfJmEhclg32K3me5h4r89UrV9lpg3PcNPhmGzoK6NDIXpPqQVUfcRCneC+tFJo4uBl/iVicYSJS5IDFmXK1mSrpvJWP+cYDtddTpQzdyJzR4UqWfUvQHXS6QabR8Cm7lESY+MfP2xOisfs8pf9K44CAsfWFg+E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161202; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ycgX7rY4ZYoI/STN58FFto/oXrVXJsH4C6mVUHM//AU=; b=Rx8O2AqXg/CFw2xIwat49JMJek7GSUfteRuLlq+taW80unjv/YPLIvO3ESOQJPJmDNinoXEnWC9k2baqOqrOG0UsqBgD/dtmJEv2iw5czUOvaQesUu5BzyiSGzx2MoB3oOoR4MKbsFfC2vFIiPcpTPom5gBDCyn8YdCLxEShOAU= 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 1677161202446548.5960474193162; Thu, 23 Feb 2023 06:06:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBve-0001yR-0V; Thu, 23 Feb 2023 08:46:34 -0500 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 1pVBvb-0001w0-HY for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 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 1pVBvZ-0001LY-Tu for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:31 -0500 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-282-Xc0uUoW5N5yEeb2oLnvoHQ-1; Thu, 23 Feb 2023 08:46:28 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AD764185A78B; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C26C492C3E; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9446A21E6A21; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ycgX7rY4ZYoI/STN58FFto/oXrVXJsH4C6mVUHM//AU=; b=aA1ATB0nOz5wcKxNQl6y6kzJzRm3u3M/Q6AaXSsOdcCoAWJWV6NNJJcxaw8YJzmAlGBfIH o1BjFq3bPAEXydb4k36OyQ/z4ruUFwznJyLjszFd1lAUYfn2ZPt9j+5WF+7gEoqy6rgz7y pebPtgYYOEAtDPxWVzsCOKOzfPNIlIs= X-MC-Unique: Xc0uUoW5N5yEeb2oLnvoHQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 02/12] dump: Improve error message when target doesn't support memory dump Date: Thu, 23 Feb 2023 14:46:16 +0100 Message-Id: <20230223134626.2107382-3-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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=armbru@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 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: 1677161208116100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_UNSUPPORTED, and improve the rather vague error message (qemu) dump-guest-memory mumble Error: this feature or command is not currently supported to Error: dumping guest memory is not supported on this target Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-3-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela [Error message tweaked] --- dump/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 279b07f09b..e6833e4cc0 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1854,7 +1854,8 @@ static void dump_init(DumpState *s, int fd, bool has_= format, */ ret =3D cpu_get_dump_info(&s->dump_info, &s->guest_phys_blocks); if (ret < 0) { - error_setg(errp, QERR_UNSUPPORTED); + error_setg(errp, + "dumping guest memory is not supported on this target"); goto cleanup; } =20 --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161056; cv=none; d=zohomail.com; s=zohoarc; b=Z6g+9xoywb1fi+V7lf5p7DOIYzNqNIDBLS5ni4IshgBO+M/n+RRBAmzNWRLFhoe8A0QRyp1y3T/c+HVHnh6biSN0FKhgTWcGwyEpWjhpe8FTWUQKENiSbeLF8C4AAEDTSq/ea0CqvL2KHkDxfI1xmV6Fn4y+Ym148wKa+LgyHtQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161056; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Q6gzbbJKdgCIJtOsmzsbLUuvNKtGjXdtE1nvXLNaRyo=; b=k85H5oC4aQizW3xFmcNtdhSScGFhw87zBCtaP3h+Il4IzejJWXwr3bod5Azm3OUyQiO9LoMSf1sgWz78+4CePVzvsMwlmlqxdhylM6TlxcJIHbWZ78kHU5ad3PcODezjxBRH5E6OTYrZvOQomvLFOVG3GtvGx34/eP7hLNhAtWE= 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 1677161056927896.7405766142883; Thu, 23 Feb 2023 06:04:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBve-0001zI-P0; Thu, 23 Feb 2023 08:46:34 -0500 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 1pVBvc-0001wA-H6 for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 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 1pVBva-0001Li-PY for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 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-634-POL1nejSO0y0Ut321tUhSA-1; Thu, 23 Feb 2023 08:46:28 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AFCAF8828C0; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 902C2492C14; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 96DD121E6A22; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Q6gzbbJKdgCIJtOsmzsbLUuvNKtGjXdtE1nvXLNaRyo=; b=G19jU13GaVoh9s6q0p1r5SaV2UhtjcZmepz2UCp9V8a7p5YKvN4QJ/gb4C5Kj2sH2tw3dX 4kjBPLxOgOEghdJvYx5hfz9guhKu38mOBlwG347nX+e3gOa1hmK+/Pni4ZrQGzuGzvEY/l jt6On03veL1FtgTpT6pCxwB81ZJiJXE= X-MC-Unique: POL1nejSO0y0Ut321tUhSA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 03/12] dump: Assert cpu_get_note_size() can't fail Date: Thu, 23 Feb 2023 14:46:17 +0100 Message-Id: <20230223134626.2107382-4-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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=armbru@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 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: 1677161111348100001 The only way cpu_get_note_size() can return a negative value is integer overflow in the non-stub versions, which is a programming error. The stub version is not actually reachable, because the cpu_get_dump_info() stub will fail first. Use assert(). This gets rid of another use of QERR_UNSUPPORTED. Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-4-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- dump/dump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index e6833e4cc0..1362810991 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1865,10 +1865,7 @@ static void dump_init(DumpState *s, int fd, bool has= _format, =20 s->note_size =3D cpu_get_note_size(s->dump_info.d_class, s->dump_info.d_machine, nr_cpus); - if (s->note_size < 0) { - error_setg(errp, QERR_UNSUPPORTED); - goto cleanup; - } + assert(s->note_size >=3D 0); =20 /* * The goal of this block is to (a) update the previously guessed --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161205; cv=none; d=zohomail.com; s=zohoarc; b=EMTLatZQ1I1+EHMq3SINj8or/XTFg2pyr3hel4+D8dFXY0iU0kQ+fyXZjn3MXm7DLvra8lJCWUaWHM/sKZIjkm4d5HGpwo4Y9DF9yTdNrIyk4TmoxdNnzbGFDHApo73XdnO+XCbRLxCj9mZN2S6JnusDBFgr3jq/rqv5e9hm06g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FMdL+0FX98E6GhloMZaLNHYW6u89sbkZj1bHW6h5Lio=; b=kn245harfYpfs/N6Gtd4EEhP+zeBu3ljbZW4Pe7c64TYXBuSgPnnE+HKXHJ2VUlq0y4E3HEJmABR3EkR4VSsTrtWNVkt6Ut8/K6u5w5eXsewLd1qntchwUu6eLWFnY4xoGEviGzxo7R+AdNC/vhGwkCnZ8cHS78JskK/tq5Efso= 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 1677161205265469.4116000063797; Thu, 23 Feb 2023 06:06:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvl-00023Z-1S; Thu, 23 Feb 2023 08:46:41 -0500 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 1pVBvh-00021S-Dx for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVBvf-0001O0-Ss for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:37 -0500 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-605-EUJ6eHiZP-KLZUo-Kgh7cA-1; Thu, 23 Feb 2023 08:46:28 -0500 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 BCF598828C1; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D70A2166B29; Thu, 23 Feb 2023 13:46:27 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 996AF21E6A23; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FMdL+0FX98E6GhloMZaLNHYW6u89sbkZj1bHW6h5Lio=; b=Fb+v0V8uqmL/HpNJetX90UzLNBm2h/Fe2brA12pVcXJRxesNIe+PcKGZNf/+j+LsdLKeOz 8yXCsgQVifnpSj3c8258Ot6312Zf6cB60yuTg43Hw8tl1ueIOWqmc96gEIMGB8nDEWShaf Z7ErHAre0iEhlbNsbv7MEsbbaJwtwis= X-MC-Unique: EUJ6eHiZP-KLZUo-Kgh7cA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 04/12] hw/core: Improve error message when machine doesn't provide NMIs Date: Thu, 23 Feb 2023 14:46:18 +0100 Message-Id: <20230223134626.2107382-5-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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.129.124; envelope-from=armbru@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 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: 1677161211649100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_UNSUPPORTED, and improve the rather vague error message (qemu) nmi Error: this feature or command is not currently supported to Error: machine does not provide NMIs Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-5-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- hw/core/nmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/core/nmi.c b/hw/core/nmi.c index 481c4b3c7e..a7bce8a04a 100644 --- a/hw/core/nmi.c +++ b/hw/core/nmi.c @@ -22,7 +22,6 @@ #include "qemu/osdep.h" #include "hw/nmi.h" #include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "qemu/module.h" #include "monitor/monitor.h" =20 @@ -70,7 +69,7 @@ void nmi_monitor_handle(int cpu_index, Error **errp) if (ns.handled) { error_propagate(errp, ns.err); } else { - error_setg(errp, QERR_UNSUPPORTED); + error_setg(errp, "machine does not provide NMIs"); } } =20 --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161254; cv=none; d=zohomail.com; s=zohoarc; b=JgUCRCW/PgogphxsNqPOOrsjZz1tH73euiflamdbriVwygkY14zubTQxtr187GsAPTwDtdU43MsdsWTSuwesRPdaZ5e2qj3gmn6xWSMb/oWg1c0+LClAx/l0lRXSmt4o+dfQb6+5Lxm341T3njrr2M0x4d/QbLdAADoa/HhPR+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161254; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mE6VhIC9L6a0UBulzm1IUsH2b/NDRLSHPY1NdbL3glM=; b=BUQzbpwQt43aYzom2YBDcB49PsPYfB9K59EUtFfuSE3sepvo+YB4GQjObyAUm1iFiAFeEYcHTIBurgHy4riWf/35takZBhHlpyUv/imMDwT1JtYivyNHSbS1wqnH5NOTKFFF+WXOwh9Wcrf2IIfEY+oPtqYZCtMmhlGMBN6/Fwg= 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 1677161254579819.5839088576588; Thu, 23 Feb 2023 06:07:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvi-00021k-1W; Thu, 23 Feb 2023 08:46:38 -0500 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 1pVBve-0001z4-A9 for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVBvc-0001MP-S9 for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 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-517-p25JM-88OB-jcH3I0FmSEQ-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B390F100F909; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9379E2026D3E; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9BEC821E6A24; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mE6VhIC9L6a0UBulzm1IUsH2b/NDRLSHPY1NdbL3glM=; b=MbAHKduZJ/1QE3lgZ+dilZHpSADbJAQFH2awnRdYDI/d+gtJGUBdK5LLvU/KqtlBonTORv eSyKnusxjBXJpwHoeJ+IjGtnFaze85qAaHS+fweR17zo+0vqcUmeRgdk3oDrTOJTo0bOTg LkWqXYhCRIESEVjMEkVqrv7FcQKF3Bg= X-MC-Unique: p25JM-88OB-jcH3I0FmSEQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 05/12] hw/smbios: Dumb down smbios_entry_add() stub Date: Thu, 23 Feb 2023 14:46:19 +0100 Message-Id: <20230223134626.2107382-6-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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.129.124; envelope-from=armbru@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 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: 1677161256546100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. smbios_entry_add() is only ever called on behalf of CLI option -smbios. Since qemu-options.hx sets @arch_mask to QEMU_ARCH_I386 | QEMU_ARCH_ARM, it is reachable only for these targets. Since they provide a real smbios_entry_add(), the stub is unreachable. There's no point in unreachable code keeping QERR_UNSUPPORTED alive. Dumb it down to g_assert_not_reached(). Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-6-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- hw/smbios/smbios-stub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/smbios/smbios-stub.c b/hw/smbios/smbios-stub.c index 64e5ba93ec..e8808adfda 100644 --- a/hw/smbios/smbios-stub.c +++ b/hw/smbios/smbios-stub.c @@ -21,11 +21,9 @@ */ =20 #include "qemu/osdep.h" -#include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "hw/firmware/smbios.h" =20 void smbios_entry_add(QemuOpts *opts, Error **errp) { - error_setg(errp, QERR_UNSUPPORTED); + g_assert_not_reached(); } --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161078; cv=none; d=zohomail.com; s=zohoarc; b=E0wlUhXgkwTtvyzs/3NyaRVEeBZ+ONyiVrXQHmnzb42v7dWNKK93HtgAvPdGwgJ7rMQy78+kDcn5IEl880x/FcV4xzqrQQBe+sHRX08QKH4NVSLgln622tYj3vScGxlQG2aNvhgBWH1ok2od3woPeOLbg/zgpQZcTKQvWouk4MQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161078; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iDRXgA6vbOoFLEWZKWxTSfVECrV7/I3P6OGMABGcmIs=; b=i3mIimNtEA2H+gNGHQpw1IHBAo0ORJvDG76TnjaLYUAiWwfiVX77IrhJT4bKWGQH/blq+QSDckQadgbYpsMozfyQFOBTahDduuhMx+s/ZSWkNNA2cKGK1qQc4+iBPsdSXN1OotlzcUFbEdXJtqxNVDEgMOEmAr5ulv2+rlr6X1M= 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 1677161078785442.5039690899322; Thu, 23 Feb 2023 06:04:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvk-00023F-FH; Thu, 23 Feb 2023 08:46:40 -0500 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 1pVBvf-0001zR-0F for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:35 -0500 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 1pVBvd-0001Mc-4E for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 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-360-oTnPmUC1Oa6fsUfOb4VmfQ-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B444087A9E3; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93D7DC15BA0; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9E75121E6A25; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iDRXgA6vbOoFLEWZKWxTSfVECrV7/I3P6OGMABGcmIs=; b=Clfk28iL/Y28li7OO/OiFDTSMOUVT+Dr5uGehzwjqa8/lBuI4fNdCb+tGfmhRV/sCvf8qa QEgMaWYE/ua+j45XJWG99EoNlmFPi0bG3ezRYw5o/A6m9dqgoUbho3aLrKAvJXX2KaLIHe 6ojydR2JXW5Ahw9iOrvQAT9BXcwkZjg= X-MC-Unique: oTnPmUC1Oa6fsUfOb4VmfQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 06/12] hw/acpi: Dumb down acpi_table_add() stub Date: Thu, 23 Feb 2023 14:46:20 +0100 Message-Id: <20230223134626.2107382-7-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=armbru@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 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: 1677161131742100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. acpi_table_add() is only ever called on behalf of CLI option -acpitable. Since qemu-options.hx sets @arch_mask to QEMU_ARCH_I386, it is reachable only for these targets. Since they provide a real acpi_table_add(), the stub is unreachable. There's no point in unreachable code keeping QERR_UNSUPPORTED alive. Dumb it down to g_assert_not_reached(). Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-7-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- hw/acpi/acpi-stub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/acpi/acpi-stub.c b/hw/acpi/acpi-stub.c index 4c9d081ed4..e268ce9b1a 100644 --- a/hw/acpi/acpi-stub.c +++ b/hw/acpi/acpi-stub.c @@ -19,11 +19,9 @@ */ =20 #include "qemu/osdep.h" -#include "qapi/error.h" -#include "qapi/qmp/qerror.h" #include "hw/acpi/acpi.h" =20 void acpi_table_add(const QemuOpts *opts, Error **errp) { - error_setg(errp, QERR_UNSUPPORTED); + g_assert_not_reached(); } --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161296; cv=none; d=zohomail.com; s=zohoarc; b=czgcqhA9rowic+ZiyKGeshE4BeKX2u7eYZue6z293R7eDkIGQ8a1oUigDEh6H2BHA1gqLNTOhu9MuDXCjWLtTHSS//vztY/rRcCTM11zmPN26TUkXzlOCuUSH6NtXxpplSkiIiTNBaQMqPRoBWAPuSGU5h3mo4EG+Rj2Mo8v44g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161296; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MVSHTvqIbQbRj3x/dZu08tXx76AgEq+i0KkNOGnK/gs=; b=ZE61IuWWVbYGSFpmo04JPQXctR4nAdFPYgX0sAN+RjGhyv2xBhYHdKJI7LE0Z9YpkpVzqDzLZaD4tzuQMmU/eqBLSqVpU9wf+x5WMLmzsXJSSKqM3R+mZTe6sWz8yplHbaLDBOxbf1ttXGQ0d3MqAuU7VtItwVwqcjPZgT9fq2Q= 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 1677161296486185.9076739564557; Thu, 23 Feb 2023 06:08:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvi-00022G-Nj; Thu, 23 Feb 2023 08:46:38 -0500 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 1pVBve-0001zK-RQ for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 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 1pVBvd-0001Ma-3p for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-bMfp5GCjN2OZzEjwE02-Gw-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5DF428237C0; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 945194014CF8; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A119D21E6A26; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MVSHTvqIbQbRj3x/dZu08tXx76AgEq+i0KkNOGnK/gs=; b=jBue5TiGiN1P8HGoEai8XK1Nb6NOEDTIsK8WqRn6iBcckrKvmVH0+QvZB5eY8oW6rMsKRz Ooa6iUJcQszJl6cakCnP1PrxjofKERZMa2QUWAxUgOtTyUZk157UOtYEvqTZ1WMcMFgu5B 4lR0s0k8RxF+gAFSnqfvtmEqBA7CYZA= X-MC-Unique: bMfp5GCjN2OZzEjwE02-Gw-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 07/12] hw/acpi: Move QMP command to hw/core/ Date: Thu, 23 Feb 2023 14:46:21 +0100 Message-Id: <20230223134626.2107382-8-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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=armbru@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 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: 1677161296768100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. qmp_query_vm_generation_id() in stubs/vmgenid.c is the last user of QERR_UNSUPPORTED outside qga/. Unlike the stubs we just dropped, it is actually reachable, namely when CONFIG_ACPI_VMGENID is off. It always fails like (qemu) info vm-generation-id Error: this feature or command is not currently supported Turns out the real qmp_query_vm_generation_id() doesn't actually depend on CONFIG_ACPI_VMGENID, and fails safely when it's off. Move it to hw/core/machine-qmp-cmds.c, and drop the stub. The error message becomes Error: VM Generation ID device not found Feels like an improvement to me. Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-8-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- MAINTAINERS | 1 - hw/acpi/vmgenid.c | 18 ------------------ hw/core/machine-qmp-cmds.c | 18 ++++++++++++++++++ stubs/vmgenid.c | 10 ---------- stubs/meson.build | 1 - 5 files changed, 18 insertions(+), 30 deletions(-) delete mode 100644 stubs/vmgenid.c diff --git a/MAINTAINERS b/MAINTAINERS index 9adb628627..eb917e48c0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2273,7 +2273,6 @@ F: hw/acpi/vmgenid.c F: include/hw/acpi/vmgenid.h F: docs/specs/vmgenid.txt F: tests/qtest/vmgenid-test.c -F: stubs/vmgenid.c =20 LED M: Philippe Mathieu-Daud=C3=A9 diff --git a/hw/acpi/vmgenid.c b/hw/acpi/vmgenid.c index 0c9f158ac9..a39315c1b3 100644 --- a/hw/acpi/vmgenid.c +++ b/hw/acpi/vmgenid.c @@ -12,7 +12,6 @@ =20 #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" #include "qemu/module.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" @@ -244,20 +243,3 @@ static void vmgenid_register_types(void) } =20 type_init(vmgenid_register_types) - -GuidInfo *qmp_query_vm_generation_id(Error **errp) -{ - GuidInfo *info; - VmGenIdState *vms; - Object *obj =3D find_vmgenid_dev(); - - if (!obj) { - error_setg(errp, "VM Generation ID device not found"); - return NULL; - } - vms =3D VMGENID(obj); - - info =3D g_malloc0(sizeof(*info)); - info->guid =3D qemu_uuid_unparse_strdup(&vms->guid); - return info; -} diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 44b5da8880..a6ed3a63c3 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -8,6 +8,7 @@ */ =20 #include "qemu/osdep.h" +#include "hw/acpi/vmgenid.h" #include "hw/boards.h" #include "hw/intc/intc.h" #include "hw/mem/memory-device.h" @@ -383,3 +384,20 @@ HumanReadableText *qmp_x_query_irq(Error **errp) =20 return human_readable_text_from_str(buf); } + +GuidInfo *qmp_query_vm_generation_id(Error **errp) +{ + GuidInfo *info; + VmGenIdState *vms; + Object *obj =3D find_vmgenid_dev(); + + if (!obj) { + error_setg(errp, "VM Generation ID device not found"); + return NULL; + } + vms =3D VMGENID(obj); + + info =3D g_malloc0(sizeof(*info)); + info->guid =3D qemu_uuid_unparse_strdup(&vms->guid); + return info; +} diff --git a/stubs/vmgenid.c b/stubs/vmgenid.c deleted file mode 100644 index bfad656c6c..0000000000 --- a/stubs/vmgenid.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "qemu/osdep.h" -#include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" -#include "qapi/qmp/qerror.h" - -GuidInfo *qmp_query_vm_generation_id(Error **errp) -{ - error_setg(errp, QERR_UNSUPPORTED); - return NULL; -} diff --git a/stubs/meson.build b/stubs/meson.build index 981585cbdf..7657467a5d 100644 --- a/stubs/meson.build +++ b/stubs/meson.build @@ -45,7 +45,6 @@ stub_ss.add(files('target-get-monitor-def.c')) stub_ss.add(files('target-monitor-defs.c')) stub_ss.add(files('trace-control.c')) stub_ss.add(files('uuid.c')) -stub_ss.add(files('vmgenid.c')) stub_ss.add(files('vmstate.c')) stub_ss.add(files('vm-stop.c')) stub_ss.add(files('win32-kbd-hook.c')) --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161265; cv=none; d=zohomail.com; s=zohoarc; b=mzaBf/kJt3KeFlS+uMdJT3eo8QlVN9Rg+desRRVnXKl8az68ixB8kb9wWML8Qcu/kf7Ydginv1biOIP27b9baL//xhDLwfhzWXaomWOpy4kgcsyAxhXI5oQcVYRDlN/+Czj75W0W5BlC+9CIjr7y/lfhANzmLywMMqb4Wbxj8j4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161265; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TEL7zz2s6I30r6akxagYQKYrspxUO19/B/4B/vAnqrU=; b=Nawdidgo8EXRAuzpudktuBxY2VbJgwh2rP5ryrzGUTRHrZPfNuHZJByjQ05LmLe6O+udjhhz0mOX4cibFTog6t4AMzU9Dh9QIf+OKMHxU+fE2zyQdda3Gin32bchapDHYkhQi9o4KJzOTEEHZD6qvOCFkQbumoYlCNR8UGBrodQ= 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 1677161265828215.52622906764861; Thu, 23 Feb 2023 06:07:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvi-00021s-Fw; Thu, 23 Feb 2023 08:46:38 -0500 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 1pVBvf-0001zz-MJ for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:35 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVBve-0001N4-73 for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:35 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-Wml4GfQWPwGVgpcHke5wqQ-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5F293810B19; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 956F9C15BAD; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A37C921E6A28; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159993; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TEL7zz2s6I30r6akxagYQKYrspxUO19/B/4B/vAnqrU=; b=bVsKOv2pRoZK4yOnCiHObO0uAeCdsXJTcxShvg3QIV8dNvOAPwyv51idlDsPOQOiqzyzyE JnWu55JvNQQznSDvdkh2JfcVwfkN0souMaYWajSpcxoiR6K4dFPXTafaLM5U48zZLQzwTd Mo5dFGcHWOocH4et7RQqyw360CjYtGQ= X-MC-Unique: Wml4GfQWPwGVgpcHke5wqQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela , Konstantin Kostiuk Subject: [PULL 08/12] qga: Drop dangling reference to QERR_QGA_LOGGING_DISABLED Date: Thu, 23 Feb 2023 14:46:22 +0100 Message-Id: <20230223134626.2107382-9-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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.129.124; envelope-from=armbru@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 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: 1677161266359100001 slog()'s function comment advises to use QERR_QGA_LOGGING_DISABLED. This macro never existed. The reference got added in commit e3d4d25206a "guest agent: add guest agent RPCs/commands" along with QERR_QGA_LOGGING_FAILED, so maybe that one was meant. However, QERR_QGA_LOGGING_FAILED was never actually used, and was removed in commit d73f0beadb5 "qerror.h: Remove unused error classes". Drop the dangling reference. Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-9-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela Reviewed-by: Konstantin Kostiuk --- qga/commands.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qga/commands.c b/qga/commands.c index 360077364e..172826f8f8 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -32,9 +32,8 @@ #define GUEST_FILE_READ_COUNT_MAX (48 * MiB) =20 /* Note: in some situations, like with the fsfreeze, logging may be - * temporarilly disabled. if it is necessary that a command be able - * to log for accounting purposes, check ga_logging_enabled() beforehand, - * and use the QERR_QGA_LOGGING_DISABLED to generate an error + * temporarily disabled. if it is necessary that a command be able + * to log for accounting purposes, check ga_logging_enabled() beforehand. */ void slog(const gchar *fmt, ...) { --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677160968; cv=none; d=zohomail.com; s=zohoarc; b=dly6HRLbRM8bZGjeQzVMTdwNRqGzDkGUJGLfYGUtv454gsr/cb0abx31IPRqI9C+US4NyE1awgVc2+F3EQBJDx/QPmWY0zATLUJ3rO6BZZO1xA1nO3pLWbPgJ4FgEqzdQSo9aBBr/a36btYtnOa8rrOaoMuJKHHkLlDM1wSBoXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677160968; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kfJ0CUF+hd4V2TZHuoU9TMc+u0nzgLF22q4HOavaYaE=; b=Yca5MLutimxFFf80wIev6R7ZTYihNKmH2U62br31PoJz2oVQIRmWAQgl9px2Hc9YNXch7S2g/t3v5zO7lhigf2etSABDb5rYN4ysN0fZkazOJPVfImxWDWN0ifepSWhyljOqsinOVZGRPTrJJloX/YhzE1GU2KBAF0JJ2E/ufGY= 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 16771609683910.2563191144755592; Thu, 23 Feb 2023 06:02:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvf-0001zf-7D; Thu, 23 Feb 2023 08:46:35 -0500 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 1pVBvd-0001yJ-SE for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:33 -0500 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 1pVBvb-0001Lu-Ao for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:33 -0500 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-380-E656rAbPP0espFXL7c3KVA-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB7CE8828C1; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F3E340C945A; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A5CAD21E6A36; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kfJ0CUF+hd4V2TZHuoU9TMc+u0nzgLF22q4HOavaYaE=; b=D1NbExF6gIIZFaKdxeFGED0lj+akOMfLXTdZjv6eZTBNl7JQWCdGZ0bvg4EqOWFUHTUnhJ knsrSMVWSg4iJMs9i9dK46mvQZqqDIf6ua2Igd8l/Guxk0dIsSnM+rzqbVoq+noUbjwfD8 Vm9TOUePjSVdZr+KrwWlbP843kyhUw0= X-MC-Unique: E656rAbPP0espFXL7c3KVA-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 09/12] replay: Simplify setting replay blockers Date: Thu, 23 Feb 2023 14:46:23 +0100 Message-Id: <20230223134626.2107382-10-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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=armbru@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 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: 1677161022972100001 replay_add_blocker() takes an Error *. All callers pass one created like this: error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, "some feature"); Folding this into replay_add_blocker() simplifies the callers, losing a bit of generality we haven't needed in more than six years. Since there are no other uses of macro QERR_REPLAY_NOT_SUPPORTED, replace the remaining one by its expansion, and drop the macro. Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-10-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qapi/qmp/qerror.h | 3 --- include/sysemu/replay.h | 2 +- replay/replay.c | 6 +++++- replay/stubs-system.c | 2 +- softmmu/rtc.c | 5 +---- softmmu/vl.c | 13 +++---------- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 87ca83b155..09006e69f7 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -59,9 +59,6 @@ #define QERR_QGA_COMMAND_FAILED \ "Guest agent command failed, error was '%s'" =20 -#define QERR_REPLAY_NOT_SUPPORTED \ - "Record/replay feature is not supported for '%s'" - #define QERR_UNSUPPORTED \ "this feature or command is not currently supported" =20 diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 7ec0882b50..6e5ab09f71 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -72,7 +72,7 @@ void replay_start(void); /*! Closes replay log file and frees other resources. */ void replay_finish(void); /*! Adds replay blocker with the specified error description */ -void replay_add_blocker(Error *reason); +void replay_add_blocker(const char *feature); /* Returns name of the replay log file */ const char *replay_get_filename(void); /* diff --git a/replay/replay.c b/replay/replay.c index 9a0dc1cf44..c39156c522 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -376,8 +376,12 @@ void replay_finish(void) replay_mode =3D REPLAY_MODE_NONE; } =20 -void replay_add_blocker(Error *reason) +void replay_add_blocker(const char *feature) { + Error *reason =3D NULL; + + error_setg(&reason, "Record/replay feature is not supported for '%s'", + feature); replay_blockers =3D g_slist_prepend(replay_blockers, reason); } =20 diff --git a/replay/stubs-system.c b/replay/stubs-system.c index 5c262b08f1..50cefdb2d6 100644 --- a/replay/stubs-system.c +++ b/replay/stubs-system.c @@ -12,7 +12,7 @@ void replay_input_sync_event(void) qemu_input_event_sync_impl(); } =20 -void replay_add_blocker(Error *reason) +void replay_add_blocker(const char *feature) { } void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t= size) diff --git a/softmmu/rtc.c b/softmmu/rtc.c index f7114bed7d..4b2bf75dd6 100644 --- a/softmmu/rtc.c +++ b/softmmu/rtc.c @@ -152,11 +152,8 @@ void configure_rtc(QemuOpts *opts) if (!strcmp(value, "utc")) { rtc_base_type =3D RTC_BASE_UTC; } else if (!strcmp(value, "localtime")) { - Error *blocker =3D NULL; rtc_base_type =3D RTC_BASE_LOCALTIME; - error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, - "-rtc base=3Dlocaltime"); - replay_add_blocker(blocker); + replay_add_blocker("-rtc base=3Dlocaltime"); } else { rtc_base_type =3D RTC_BASE_DATETIME; configure_rtc_base_datetime(value); diff --git a/softmmu/vl.c b/softmmu/vl.c index 459588aa7d..6e526d95bb 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1852,9 +1852,7 @@ static void qemu_apply_machine_options(QDict *qdict) } =20 if (current_machine->smp.cpus > 1) { - Error *blocker =3D NULL; - error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, "smp"); - replay_add_blocker(blocker); + replay_add_blocker("smp"); } } =20 @@ -2774,13 +2772,8 @@ void qemu_init(int argc, char **argv) drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS); break; case QEMU_OPTION_snapshot: - { - Error *blocker =3D NULL; - snapshot =3D 1; - error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, - "-snapshot"); - replay_add_blocker(blocker); - } + snapshot =3D 1; + replay_add_blocker("-snapshot"); break; case QEMU_OPTION_numa: opts =3D qemu_opts_parse_noisily(qemu_find_opts("numa"), --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161285; cv=none; d=zohomail.com; s=zohoarc; b=OuA7UlBZ776ursOrmleT3f0qK1oogATtC/hHfRWA7uGMQHDuCwG2Zxwu77ryV2jwvfljhb7+KMNfwTaMC490Xfb1pum1x5qA6XeEo5kzaZ6PcCcRbDd6ziaORBDnxm6s//2iVtOBsdkCcDL9i9X0uwtXC248GK6kFt0FzcB6EG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161285; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HZkRRES6VX9fUsJrjO1e3Z80R6OzP3FBSPHoy8Bujyo=; b=hdhkNbD+WJTtX3JkCp7lOg4D1VxE7csUgaBT+yQ5SJ+5j7Grkfy/V9BTQRg8b4MITXzCpkKuEeZgMWO6kJWdMndDUdgUGkefDipLCcTG/5LLueSkBfW9+FFGSbcI2X7KbJfw3UbExXdVVUQ6SpBPycCpmEc0W8IeOFkZ+M3y/d8= 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 1677161285936537.989359918002; Thu, 23 Feb 2023 06:08:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvg-00020o-Vx; Thu, 23 Feb 2023 08:46:37 -0500 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 1pVBvc-0001wO-Rz for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVBvb-0001Lq-7G for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:32 -0500 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-517-lInWLAsKPZSoFW2wqn582Q-1; Thu, 23 Feb 2023 08:46:29 -0500 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 C2D1F101A521; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A2FE52166B29; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A81C521E6900; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HZkRRES6VX9fUsJrjO1e3Z80R6OzP3FBSPHoy8Bujyo=; b=X0RnYq/HrQVOD69eQkFQsmAtv7xRglrt5XrC4dCLF1Kt+yC/GtNEv2x/6JdqBYbmxFrHzE 3MHcmlxmshChduQsVMcOv0QBzXzm2iEHdorPW138f8XFXT3Y2dgOY93Tkbduxn3ec4foOa dtYl7fgHkt9O4EJ+K/vODyZDOcQ+Qlc= X-MC-Unique: lInWLAsKPZSoFW2wqn582Q-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 10/12] hw/core: Improve the query-hotpluggable-cpus error message Date: Thu, 23 Feb 2023 14:46:24 +0100 Message-Id: <20230223134626.2107382-11-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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.129.124; envelope-from=armbru@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 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: 1677161286661100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_FEATURE_DISABLED, and improve the slightly awkward error message (qemu) info hotpluggable-cpus Error: The feature 'query-hotpluggable-cpus' is not enabled to Error: machine does not support hot-plugging CPUs Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-11-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/core/machine-qmp-cmds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index a6ed3a63c3..2d904747c0 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -16,7 +16,6 @@ #include "qapi/error.h" #include "qapi/qapi-builtin-visit.h" #include "qapi/qapi-commands-machine.h" -#include "qapi/qmp/qerror.h" #include "qapi/qmp/qobject.h" #include "qapi/qobject-input-visitor.h" #include "qapi/type-helpers.h" @@ -141,7 +140,7 @@ HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error = **errp) MachineClass *mc =3D MACHINE_GET_CLASS(ms); =20 if (!mc->has_hotpluggable_cpus) { - error_setg(errp, QERR_FEATURE_DISABLED, "query-hotpluggable-cpus"); + error_setg(errp, "machine does not support hot-plugging CPUs"); return NULL; } =20 --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161072; cv=none; d=zohomail.com; s=zohoarc; b=OLpc7c6Sgjty9Z6M3Ao6J3kggn9oWZo8gy5Crd68Q7Yo6pgG18ewi6YJVBlgetp4geohmFaIVbMG7fP0Lr5AtxyTtPOSaiXLCJR3joUcJlA32r3CDtnwmSBXF57rBoHtnZpedtQ6l7gtYUnBtsIoCzjSsIg3D40bQmXayR2i1MM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161072; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3pdCPADBzlpA82/42VSh5gq+wKSQ+ZhFCYEqxjgt3VA=; b=ZH4z9iKfcMUejkzqrXkWuYqqcrQRM8YakXw1WAzH7wKR12TfqvS7zLLBDADBPHfOjYIrN3msAZKV6MsLeQJQ7k0QjZwM+ofjWVC148B0c9AP1cfNGEbulmv77bBvRgEYMtKS3AbTpbt25eSbEXxwFQPe5OJGQfN3Pr5GUwHAWqo= 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677161072516409.07191366790437; Thu, 23 Feb 2023 06:04:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvg-00020V-OT; Thu, 23 Feb 2023 08:46:36 -0500 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 1pVBvd-0001yH-Ol for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:33 -0500 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 1pVBvb-0001M1-NM for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:33 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260--vB5kvwWNb2bQ-ag7YZHQg-1; Thu, 23 Feb 2023 08:46:30 -0500 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 C33A628237C3; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A3A012166B2B; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id AA96421E6901; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3pdCPADBzlpA82/42VSh5gq+wKSQ+ZhFCYEqxjgt3VA=; b=Ud/87jFJWQFJczUllDPQzQp+2f1+D4F9Tn1lWCkm5WnxaR5DDYNGCrp/tXXF9rCtmVdIvR WO8tCojG3yzdEp3OlX72A1V1zKRWIT11NekMGakP8J8o7PO1V83b7fBjo781ayoYgCyrZb IB9D262DYdTeZEo7EcyhnB+OGDcBf1E= X-MC-Unique: -vB5kvwWNb2bQ-ag7YZHQg-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 11/12] migration/colo: Improve an x-colo-lost-heartbeat error message Date: Thu, 23 Feb 2023 14:46:25 +0100 Message-Id: <20230223134626.2107382-12-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=armbru@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 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: 1677161121037100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. Get rid of a use of QERR_FEATURE_DISABLED, and improve the somewhat imprecise error message (qemu) x_colo_lost_heartbeat Error: The feature 'colo' is not enabled to Error: VM is not in COLO mode Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-12-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- migration/colo-failover.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/colo-failover.c b/migration/colo-failover.c index 42453481c4..6cb6f90357 100644 --- a/migration/colo-failover.c +++ b/migration/colo-failover.c @@ -17,7 +17,6 @@ #include "migration.h" #include "qapi/error.h" #include "qapi/qapi-commands-migration.h" -#include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "trace.h" =20 @@ -78,7 +77,7 @@ FailoverStatus failover_get_state(void) void qmp_x_colo_lost_heartbeat(Error **errp) { if (get_colo_mode() =3D=3D COLO_MODE_NONE) { - error_setg(errp, QERR_FEATURE_DISABLED, "colo"); + error_setg(errp, "VM is not in COLO mode"); return; } =20 --=20 2.39.0 From nobody Sun May 19 03:54:45 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=1677161271; cv=none; d=zohomail.com; s=zohoarc; b=dR7G0ahDMncQukQpqnIKTk+xCApmc43sMMt/euZ5J7jSPZvA9Uite+lvVu/4ivmqM9sGizG4H6YnTOAiXnEnnw3Xv+HfHDetY9H779ngRcADLnJ+q6TZ7KuKIGbbayCLvy6Eo3HspKV6JcrxK9EjbJ/v2oMd2neT7XcF0MCe9L0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677161271; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fOG2Y34FHrg9v8OV+YU5WBLbTgi4DJhYPYOKebiEnCA=; b=FpNLPSvfpUyBxqMNTEV2y36QRnJKjdk5Sjr4XOmoteHYCJxcVPxa6hb+xmfNpsYLR2WCJpQQmTKaHF9yO4QB+eFOZ5smAoG50OXIz86qh62IrpO9eFxoTsqMKhSXDKZSeFiGJkKcTUTgI5qBW3vL8Ih1CL2Vn524MirFJg0hZvA= 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 1677161271065553.0356720398784; Thu, 23 Feb 2023 06:07:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVBvi-000229-M3; Thu, 23 Feb 2023 08:46:38 -0500 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 1pVBvf-0001zg-7n for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:35 -0500 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 1pVBvd-0001Mb-4H for qemu-devel@nongnu.org; Thu, 23 Feb 2023 08:46:34 -0500 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-608-wkWPW_hiMfexIrCMjCPI2g-1; Thu, 23 Feb 2023 08:46:29 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CE8343810B1C; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AD9F6C15BAE; Thu, 23 Feb 2023 13:46:28 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id ACF9521E690F; Thu, 23 Feb 2023 14:46:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677159992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fOG2Y34FHrg9v8OV+YU5WBLbTgi4DJhYPYOKebiEnCA=; b=b6RzEwABwV1iGL3bOfPwsQAQjrXirCRlZIbfuGSLZh6G0fg5hidJQz1BnuAjGlUHzovyAp pr2wio+CWDlcG3i4XgnSykb5YADtpPDiGFqUXn4COzY6U7LLC2ITILhsKdVd/b9MET9222 FcBOablx86TpWbaHTqq3AmIUDydckA8= X-MC-Unique: wkWPW_hiMfexIrCMjCPI2g-1 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Juan Quintela Subject: [PULL 12/12] rocker: Tweak stubbed out monitor commands' error messages Date: Thu, 23 Feb 2023 14:46:26 +0100 Message-Id: <20230223134626.2107382-13-armbru@redhat.com> In-Reply-To: <20230223134626.2107382-1-armbru@redhat.com> References: <20230223134626.2107382-1-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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=armbru@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 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: 1677161272550100001 The QERR_ macros are leftovers from the days of "rich" error objects. We've been trying to reduce their remaining use. The stubbed out Rocker monitor commands are the last remaining users of QERR_FEATURE_DISABLED. They fail like this: (qemu) info rocker mumble Error: The feature 'rocker' is not enabled The real rocker commands fail like this when the named object doesn't exist: Error: rocker mumble not found If that's good enough when Rocker is enabled, then it's good enough when it's disabled, so replace QERR_FEATURE_DISABLED with that, and drop the macro. Signed-off-by: Markus Armbruster Message-Id: <20230207075115.1525-13-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela --- include/qapi/qmp/qerror.h | 3 --- hw/net/rocker/qmp-norocker.c | 12 +++++------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 09006e69f7..8dd9fcb071 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -29,9 +29,6 @@ #define QERR_DEVICE_NO_HOTPLUG \ "Device '%s' does not support hotplugging" =20 -#define QERR_FEATURE_DISABLED \ - "The feature '%s' is not enabled" - #define QERR_INVALID_PARAMETER \ "Invalid parameter '%s'" =20 diff --git a/hw/net/rocker/qmp-norocker.c b/hw/net/rocker/qmp-norocker.c index 5ef4f9324c..f6c1196a24 100644 --- a/hw/net/rocker/qmp-norocker.c +++ b/hw/net/rocker/qmp-norocker.c @@ -1,6 +1,5 @@ /* - * QMP Target options - Commands handled based on a target config - * versus a host config + * QMP command stubs * * Copyright (c) 2015 David Ahern * @@ -18,17 +17,16 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/qapi-commands-rocker.h" -#include "qapi/qmp/qerror.h" =20 RockerSwitch *qmp_query_rocker(const char *name, Error **errp) { - error_setg(errp, QERR_FEATURE_DISABLED, "rocker"); + error_setg(errp, "rocker %s not found", name); return NULL; }; =20 RockerPortList *qmp_query_rocker_ports(const char *name, Error **errp) { - error_setg(errp, QERR_FEATURE_DISABLED, "rocker"); + error_setg(errp, "rocker %s not found", name); return NULL; }; =20 @@ -37,7 +35,7 @@ RockerOfDpaFlowList *qmp_query_rocker_of_dpa_flows(const = char *name, uint32_t tbl_id, Error **errp) { - error_setg(errp, QERR_FEATURE_DISABLED, "rocker"); + error_setg(errp, "rocker %s not found", name); return NULL; }; =20 @@ -46,6 +44,6 @@ RockerOfDpaGroupList *qmp_query_rocker_of_dpa_groups(cons= t char *name, uint8_t type, Error **errp) { - error_setg(errp, QERR_FEATURE_DISABLED, "rocker"); + error_setg(errp, "rocker %s not found", name); return NULL; }; --=20 2.39.0