From nobody Sun Nov 29 02:11:42 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=1795767827; cv=none; d=zohomail.com; s=zohoarc; b=imN4mBHtCxkd8htZkq0DdleSfn5eZSbGjgI5jHfbp4hsdQmYTxGpscGcILDrFSI2YF0Enk/y39rVKSoQYSwBKVG/TZJ44nfUyfFiIWLO6aF+5K/Y9Mb7xXanidF23nLyX7zaegBHre1nhBy/tFK15kcOeJuvLsgTKtdiL+ilQ0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795767827; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xbJhqupbYtc0B6G5OeRWpJyA0aXTE49uXc5itHzBvIY=; b=aJlHNac0GYYWqx0HRn/UywdmhYxO3zfwoDEG5Zb4+7NmeBOqNmMroS4vTbqc+5W29JZ1Wi+RDbk9iqD0jPzY9DdbI0RN2zHrCWD8W/DRyYzHzUQB5oLXgx3bjLwTN5denl+YXRLkxtDbMUb6o/HsWIR6j6DwBGv8Ag75nBxkOOM= 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 1795767827767594.8228075518795; Fri, 27 Nov 2026 00:23:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWrEA-0005YY-Sa; Fri, 27 Nov 2026 03:22:43 -0500 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 1xWrE7-0005X0-EM for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:39 -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 1xWrE6-0004Th-1N for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:39 -0500 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-452-G_YjrKR-PGOsc2kwEMTNog-1; Fri, 27 Nov 2026 08:22:33 +0000 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B86081955E97; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4A28C1956042; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A4B6E21E692D; Fri, 27 Nov 2026 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795767756; 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=xbJhqupbYtc0B6G5OeRWpJyA0aXTE49uXc5itHzBvIY=; b=cf+1+7C9EswbuO1nvwEcj6hpMhFD8moWMqgG6ZQK7Zei9T/iDuL2c2F/ow2EnNGSOuLzf+ XqnEXz+nDE+BxGZdH7U084Xhu7cOuQLux4iuVeE+dnDeQV09MWc5Z15L6Svg0aIyMYA1Kf Kk0uFRhF3dBlXdlFTc5qjjYlTw7vIkI= X-MC-Unique: G_YjrKR-PGOsc2kwEMTNog-1 X-Mimecast-MFC-AGG-ID: G_YjrKR-PGOsc2kwEMTNog_1795767751 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PULL 1/4] tests/qmp-cmd-test: Simplify @qapi-type test Date: Fri, 27 Nov 2026 09:22:25 +0100 Message-ID: <20261127082228.3907768-2-armbru@redhat.com> In-Reply-To: <20261127082228.3907768-1-armbru@redhat.com> References: <20261127082228.3907768-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=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: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=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: 1795767830039158500 test_qapi_type() checks that if @qapi-type is present, it resolves in output of query-qmp-schema. Absent @qapi-type is reported with g_test_message except for child and link properties. The exception became useless when we implemented @qapi-type for child and link properties. Drop it. Fixes: 6955264d5821 ("qom: Convert child and link properties to QAPI-aware = registration") Signed-off-by: Markus Armbruster Message-ID: <20261117103629.2612744-1-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 --- tests/qtest/qmp-cmd-test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd-test.c index acb7b0dd6a9..5138582bb3f 100644 --- a/tests/qtest/qmp-cmd-test.c +++ b/tests/qtest/qmp-cmd-test.c @@ -384,8 +384,7 @@ static void test_qapi_type(void) =20 if (qapi_type) { g_assert_nonnull(qmp_schema_lookup(&schema, qapi_type)); - } else if (!g_str_has_prefix(ty, "child<") && - !g_str_has_prefix(ty, "link<")) { + } else { g_test_message("%s.%s %s has no associated qapi-type", name, propname, ty); } --=20 2.55.0 From nobody Sun Nov 29 02:11:42 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=1795767812; cv=none; d=zohomail.com; s=zohoarc; b=P6w/k9pRKtLwdIFC9D54iBnBy2jhtYaubVF7JXGgQbL9/4oeuXwmJvePR6tX8GhcekDJmrZTLDeIa61NmJ7IWAjzK80uELhFVHkzO0VG1ht+oCm3FZ4ufevhrpV5yKdJfhnTMERDCIgowf119UXgx+khOLsOs7aw4uCpV+R/J44= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795767812; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jG1aP347qO/KLAwgo5lAIpdbHTXW6q8QszWbXW7v4Jk=; b=GuGmFxTqrfZiTnDhPYHPZmvckoYKTJMOBxSXKSmU2pZWQUyKDD2kQcTWR87YGZ1FxWwFb9Xlo4WwviQ7MJMMNEhL0DwiUdNccXSX6ZixI1WiW7DGbl6gAfHPUr4OkZNp3mSlODuMDD9for4SQbsMMGLdCkVC2E6eocpCuVzG9j0= 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 1795767812780126.1533450134425; Fri, 27 Nov 2026 00:23:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWrE9-0005XB-4E; Fri, 27 Nov 2026 03:22:41 -0500 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 1xWrE6-0005VU-5J for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:38 -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 1xWrE4-0004TS-Ar for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:37 -0500 Received: from mx-prod-mc-05.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-160-paAwE8d2PbWbcp-dPvDwcQ-1; Fri, 27 Nov 2026 08:22:32 +0000 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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9E12B19560AA; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3F4561801A70; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A929A21E6880; Fri, 27 Nov 2026 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795767756; 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=jG1aP347qO/KLAwgo5lAIpdbHTXW6q8QszWbXW7v4Jk=; b=MSQRmD9i7dtSsIv0Dezl966A16uJijflyZb6WgAAVE8kLXYsxBvDHFki/M3MEqxeM2wr/v qZDP6iYwwnqbCSh5VColKhtGOQJazCX51JcrZPpniORKk72Z6jLB+IU8ShXP8KhoG8HH8B gfdG+wr1Pb2PMQpez3DQj8W606pPwmk= X-MC-Unique: paAwE8d2PbWbcp-dPvDwcQ-1 X-Mimecast-MFC-AGG-ID: paAwE8d2PbWbcp-dPvDwcQ_1795767751 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , John Snow Subject: [PULL 2/4] python/qemu: Don't choke on unknown members in QMP replies Date: Fri, 27 Nov 2026 09:22:26 +0100 Message-ID: <20261127082228.3907768-3-armbru@redhat.com> In-Reply-To: <20261127082228.3907768-1-armbru@redhat.com> References: <20261127082228.3907768-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.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=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: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=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: 1795767814153158500 The recent addition of @qapi-type to ObjectPropertyInfo and ObjectPropertyValue broke the corresponding classes in qemu/utils/qom_common. Reproducer: $ bld/run qom-list -s qmp-socket /chardevs Traceback (most recent call last): File "/work/armbru/qemu/bld/pyvenv/bin/qom-list", line 8, in sys.exit(QOMList.entry_point()) ~~~~~~~~~~~~~~~~~~~^^ File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 230, i= n entry_point return cls.command_runner(args) ~~~~~~~~~~~~~~~~~~^^^^^^ File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 215, i= n command_runner return cmd.run() ~~~~~~~^^ File "/work/armbru/qemu/python/qemu/utils/qom.py", line 179, in run rsp =3D self.qom_list(self.path) File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 192, i= n qom_list return [ObjectPropertyInfo.make(x) for x in rsp] ~~~~~~~~~~~~~~~~~~~~~~~^^^ File "/work/armbru/qemu/python/qemu/utils/qom_common.py", line 52, in= make assert value.keys() <=3D {'name', 'type', 'description', 'default-v= alue'} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^ AssertionError This asserts "no members we don't know". There are two more like it. Adding @qapi-type broke them. docs/devel/qapi-code-gen.rst section "Compatibility considerations" stipulates that "clients are expected to ignore [members] they don't know." Delete / relax these assertions. Fixes: 0eee31cf1085 ("qapi/qom: add qapi-type to qom-list, qom-list-propert= ies, qom-list-get") Fixes: c750c02891a8 ("python/qmp: Add qom script rewrites") Signed-off-by: Markus Armbruster Message-ID: <20261118182005.1066151-1-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: John Snow --- python/qemu/utils/qom_common.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/qemu/utils/qom_common.py b/python/qemu/utils/qom_common= .py index ab21a4d364a..e5bae1c7421 100644 --- a/python/qemu/utils/qom_common.py +++ b/python/qemu/utils/qom_common.py @@ -49,7 +49,6 @@ def make(cls, value: Dict[str, Any]) -> 'ObjectPropertyIn= fo': Build an ObjectPropertyInfo from a Dict with an unknown shape. """ assert value.keys() >=3D {'name', 'type'} - assert value.keys() <=3D {'name', 'type', 'description', 'default-= value'} return cls(value['name'], value['type'], value.get('description'), value.get('default-value')) @@ -80,7 +79,6 @@ def make(cls, value: Dict[str, Any]) -> 'ObjectPropertyVa= lue': Build an ObjectPropertyValue from a Dict with an unknown shape. """ assert value.keys() >=3D {'name', 'type'} - assert value.keys() <=3D {'name', 'type', 'value'} return cls(value['name'], value['type'], value.get('value')) =20 @property @@ -103,7 +101,7 @@ def make(cls, value: Dict[str, Any]) -> 'ObjectProperti= esValues': """ Build an ObjectPropertiesValues from a Dict with an unknown shape. """ - assert value.keys() =3D=3D {'properties'} + assert value.keys() <=3D {'properties'} props =3D [ObjectPropertyValue(item['name'], item['type'], item.get('value')) --=20 2.55.0 From nobody Sun Nov 29 02:11:42 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=1795767831; cv=none; d=zohomail.com; s=zohoarc; b=S7o+ABtek9eYScL/JpDQ1QiFdDq/YSMvc48SmCRwpkXTFg80HjEFc7t0UqMj4Hbp6BG7A2DQZhVYHWM3xEHNLdagDj+JLG8cJD/C6/2Klsoo16iMGK/YrmhMG+a6MTisQPBfQn7E3KW1NS4JCO+osgkyqycrO23NsVpLFvok/F4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795767831; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=gErRrJlp0rTY8ZmiuzGidM0jcDpG4fMxD39hB5y/Ef0=; b=XG7inx6jlW4B0ONDuVExZ/VN7oS+fHuudWJy1xGJ1Uk4Avg07Q+zGKG9vbpLEsKWIUNb0yCcS/4Yb7/8JFTNjrquOZyMwumpfMs/vhHtFFk1tFCHVfIRJ4Bz2jTdzyA2WsK0Z6L0+IKUtNZn8ZlU8+BKgOJ5YT3DIyFqFglr7m0= 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 1795767831660792.527950812379; Fri, 27 Nov 2026 00:23:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWrEA-0005YQ-Mq; Fri, 27 Nov 2026 03:22:42 -0500 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 1xWrE8-0005XI-PL for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:41 -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 1xWrE7-0004UG-0d for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:40 -0500 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-452-RKTs7QpON7mt-LK3khdUqQ-1; Fri, 27 Nov 2026 08:22:33 +0000 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 985E21956064; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3EAB0180197D; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id AD20721E6882; Fri, 27 Nov 2026 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795767758; 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=gErRrJlp0rTY8ZmiuzGidM0jcDpG4fMxD39hB5y/Ef0=; b=K554ngffVIEDsotPCOlJirXLXAgr1UQpFO63K8OeVzngtENoxOsoxpul5Q6rJCxcSFqnNn iLhAKR7V+KZ4aVg3Ykdlg84twYTfvml2/raQXeUwLC1UpKrhCk2UrRAem47s6XBxmYH2tJ B5CJi/xdZr6iWuaMiDQBLE+x+KFagpg= X-MC-Unique: RKTs7QpON7mt-LK3khdUqQ-1 X-Mimecast-MFC-AGG-ID: RKTs7QpON7mt-LK3khdUqQ_1795767751 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, Peter Krempa , Eric Blake Subject: [PULL 3/4] file-posix: Fix loss of QAPI feature 'dynamic-auto-read-only' Date: Fri, 27 Nov 2026 09:22:27 +0100 Message-ID: <20261127082228.3907768-4-armbru@redhat.com> In-Reply-To: <20261127082228.3907768-1-armbru@redhat.com> References: <20261127082228.3907768-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=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: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=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: 1795767834018158500 Content-Type: text/plain; charset="utf-8" Recent commit 691094b7091b added a variant member to BlockdevOptions branch 'host-device' by changing the branch type to new struct type BlockdevOptionsHostDevice that has the old branch type BlockdevOptionsFile as base. This is a perfectly reasonable thing to do. However, since a type only inherits its base's members, and not its features or conditions, this lost BlockdevOptionsFile's feature 'dynamic-auto-read-only'. Considering we are in deep freeze, fix the regression the stupidest and safest way possible: copy the feature from BlockdevOptionsFile to BlockdevOptionsHostDevice. Reported-by: Peter Krempa Fixes: 691094b7091b ("file-posix: Add 'accept-read-only-device' option") Signed-off-by: Markus Armbruster Message-ID: <20261124152218.2562390-1-armbru@redhat.com> Reviewed-by: Eric Blake --- qapi/block-core.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 23c5787d99b..7aa4fa2df93 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3403,11 +3403,23 @@ # writable. If it is true, this check is skipped. (since: 11.2, # default: false) # +# Features: +# +# @dynamic-auto-read-only: If present, enabled auto-read-only means +# that the driver will open the image read-only at first, +# dynamically reopen the image file read-write when the first +# writer is attached to the node and reopen read-only when the +# last writer is detached. This allows giving QEMU write +# permissions only on demand when an operation actually needs +# write access. +# # Since: 11.2 ## { 'struct': 'BlockdevOptionsHostDevice', 'base': 'BlockdevOptionsFile', - 'data': { '*accept-read-only-device': 'bool' } } + 'data': { '*accept-read-only-device': 'bool' }, + 'features': [ { 'name': 'dynamic-auto-read-only', + 'if': 'CONFIG_POSIX' } ] } =20 ## # @BlockdevOptionsNull: --=20 2.55.0 From nobody Sun Nov 29 02:11:42 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=1795767796; cv=none; d=zohomail.com; s=zohoarc; b=N2xv9o6bniQ3g3CCSAY2zJ7b1uYBRO9YwjDVVvMlIWlqwh3nZOtXOSeeKfrEvoQ1pRcaXp/aj44ZFh5z4XM6TWPiceNXjDfmYGux4+kxN75mF7tlMl+hwWNGjYlOg52X8m/DvtrBQz4T6YILpBhR9UitfIJKcGo2UjOz/+kz9iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795767796; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vJm9V54BijzQkxuxWquReWmmnBcBh3pyYWXIcWRwj1Y=; b=cRey29XZds4OAarRQRopn7f5fIFHkDK7OzrUmZNz987bKvc9iNCFhly7nOcOyJ422ODS095zlJvbNljUCpTalKub1p/iRO7KSBcK1wTvOZgqWFIkGC7yymhRUAMpzgdEGlLUj2fHnp+CtAb/cUSIU/wL4i6GSIAsho41UUW/n7Q= 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 1795767796707972.9056710879805; Fri, 27 Nov 2026 00:23:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWrE9-0005YA-R5; Fri, 27 Nov 2026 03:22:41 -0500 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 1xWrE8-0005XC-M5 for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:40 -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 1xWrE6-0004Tp-55 for qemu-devel@nongnu.org; Fri, 27 Nov 2026 03:22:40 -0500 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-160-ZBZPkPDRPC-SMSgXHNx0tQ-1; Fri, 27 Nov 2026 08:22:32 +0000 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B1B3B1955F10; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.44.22.2]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 566A21956049; Fri, 27 Nov 2026 08:22:31 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id B14FF21E6883; Fri, 27 Nov 2026 09:22:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795767758; 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=vJm9V54BijzQkxuxWquReWmmnBcBh3pyYWXIcWRwj1Y=; b=Se0hsF9SyZWXnt5QI/jMXdql46RN5EpjTRsEQDjfnbXGCj6GM9eTWfaNIM5vufn/+r/fo9 JPrPjr4bDc5YYpBahbYGPEO1JaV2G+AgJWDvw6NhtWwCdq8FjieH9kqoajtDs7lgdCTiZr Ve2Gsq6k37GGXnY7jdPSSK7JnUyQZJg= X-MC-Unique: ZBZPkPDRPC-SMSgXHNx0tQ-1 X-Mimecast-MFC-AGG-ID: ZBZPkPDRPC-SMSgXHNx0tQ_1795767751 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Ani Sinha Subject: [PULL 4/4] qom: Really add 'confidential-guest-reset' feature Date: Fri, 27 Nov 2026 09:22:28 +0100 Message-ID: <20261127082228.3907768-5-armbru@redhat.com> In-Reply-To: <20261127082228.3907768-1-armbru@redhat.com> References: <20261127082228.3907768-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=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: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=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: 1795767798193158500 Commit a9b328611143 added feature 'confidential-guest-reset' to SevCommonProperties and to TdxGuestProperties. The commit message states the intent as "control plane should be able to detect if the hypervisor supports x86 confidential guest resets." Management applications ("control plane") would check whether the relevant argument type of QMP command object-add has the feature. The relevant types are SevGuestProperties, SevSnpGuestProperties, and TdxGuestProperties. Only TdxGuestProperties has the feature. The other two have base type SevCommonProperties, but a type only inherits its base's members, and not its features or conditions. Fix by moving the feature from SevCommonProperties to SevGuestProperties and SevSnpGuestProperties. Fixes: a9b328611143 ("qom: add 'confidential-guest-reset' property for x86 = confidential vms") Signed-off-by: Markus Armbruster Message-ID: <20261124154310.2569390-2-armbru@redhat.com> Reviewed-by: Daniel P. Berrang=C3=A9 Acked-by: Ani Sinha --- qapi/qom.json | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index 32a59269361..b8237a94be0 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -1004,11 +1004,6 @@ # only supported on SEV-ES and SEV-SNP guests # (default: false) (since 11.1) # -# Features: -# -# @confidential-guest-reset: If present, the hypervisor supports -# confidential guest resets (since 11.0). -# # Since: 9.1 ## { 'struct': 'SevCommonProperties', @@ -1016,8 +1011,7 @@ '*cbitpos': 'uint32', 'reduced-phys-bits': 'uint32', '*kernel-hashes': 'bool', - '*debug-swap': 'bool' }, - 'features': ['confidential-guest-reset']} + '*debug-swap': 'bool' } } =20 ## # @SevGuestProperties: @@ -1042,6 +1036,11 @@ # that require it. If set to 'off', QEMU will require # KVM_SEV_INIT2 unconditionally. (default: off) (since 9.1) # +# Features: +# +# @confidential-guest-reset: If present, the hypervisor supports +# confidential guest resets (since 11.0). +# # Since: 2.12 ## { 'struct': 'SevGuestProperties', @@ -1050,7 +1049,8 @@ '*session-file': 'str', '*policy': 'uint32', '*handle': 'uint32', - '*legacy-vm-type': 'OnOffAuto' } } + '*legacy-vm-type': 'OnOffAuto' }, + 'features': [ 'confidential-guest-reset' ] } =20 ## # @SevSnpGuestProperties: @@ -1101,6 +1101,11 @@ # @tsc-frequency: set secure TSC frequency. Only valid if Secure TSC # is enabled (default: zero) (since 11.1) # +# Features: +# +# @confidential-guest-reset: If present, the hypervisor supports +# confidential guest resets (since 11.0). +# # Since: 9.1 ## { 'struct': 'SevSnpGuestProperties', @@ -1114,7 +1119,8 @@ '*host-data': 'str', '*vcek-disabled': 'bool', '*secure-tsc': 'bool', - '*tsc-frequency': 'uint32' } } + '*tsc-frequency': 'uint32' }, + 'features': [ 'confidential-guest-reset' ] } =20 ## # @TdxGuestProperties: --=20 2.55.0