From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719554; cv=none; d=zohomail.com; s=zohoarc; b=bszG8GqC0fUzlcDpYK62zUQcuKq2QNl61jkBrjBUFDH93Ynvus9dV7hnoJyLRONQ4QShgcAmYEa8X6wzAgNLPYD+SRkuFeGJ/v1cGyynQn+EcNEQ3bFUfVF0Pe8JxLsZ13CTrnqJY+/qWmZPKZJSvTMlUB+CVzGRc0ZZexr7XpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719554; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zBpnfoTYGAJ2In56hR2qL4c2Q0xWmFwNKxU47aBPoxY=; b=gQC1F5Xo+2xQG40jljAOC1unf2IlCrZJXGxp57KXHQL5sJDU5gGMPa46xtRBUMD5oHysYB7jgd7XlbRL0mZdaECigrAFTZjAhJ/ZgJeMCD0/PwTWU/Ve5htnRpYv4fWGOcsiL6Q7+8ugmz354RDeZu2j0ovS2bR5FUmZ3BbF2oA= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772719554352462.7842685412129; Thu, 5 Mar 2026 06:05:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9KT-0002Nl-JR; Thu, 05 Mar 2026 09:05:31 -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 1vy9KJ-0002MS-VJ for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:19 -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 1vy9KG-0007pU-Kq for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:18 -0500 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-c1GpcHSOPDO_0hcD4leXxw-1; Thu, 05 Mar 2026 09:05:12 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7ACF21955DE2; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 11E8D1956095; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9713F21E692D; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719515; 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=zBpnfoTYGAJ2In56hR2qL4c2Q0xWmFwNKxU47aBPoxY=; b=JKg+PyT5E37b/i19RUt5sl5SIvgOA/XD2UVgjxskA21kmdN32JQq5pOyvxabTqIGFhlrn9 LFIOUQ7w54HbzORyWrDrVdN4NHbOOhbc2+so2BKqX78fqigDzW8EzS7Djh6EhpTFh8y94o JpJkcC/aebKK8QI5bO40PAt4Rhp2atE= X-MC-Unique: c1GpcHSOPDO_0hcD4leXxw-1 X-Mimecast-MFC-AGG-ID: c1GpcHSOPDO_0hcD4leXxw_1772719511 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/6] hw/core: Deprecate query-kvm Date: Thu, 5 Mar 2026 15:05:03 +0100 Message-ID: <20260305140508.218316-2-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-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.0 on 10.30.177.17 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719557101158500 query-accelerators covers all accelerators, and should be used instead. Signed-off-by: Markus Armbruster Message-ID: <20260108131455.2240598-2-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 [Rebased, missing section title markup fixed] --- docs/about/deprecated.rst | 5 +++++ qapi/accelerator.json | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index d0ce914d85..ee29c4fb89 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -142,6 +142,11 @@ Use ``job-dismiss`` instead. =20 Use ``job-finalize`` instead. =20 +``query-kvm`` (since 11.0) +'''''''''''''''''''''''''' + +Use ``query-accelerators`` instead. + Human Machine Protocol (HMP) commands ------------------------------------- =20 diff --git a/qapi/accelerator.json b/qapi/accelerator.json index 0cf5e0f9d9..b59df37866 100644 --- a/qapi/accelerator.json +++ b/qapi/accelerator.json @@ -29,6 +29,11 @@ # # Return information about KVM acceleration # +# Features: +# +# @deprecated: This command is deprecated. Use `query-accelerators` +# instead. +# # Since: 0.14 # # .. qmp-example:: @@ -36,7 +41,8 @@ # -> { "execute": "query-kvm" } # <- { "return": { "enabled": true, "present": true } } ## -{ 'command': 'query-kvm', 'returns': 'KvmInfo' } +{ 'command': 'query-kvm', 'returns': 'KvmInfo', + 'features': [ 'deprecated' ] } =20 ## # @x-accel-stats: --=20 2.53.0 From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719553; cv=none; d=zohomail.com; s=zohoarc; b=XPy94HV+Bo4oTls9jp3qTpel+b4zr5t1khfCCTRiRaOWGTrtQrytEhRGnqjclHSJGEyukDd6K+abfx+SYl2KU6Q7QVQI7TnGtxjkWISyKHrxF9FTKHaqtf0BPMaJSM1WjLOKqaWNNJB3GVztkAbLcxSFjquqVSAJfHVSghPuTNg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719553; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sj7t5sYEdl/rrqhMX84JuozAOPc9rHFA0SqMD36Pfy0=; b=UWj5ezyZ6LWYnefbydglFP3FYug8NY0GupEcX3aMHA8j7TsLQ0rmWTqtkx8qbTg0cbeVeEK+h8V9h0kwKWnqxNCFr0EeOtmynvNrBi0TiDjHQWlCZK74xBO4SqPt7Z8/o64grzISVlUk5XUoXQJYUeWMoMChdDnCc3V9B33rj2Q= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177271955390473.32613919653784; Thu, 5 Mar 2026 06:05:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9KL-0002MT-IW; Thu, 05 Mar 2026 09:05:21 -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 1vy9KI-0002M5-5v for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:18 -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 1vy9KG-0007pd-G8 for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:17 -0500 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-InPZo3eXNc--eS3BOyg0FQ-1; Thu, 05 Mar 2026 09:05:12 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 82B25180057B; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 099B01958DC7; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9B43921E6880; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719515; 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=sj7t5sYEdl/rrqhMX84JuozAOPc9rHFA0SqMD36Pfy0=; b=TClb2KlCIV5VnwfnyzPt86ttdiyXB34Z80Pg0Vw3HcChCnjJ0pgn0j/Cu+XNzZMOXJayYC WWCyNocuYplO5CR2DiiYFuhQ0UvhGoCL0SKNnELXjgHIEWufDKvvN0wNxnuQb/wrdCeo42 Pt2sg3wOzaJ4aIHnpI+uPAzi2GLpInI= X-MC-Unique: InPZo3eXNc--eS3BOyg0FQ-1 X-Mimecast-MFC-AGG-ID: InPZo3eXNc--eS3BOyg0FQ_1772719511 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 2/6] scripts/checkpatch: Fix MAINTAINERS update warning with --terse Date: Thu, 5 Mar 2026 15:05:04 +0100 Message-ID: <20260305140508.218316-3-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-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.0 on 10.30.177.12 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719557145154100 We recently improved the MAINTAINERS update warning to show the files that trigger it. Example: WARNING: added, moved or deleted file(s), does MAINTAINERS need updatin= g? #105: deleted file mode 100644 improved to WARNING: added, moved or deleted file(s): migration/threadinfo.h migration/threadinfo.c Does MAINTAINERS need updating? Unfortunately, this made things worse with --terse, as only the first line of each warning is shown then. WARNING: added, moved or deleted file(s), does MAINTAINERS need updatin= g? became WARNING: added, moved or deleted file(s): Adjust the warning text to WARNING: added, moved or deleted file(s), does MAINTAINERS need updatin= g? migration/threadinfo.h migration/threadinfo.c so we get the exact same warning as we used to with --terse. Fixes: 1d745e6d9635 (scripts/checkpatch: use new hook for MAINTAINERS updat= e check) Signed-off-by: Markus Armbruster Message-ID: <20260109071217.2326194-1-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 --- scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3a9557417f..6f270becdc 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1473,9 +1473,9 @@ sub process_file_list { =20 # If we don't see a MAINTAINERS update, prod the user to check if (int(@maybemaintainers) > 0 && !$sawmaintainers) { - WARN("added, moved or deleted file(s):\n\n " . - join("\n ", @maybemaintainers) . - "\n\nDoes MAINTAINERS need updating?\n"); + WARN("added, moved or deleted file(s)," + " does MAINTAINERS need updating?\n " + . join("\n ", @maybemaintainers)); } } =20 --=20 2.53.0 From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719553; cv=none; d=zohomail.com; s=zohoarc; b=AVZVNfXCIABuphwHyUuod9bnWsIpkvofbN8xw0CtlzhmZQ6hDM3ZgVSRFctd+0PuDeoTWqggo+Ri/ODTfcKBkvkwF1005tOkPVK+zMGeTFh2tAAvLrp54O5ldnzUGU6EWVbhWIK7o2Wefx/YSFlhpbZgu2zMp4tY/asI+MfKNG4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719553; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=JLMbFaEAxg7SkMHkD12blcTzS+nqNi4quD4mOZ301BE=; b=R9QoA8bk6OBupK0JjtFIPexlSvj4AjQDWKiUHQ6TZRZQeBd1RE6KjIEkqFaQ0lqSxtwVrZvYUqKIoesUxfNLEg9aLpFiNA4kvpw3TjxDuOf48mwnOhc6PpKEklTpIuj40sk1sz/w+E/zT96L+bBARdzqo15wQDpfNHm78pLHXmg= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772719553978753.5790097508077; Thu, 5 Mar 2026 06:05:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9KZ-0002OB-BX; Thu, 05 Mar 2026 09:05: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 1vy9KI-0002M7-9l for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:18 -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 1vy9KG-0007p9-BV for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:18 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-593-u6623qW2Mu25zYL3nYjGSg-1; Thu, 05 Mar 2026 09:05:12 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B5E5C1800633; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1D9BE1800760; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 9F2AF21E6882; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719513; 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=JLMbFaEAxg7SkMHkD12blcTzS+nqNi4quD4mOZ301BE=; b=fjYV6BAcJrszzxZRTpQPsVqq0VRU5bfAG4lnNNIjEWP5UOkohmbLcf9xsRZG4D0CzuGn6/ pH0iyM8MUD+isNI9Pg/QjwSx0EkKzB9Pb1KuMUdFEKt+lkqHzcFg4XwnLf7YvWZrZpOD+e 6CJCS6S4ScDGCdclrcqIzSVe4NAYcUg= X-MC-Unique: u6623qW2Mu25zYL3nYjGSg-1 X-Mimecast-MFC-AGG-ID: u6623qW2Mu25zYL3nYjGSg_1772719511 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 3/6] error: Fix "to current monitor if we have one" comments Date: Thu, 5 Mar 2026 15:05:05 +0100 Message-ID: <20260305140508.218316-4-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-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.4.1 on 10.30.177.93 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719557198154100 A number of print functions are documented to print to "current monitor if we have one, else stderr". Wrong, they print to the current monitor only when it's HMP. This is the case since commit 4ad417baa43 (error: Print error_report() to stderr if using qmp). Fix the comments to say "current HMP monitor if we have one". Signed-off-by: Markus Armbruster Message-ID: <20260114124713.3308719-2-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 --- include/qapi/error.h | 3 ++- monitor/monitor.c | 2 +- util/error-report.c | 26 ++++++++++++++++---------- util/qemu-print.c | 4 ++-- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 2356b84bb3..d1d37fc656 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -64,7 +64,8 @@ * * =3D Reporting and destroying errors =3D * - * Report an error to the current monitor if we have one, else stderr: + * Report an error to the current HMP monitor if we have one, else + * stderr: * error_report_err(err); * This frees the error object. * diff --git a/monitor/monitor.c b/monitor/monitor.c index 1273eb7260..c42d9fad58 100644 --- a/monitor/monitor.c +++ b/monitor/monitor.c @@ -269,7 +269,7 @@ void monitor_printc(Monitor *mon, int c) } =20 /* - * Print to current monitor if we have one, else to stderr. + * Print to current HMP monitor if we have one, else to stderr. */ int error_vprintf(const char *fmt, va_list ap) { diff --git a/util/error-report.c b/util/error-report.c index d6b7448183..ee8c5f3db7 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -136,7 +136,8 @@ void loc_set_file(const char *fname, int lno) } =20 /* - * Print current location to current monitor if we have one, else to stder= r. + * Print current location to current HMP monitor if we have one, else + * to stderr. */ static void print_loc(void) { @@ -176,7 +177,8 @@ char *real_time_iso8601(void) } =20 /* - * Print a message to current monitor if we have one, else to stderr. + * Print a message to current HMP monitor if we have one, else to + * stderr. * @report_type is the type of message: error, warning or informational. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. @@ -216,7 +218,8 @@ static void vreport(report_type type, const char *fmt, = va_list ap) } =20 /* - * Print an error message to current monitor if we have one, else to stder= r. + * Print an error message to current HMP monitor if we have one, else + * to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -228,7 +231,8 @@ void error_vreport(const char *fmt, va_list ap) } =20 /* - * Print a warning message to current monitor if we have one, else to stde= rr. + * Print a warning message to current HMP monitor if we have one, else + * to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -239,8 +243,8 @@ void warn_vreport(const char *fmt, va_list ap) } =20 /* - * Print an information message to current monitor if we have one, else to - * stderr. + * Print an information message to current HMP monitor if we have one, + * else to stderr. * Format arguments like vsprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -251,7 +255,8 @@ void info_vreport(const char *fmt, va_list ap) } =20 /* - * Print an error message to current monitor if we have one, else to stder= r. + * Print an error message to current HMP monitor if we have one, else + * to stderr. * Format arguments like sprintf(). The resulting message should be * a single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -267,7 +272,8 @@ void error_report(const char *fmt, ...) } =20 /* - * Print a warning message to current monitor if we have one, else to stde= rr. + * Print a warning message to current HMP monitor if we have one, else + * to stderr. * Format arguments like sprintf(). The resulting message should be a * single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. @@ -282,8 +288,8 @@ void warn_report(const char *fmt, ...) } =20 /* - * Print an information message to current monitor if we have one, else to - * stderr. + * Print an information message to current HMP monitor if we have one, + * else to stderr. * Format arguments like sprintf(). The resulting message should be a * single phrase, with no newline or trailing punctuation. * Prepend the current location and append a newline. diff --git a/util/qemu-print.c b/util/qemu-print.c index 69ba612f56..4a30cd1a8e 100644 --- a/util/qemu-print.c +++ b/util/qemu-print.c @@ -16,7 +16,7 @@ =20 /* * Print like vprintf(). - * Print to current monitor if we have one, else to stdout. + * Print to current HMP monitor if we have one, else to stdout. */ int qemu_vprintf(const char *fmt, va_list ap) { @@ -29,7 +29,7 @@ int qemu_vprintf(const char *fmt, va_list ap) =20 /* * Print like printf(). - * Print to current monitor if we have one, else to stdout. + * Print to current HMP monitor if we have one, else to stdout. */ int qemu_printf(const char *fmt, ...) { --=20 2.53.0 From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719579; cv=none; d=zohomail.com; s=zohoarc; b=dILA0h/xFc2gtnK6u7UfCUuFfjB4aZ1sr3qOjnxTDWmSxOWEhiPCBGy5a9MKvXoHmtsimCSRlpM5n58ZYkvoe9QBvlZKT4ZENvTjYq+FHH2LynObxX4s16VYRNbXP+UHtiFBEib4rYqovQPHvEXlTwjW/9i3HIxwzr2ctBWdTpo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719579; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1irJfiuTeLYmrFQgiEJV2oCPyJwcQvTBvig1YRu5fGs=; b=XJb2uMKeOP+hOXJtyNMETwDTylXJcETb2uWPzIhZe2v0PpuFJAYMVkc02uUa7WFYP46wykBVUzhuXGe3/v0EMdE6skSl32/9TxU1yDesZMeFTlK9uAtZq6uuP+fXhCBd+Tu5GmHGy3wxHzDtfbZr9gor0mXmx2gkwb4/c6TKKRo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772719579752924.8807801713377; Thu, 5 Mar 2026 06:06:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9Kf-0002Od-3z; Thu, 05 Mar 2026 09:05: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 1vy9KJ-0002MU-Vx for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:21 -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 1vy9KH-0007pc-TN for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:19 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-DK2YRkKIPLGC3egyxwViYQ-1; Thu, 05 Mar 2026 09:05:12 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 880EE180062B; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 252721958DD2; Thu, 5 Mar 2026 14:05:11 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A31F121E6883; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719515; 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=1irJfiuTeLYmrFQgiEJV2oCPyJwcQvTBvig1YRu5fGs=; b=DPePTSvpq0RqnQm53H7MUBplwyizl2LwdNAY0AVyRBmKjqclfzRiBpatKrhWT2CjpcE6jL hsHjkPDDGVyqXJq2RdRuow6BhhwEwna1bHbGFRGTNu/Z9g0mBHr8rDqXd6B4K4g+bab/rS uAgR9pkPyAR/VneCHz+U4EHNmXOPHr8= X-MC-Unique: DK2YRkKIPLGC3egyxwViYQ-1 X-Mimecast-MFC-AGG-ID: DK2YRkKIPLGC3egyxwViYQ_1772719511 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 4/6] error: Restore error_printf()'s function comment Date: Thu, 5 Mar 2026 15:05:06 +0100 Message-ID: <20260305140508.218316-5-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-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.0 on 10.30.177.12 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719581298154100 Lost in commit 397d30e9401 (qemu-error: remove dependency of stubs on monitor) many moons ago. Signed-off-by: Markus Armbruster Message-ID: <20260114124713.3308719-3-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 --- util/error-report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/error-report.c b/util/error-report.c index ee8c5f3db7..3d4e8854b4 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -29,6 +29,9 @@ bool message_with_timestamp; bool error_with_guestname; const char *error_guest_name; =20 +/* + * Print to current HMP monitor if we have one, else to stderr. + */ int error_printf(const char *fmt, ...) { va_list ap; --=20 2.53.0 From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719575; cv=none; d=zohomail.com; s=zohoarc; b=OJ4MNs4pjQFdsVAHAOWNtMU8oVIM+v1e3sN7j7Zd4gStwDoWAPnEpAxvCKl9Or3K7j44Pz47lV/k6FRSUaB3FWy/c77fEmyrmVfsZ5/rFfw5oOm4s+Fj41Ak4dJeAnGRvLvV5rVDbsh3uwVz5a+59dIsbQzGVXhYz0wSISM5Aww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719575; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XhfFN8U15NqB4Bc6DcRHQSgS6GgvH/Lw/q/0TJZP/GA=; b=hiWHgG6y/Wrxc72iOQeRQ6ilGB/dXAQ78LglVOXFrdZ/Pxu9L/y+IQ6MMGeoIPU7K1n0Ta9HliFSRSpvip1XNtlg08p9wMQ6TCbnh2joxbAzXEHjqPWOUW0CEZeFqjwsKxH2mz+zNGIXlQDTn+kajKkCUYnQyayem3hW19+gDe0= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772719575786104.35689789559524; Thu, 5 Mar 2026 06:06:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9Kg-0002PY-BC; Thu, 05 Mar 2026 09:05:42 -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 1vy9KL-0002Ma-Cl for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:21 -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 1vy9KJ-0007qa-PR for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:21 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-642-ObZrjnyJOueoy86V0dWong-1; Thu, 05 Mar 2026 09:05:15 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5BDF118005BD; Thu, 5 Mar 2026 14:05:14 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EF7C01800576; Thu, 5 Mar 2026 14:05:13 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A6D5421E6884; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719518; 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: in-reply-to:in-reply-to:references:references; bh=XhfFN8U15NqB4Bc6DcRHQSgS6GgvH/Lw/q/0TJZP/GA=; b=XQJu28lcShunCPDaIlLtBByhaTIbpfPxRW9lY7mbt3Nb6loSV1+2N4ejnEbMVQK1pM10wT IVETtW2MhlbmiQHQGt5ttVluVf7EGRf4iDP5lNZYOPNhO/d3reeqOf1Covy8yhfXf4xK1m m8HsFcjLgszsDE7W/P1ieFHY3MBEE0Y= X-MC-Unique: ObZrjnyJOueoy86V0dWong-1 X-Mimecast-MFC-AGG-ID: ObZrjnyJOueoy86V0dWong_1772719514 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Subject: [PULL 5/6] qemu-print: Document qemu_fprintf(), qemu_vfprintf() failure Date: Thu, 5 Mar 2026 15:05:07 +0100 Message-ID: <20260305140508.218316-6-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719577250154100 Content-Type: text/plain; charset="utf-8" These functions fail when @stream is null and the current monitor isn't HMP. Signed-off-by: Markus Armbruster Message-ID: <20260114124713.3308719-4-armbru@redhat.com> [Comments rewritten in review] --- util/qemu-print.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/util/qemu-print.c b/util/qemu-print.c index 4a30cd1a8e..7b9591035e 100644 --- a/util/qemu-print.c +++ b/util/qemu-print.c @@ -44,7 +44,10 @@ int qemu_printf(const char *fmt, ...) =20 /* * Print like vfprintf() - * Print to @stream if non-null, else to current monitor. + * Print to @stream if non-null, else to current HMP monitor if we + * have one, else fail without printing anything. + * Return number of characters printed on success, negative value on + * error. */ int qemu_vfprintf(FILE *stream, const char *fmt, va_list ap) { @@ -56,7 +59,10 @@ int qemu_vfprintf(FILE *stream, const char *fmt, va_list= ap) =20 /* * Print like fprintf(). - * Print to @stream if non-null, else to current monitor. + * Print to @stream if non-null, else to current HMP monitor if we + * have one, else fail without printing anything. + * Return number of characters printed on success, negative value on + * error. */ int qemu_fprintf(FILE *stream, const char *fmt, ...) { --=20 2.53.0 From nobody Sat Apr 11 21:30:26 2026 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1772719609; cv=none; d=zohomail.com; s=zohoarc; b=gMtkprzQkyeXdb+eQ5jN8BiIVol/2P/C090bvdWy5n8KJrxhJdkz80DMxB4CS1nzzaFplP993iQ3a7adka4S1+B2lFRjvkbyx6LbtiygujABt/XZifbsHQtjR3pnhtPgmJ36Ipo5j3q/nl+xb28JYZlJanIo1w84SsCK19Qljqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772719609; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8SkyZpAdoek+6/Kstn8OTn5RccsZembirL7cHTMoe2M=; b=XzgFxmjAaQTBIFQrZkCX983d4s9hxRg0QEn38jiZTuvogdS3rEilw8X6nb9hxTQlRe8RPiaYlbLJrbTbhlYONd2f55xxF7J+Uld5Gcyn+HatqUKwHog0XmRb8bxTZfQwZjYHrAml9RdSnRBC/JxSIshgURicAkA/Vbe5CLkqY1E= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772719609092717.9490911119636; Thu, 5 Mar 2026 06:06:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vy9KX-0002Nt-CN; Thu, 05 Mar 2026 09:05:33 -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 1vy9KL-0002MZ-5x for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:21 -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 1vy9KJ-0007q5-JE for qemu-devel@nongnu.org; Thu, 05 Mar 2026 09:05:20 -0500 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-8il34bQyMpOPs-jIKQVmgA-1; Thu, 05 Mar 2026 09:05:15 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9DCEF180060F; Thu, 5 Mar 2026 14:05:14 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.24]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 253A818002A6; Thu, 5 Mar 2026 14:05:14 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id AADB721E6885; Thu, 05 Mar 2026 15:05:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772719517; 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: in-reply-to:in-reply-to:references:references; bh=8SkyZpAdoek+6/Kstn8OTn5RccsZembirL7cHTMoe2M=; b=ABdh/86G5FK481Ca/4ZKyWPug7wunwGEDMSS1mga36qVXxPjKD9gXqo9eWIBwju5RgQuUj OXdRJt/fkD8JOuJpdaLfx655QZ+lqDXWbBme5BaTuLh4Of0De2Pdn2u99ap8O1LYhvqZem PNn8hSpEPw8DYgzbsHMacWESwMoJWW4= X-MC-Unique: 8il34bQyMpOPs-jIKQVmgA-1 X-Mimecast-MFC-AGG-ID: 8il34bQyMpOPs-jIKQVmgA_1772719514 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, Stefan Hajnoczi Subject: [PULL 6/6] qdev-monitor: Fix qdev ID validation regression Date: Thu, 5 Mar 2026 15:05:08 +0100 Message-ID: <20260305140508.218316-7-armbru@redhat.com> In-Reply-To: <20260305140508.218316-1-armbru@redhat.com> References: <20260305140508.218316-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.892, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.622, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development 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: 1772719610540158500 Content-Type: text/plain; charset="utf-8" User-created qdevs with ID show up at /machine/peripheral/ID. When we restricted QemOpts IDs to letters, digits, '-', '.', '_', starting with a letter in commit b560a9ab9be: (qemu-option: Reject anti-social IDs) a long time ago, this also covered qdev IDs. Looks like this: (qemu) device_add usb-mouse,id=3D/ qemu-system-x86_64: Parameter 'id' expects an identifier Identifiers consist of letters, digits, '-', '.', '_', starting with a = letter. Try "help device_add" for more information QMP, however: {"execute": "device_add", "arguments": {"driver": "usb-mouse", "id": "/= "}} {"return": {}} This creates a device with canonical path "/machine/peripheral//". That way is madness. We accidentally bypassed qdev ID validation for QMP when we cut the detour through QemuOpts in commit b30d8054642. Fix by validating IDs one layer down, in qdev_set_id(). Arguably, QOM should protect itself from QOM path components containing '/', but let's just fix the regression for now. Fixes: be93fd53723c (qdev-monitor: avoid QemuOpts in QMP device_add) Signed-off-by: Markus Armbruster Message-ID: <20260123085924.1392134-1-armbru@redhat.com> Reviewed-by: Stefan Hajnoczi --- system/qdev-monitor.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index 1ac6d9a857..5c00bbf483 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -34,6 +34,7 @@ #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qemu/help_option.h" +#include "qemu/id.h" #include "qemu/option.h" #include "qemu/qemu-print.h" #include "qemu/option_int.h" @@ -601,14 +602,17 @@ const char *qdev_set_id(DeviceState *dev, char *id, E= rror **errp) * has no parent */ if (id) { + if (!id_wellformed(id)) { + error_setg(errp, "Invalid qdev ID '%s'", id); + goto err; + } prop =3D object_property_try_add_child(qdev_get_peripheral(), id, OBJECT(dev), NULL); if (prop) { dev->id =3D id; } else { error_setg(errp, "Duplicate device ID '%s'", id); - g_free(id); - return NULL; + goto err; } } else { static int anon_count; @@ -619,6 +623,10 @@ const char *qdev_set_id(DeviceState *dev, char *id, Er= ror **errp) } =20 return prop->name; + +err: + g_free(id); + return NULL; } =20 BusState *qdev_find_default_bus(DeviceClass *dc, Error **errp) --=20 2.53.0