From nobody Sat May 30 18:35:09 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=1777981892; cv=none; d=zohomail.com; s=zohoarc; b=bInaALTlKJd196DeGg87byC3CeKSKhdqi8PFydUcHWTLS2Sy0Rqd39xGNa2E0wK8nFp2bMkpiE9VX1p022YcQJB54GECNbT/TAY4++d/XQHhT8Ca4bDrd0G5kP1JNcJscnCXJKqLiEE+npL1ph3f9yFgK8gza4YyilZEnsCOoAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777981892; 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=SvAbOhcz+g8BifOLMt0mxeaHpQAEBZipKDjwlRTHOpE=; b=KLNJB38q/jYy0iWTGbhWZUs1WId79NA4FknmE98d5vsrWIncCAggP0O7+ZSEhQ/DOSRYCn+GZ0wLgBhPkw31YR8k9oo6UWSsY6iIBjjQGeM5H4Ak5aH+TcK+tjQRzDIFBlTVEASOobE8ymx61BMDUkzNZ71Tn6xq5TycxUqajfY= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777981892306486.0147963276884; Tue, 5 May 2026 04:51:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEIa-0000JH-TE; Tue, 05 May 2026 07:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIY-0000HF-GH for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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 1wKEIV-0001Ve-MR for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 Received: from mx-prod-mc-01.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-675-Xd3rwezbO3Sdqpi_9wLotg-1; Tue, 05 May 2026 07:50:40 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B93EE195609E; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5500F30001A1; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C2D8821E6A02; Tue, 05 May 2026 13:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777981841; 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=SvAbOhcz+g8BifOLMt0mxeaHpQAEBZipKDjwlRTHOpE=; b=XL4/FJTx0iQLT07cWCHYyAeu7N5yPQo6hl/6WmfXY/QGaDjo97teF2Ax73Jx6NxpbHgUQx zhrT9vRiLbhMo/u6efuXLo2xNnG5f0TgFKli+/qKrCBOX+/KzJtjx9fiIcikDL833XFyp9 aEILUoHCRO8Sop2O5yzDgjEy9Rw600M= X-MC-Unique: Xd3rwezbO3Sdqpi_9wLotg-1 X-Mimecast-MFC-AGG-ID: Xd3rwezbO3Sdqpi_9wLotg_1777981839 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/5] hw/core: Deprecate query-kvm Date: Tue, 5 May 2026 13:50:32 +0200 Message-ID: <20260505115036.1170186-2-armbru@redhat.com> In-Reply-To: <20260505115036.1170186-1-armbru@redhat.com> References: <20260505115036.1170186-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.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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, 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_SBL_CSS=3.335, 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: 1777981893639158500 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 10de10dc23..5551bd12ad 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -149,6 +149,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.54.0 From nobody Sat May 30 18:35:09 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=1777981908; cv=none; d=zohomail.com; s=zohoarc; b=JqGbYLNe0X+o6Ykym9w6TSB8U8Atc4H4M2E+tdZ8b0vmLE1EXV3EXZw93gNW96FhM/ILd+ZQJorovBJ6qUQuXJjnRgK/pf43dr9WgQKFhBnji9ghBbeYU6bLR42AzxdRMwdqvTElBgP+z4G19cukhvPbqERS4kux4hrQb2mEJGo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777981908; 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=f1buz1HvBXbVUjkVrpfYDgQfDA+7ra88clPVwnrf1Y8=; b=d33JjUO1sgBnIYBdJcbt+XPltWoasjNDYfS0jFev/GoaKUx9h3USGWlq6+D8oRddgUcDIcon0+ZATATS+Gr/M/HRhN8g6RQfrnGOcne5QgIrpTyih0JITlLxt/2bfaQlTmSFoezzzLEhXXrb09FKrucDnKLQajVA95ras6kfZLo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777981908678358.61234077430004; Tue, 5 May 2026 04:51:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEIa-0000Ik-71; Tue, 05 May 2026 07:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIY-0000HZ-SV for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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 1wKEIV-0001Vm-OG for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 Received: from mx-prod-mc-01.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-113-SRD4hwqNP1uMbmZ10d96mg-1; Tue, 05 May 2026 07:50:40 -0400 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E2C33195608F for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6417F1800347 for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C72C421E6A03; Tue, 05 May 2026 13:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777981842; 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=f1buz1HvBXbVUjkVrpfYDgQfDA+7ra88clPVwnrf1Y8=; b=QXp7Ptpc7QOd7n82CixnZ1RuPNsf7O57CaYbpY0kd0kIXhyIw4h5WBBGiuu86jffn0bA38 V4ow22Btzeqz/N2UJFN5LVEznisqD5md+EWrZhzBCoz96MsLR+buHfNM/tIcKBxb2r7OmM NoLi6yUyEzO+H0ISmwCBKXwFxr41fSw= X-MC-Unique: SRD4hwqNP1uMbmZ10d96mg-1 X-Mimecast-MFC-AGG-ID: SRD4hwqNP1uMbmZ10d96mg_1777981840 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 2/5] error: Fix "to current monitor if we have one" comments Date: Tue, 5 May 2026 13:50:33 +0200 Message-ID: <20260505115036.1170186-3-armbru@redhat.com> In-Reply-To: <20260505115036.1170186-1-armbru@redhat.com> References: <20260505115036.1170186-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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, 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_SBL_CSS=3.335, 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: 1777981910312154100 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 [Commit a582a5784e5f (monitor: move error_vprintf back to error-report.c) lost a comment this commit fixes, restore it] --- include/qapi/error.h | 3 ++- util/error-report.c | 29 +++++++++++++++++++---------- util/qemu-print.c | 4 ++-- 3 files changed, 23 insertions(+), 13 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/util/error-report.c b/util/error-report.c index bbea49a55d..92b04915ce 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -62,6 +62,9 @@ error_printf_mon(Monitor *cur_mon, const char *fmt, ...) return ret; } =20 +/* + * Print to the current HMP monitor if we have one, else to stderr. + */ int error_vprintf(const char *fmt, va_list ap) { return error_vprintf_mon(monitor_cur(), fmt, ap); @@ -174,7 +177,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(Monitor *cur) { @@ -214,7 +218,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. @@ -270,7 +275,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. @@ -282,7 +288,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. @@ -293,8 +300,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. @@ -305,7 +312,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. @@ -321,7 +329,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. @@ -336,8 +345,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.54.0 From nobody Sat May 30 18:35:09 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=1777981913; cv=none; d=zohomail.com; s=zohoarc; b=WQBK4yupDzxbHBpkIDsiAkIAgVpEIuo+jM1NU2O3SoFr8OgnRxXDp50idwNP/ZQxKw+gsr0KwXHWmjM9D8PaX92h/9+hjsollPP3LC1TwNBxY4kYVo9HpnzvqmTAMHo9v947w6FrogmOPDN36vuVbznT0eK4JHfSHkOhEH73lzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777981913; 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=7LSBZrLVmPzfRrT5Uwma+TZ+F1UwlvVpEGqNHUhYwck=; b=gRAUZvwOxpDUH9/gN1PgHDnVMxDm5Q4+n/4ON6ZyQ1oFAErBwkx+3IbwNl8hz+i/jgUNjzWr19fLuXwSp+YWV7zMw7MHVuxTqG0U7x0AjJ1gPIv7ekSaOkc8rQgWbYdK5+k0QJML6U8t6LqZn3RgHUisyqP24iqkwtnC5u9MLZk= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777981913925339.802494037414; Tue, 5 May 2026 04:51:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEIY-0000Hb-WE; Tue, 05 May 2026 07:50:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIX-0000Gx-Bi for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:45 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIV-0001Vn-Jw for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:45 -0400 Received: from mx-prod-mc-01.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-688-Zl7bSJ7DMRed-cdA0ueV7g-1; Tue, 05 May 2026 07:50:40 -0400 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9F54F1956095 for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5E83D196B09E for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id CB38821E6A05; Tue, 05 May 2026 13:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777981842; 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=7LSBZrLVmPzfRrT5Uwma+TZ+F1UwlvVpEGqNHUhYwck=; b=SkHnFV51AO2dvnRlWq6Hn9tkHyasNeetblAveratSNuBhfErBzrwLiybEIb/Y1WVE3p6mn e11uy+Wzpp4RBXJ8dVqhSMcJOyq6I11ACyi2KN87DZVZ8iNeXX10sBKIv7AI0uJrLix8Xf +4+uWGCAwL7S55MSBXX2dPHX/haERRk= X-MC-Unique: Zl7bSJ7DMRed-cdA0ueV7g-1 X-Mimecast-MFC-AGG-ID: Zl7bSJ7DMRed-cdA0ueV7g_1777981839 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 3/5] error: Restore error_printf()'s function comment Date: Tue, 5 May 2026 13:50:34 +0200 Message-ID: <20260505115036.1170186-4-armbru@redhat.com> In-Reply-To: <20260505115036.1170186-1-armbru@redhat.com> References: <20260505115036.1170186-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=lists1p.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: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, 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_SBL_CSS=3.335, 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: 1777981916122154100 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 [Trivial conflict with commit a582a5784e5f (monitor: move error_vprintf back to error-report.c) resolved] --- util/error-report.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/error-report.c b/util/error-report.c index 92b04915ce..f832ad9b6b 100644 --- a/util/error-report.c +++ b/util/error-report.c @@ -70,6 +70,9 @@ int error_vprintf(const char *fmt, va_list ap) return error_vprintf_mon(monitor_cur(), fmt, ap); } =20 +/* + * Print to the current HMP monitor if we have one, else to stderr. + */ int error_printf(const char *fmt, ...) { va_list ap; --=20 2.54.0 From nobody Sat May 30 18:35:09 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=1777981891; cv=none; d=zohomail.com; s=zohoarc; b=hjla1hKlg/Cp7AMFLflnKBW/piyUt/Gept1bvvr69meMIbOuYZzpEOkLux8Ze+kHPXpu26iey/XBP6NacIQhdzulVnBc6uJdgPO6yZgDWo1b2zCCJFfvkS6RihA+SbswWfgNYwb3EszOWCwVLO2i+y3spbjK7viwIYRf9AWze2k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777981891; 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=qMXQyvnHEAG9TIhUUaRQwYWOhE0K0bK8wtDC9fUTs7k=; b=MPe/yYl74H0bxfUGs3H2SsxEH692lY7nlViUrC0sMkyda7u9PsrFO3k4Hhom/CTt4VrSyWTSYUdBI/eXlvUiMuN/SIBl4hgqpNB2IHcz0uik/EyOOpTd+i5DMP/iWZNRUTZB6vJDtHPKnWdi56oXfUY1v8neu8/4qnVgaLUaP1U= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777981891732570.9482842722265; Tue, 5 May 2026 04:51:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEId-0000Ka-14; Tue, 05 May 2026 07:50:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIY-0000HG-In for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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 1wKEIV-0001Vl-OD for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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-197-vgSwlRGAOm2NoAAoT96D4Q-1; Tue, 05 May 2026 07:50:40 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 8C76618003FC for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4641A30001BE for ; Tue, 5 May 2026 11:50:39 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id CF17121E6A07; Tue, 05 May 2026 13:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777981842; 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=qMXQyvnHEAG9TIhUUaRQwYWOhE0K0bK8wtDC9fUTs7k=; b=AyUq2gR5o6hfat+FngbH7VqsZK8T8QyHwkXVyxhSbgm6mzMmmYLRmz+zWP6yBepO0eoxlm KJ2Vwa6Atkv8UMAM4zQqTmkt1tPyDJ3jq1bI6LVi2+afZOiJHsgndwSE3m+zxNwtlaOyhM 8CAs5QQJJYQUgUmOCSulqmcYsXPh7W4= X-MC-Unique: vgSwlRGAOm2NoAAoT96D4Q-1 X-Mimecast-MFC-AGG-ID: vgSwlRGAOm2NoAAoT96D4Q_1777981839 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com Subject: [PULL 4/5] qemu-print: Document qemu_fprintf(), qemu_vfprintf() failure Date: Tue, 5 May 2026 13:50:35 +0200 Message-ID: <20260505115036.1170186-5-armbru@redhat.com> In-Reply-To: <20260505115036.1170186-1-armbru@redhat.com> References: <20260505115036.1170186-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.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=lists1p.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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, 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, SPF_HELO_PASS=-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: 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: 1777981894321154100 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.54.0 From nobody Sat May 30 18:35:09 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=1777981913; cv=none; d=zohomail.com; s=zohoarc; b=GudJNwuuaYkEGhQjSxc1zCDzmbllHO0iRoIGKCSbGgwa6h8oG/O41Kr+9l6nnLPx+KH6Cx8Jto6TKMuQ/HE4LSVMEWn00Vnhi+JdA7nJI7b01UCZ1Yag3eBi0fcrJ8sGyUSnzP/GP7NRHjp6fER3p6T6Smp1AM2jsL0lMokUQP4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777981913; 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=N/oHrMS56nr7W5Cx+u6wW9V0/vRG1vDsmqoyIWxV7Iw=; b=X01qqxKaen/WrdVrMQSb4sYOc2yGoV0ku8UDn5AyO+Ss6deK54nw2WWRFm/fhybQUJBeJWxvww5rU3z1pWGC9vrIg2EoNw6Vm2k0D/ZAnWcaDAxrwdNrtvRscbmDx0sp5ahDNNtjGosoWQ1441vRIeHgrvNd3CuH7zc7itA+ySc= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777981913217577.3731080609546; Tue, 5 May 2026 04:51:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wKEIa-0000Is-MI; Tue, 05 May 2026 07:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wKEIY-0000Hc-TU for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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 1wKEIX-0001Xz-CT for qemu-devel@nongnu.org; Tue, 05 May 2026 07:50:46 -0400 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-59-taKHpEwZNNCnSiQ5iaP1qA-1; Tue, 05 May 2026 07:50:43 -0400 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 57F78180034C for ; Tue, 5 May 2026 11:50:42 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 183391800348 for ; Tue, 5 May 2026 11:50:42 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id D2F8D21E6A08; Tue, 05 May 2026 13:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777981844; 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=N/oHrMS56nr7W5Cx+u6wW9V0/vRG1vDsmqoyIWxV7Iw=; b=CsmqPWcJQSfM8VB4TAyA/phXQV4kv7FZ09qlDo35Hx9XBb8A+ABxXLNAfASBgT0mJaZbPQ mDI5/uTAAJbD1i8ENcwTNp+wO1GXNyn2syKHhr/e3h51rnPM4qCVBVjuV4ZVvnaX3FbQ+I LWtJ0RfJUQXQBte3IeKDmXQf3bV00FM= X-MC-Unique: taKHpEwZNNCnSiQ5iaP1qA-1 X-Mimecast-MFC-AGG-ID: taKHpEwZNNCnSiQ5iaP1qA_1777981842 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com Subject: [PULL 5/5] qdev-monitor: Fix qdev ID validation regression Date: Tue, 5 May 2026 13:50:36 +0200 Message-ID: <20260505115036.1170186-6-armbru@redhat.com> In-Reply-To: <20260505115036.1170186-1-armbru@redhat.com> References: <20260505115036.1170186-1-armbru@redhat.com> MIME-Version: 1.0 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=lists1p.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: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.443, 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, SPF_HELO_PASS=-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: 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: 1777981913399158500 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.54.0