From nobody Tue Sep 9 03:20:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1746622143; cv=none; d=zohomail.com; s=zohoarc; b=BCs2mBIextNWN+3xHKpTlG4udb6Fk7Vrd4jAx2am2F9zFbiRpkz+Ys5FfgDHL/0kIFZ7cFPoANhrn7OqV/eZxjSuojwQz4sk6uDzcRnO7M2jN8enigVXZtGsBO4N+rvL+sM+PrNnL9B/0VRvLhFijjfrSsN6+t4Z2+FFiTaoR2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746622143; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:Subject:Subject:To:To:Message-Id:Cc; bh=r/4183gomsS/j2LDiCJ/F25w9QnEeN5RozW/3kmlF2w=; b=BkhIRUc2HBnsg8lTiwH6bSmXtnVNvSXDH6dnZjcsq+R1YAWXZOfKxdzKoPMkBXdOzdhrqpnla/IxoShQTtWRswXUJqaQ76x8uUOZwDmHynj24fzVvwcs5QrUO2z8khKqmhbq8OgxRbLEtpX3u4YUAHrLhYOFctgh24q7sW9s1eM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1746622143452247.93442317786844; Wed, 7 May 2025 05:49:03 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 643E414E1; Wed, 7 May 2025 08:49:02 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A1C8C1506; Wed, 7 May 2025 08:48:28 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3ABF614DF; Wed, 7 May 2025 08:48:26 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8E4CD14C4 for ; Wed, 7 May 2025 08:48:25 -0400 (EDT) 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-218-yxF8t5elOXyjLgdlJMPtCg-1; Wed, 07 May 2025 08:48:24 -0400 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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 966721846ED8 for ; Wed, 7 May 2025 12:48:18 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E24551800ECB for ; Wed, 7 May 2025 12:48:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1746622105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hO42EyDhH0kwha5McOqoWM/41Sgghew9FBk1rEJwIHU=; b=dWMICFojwPIczJ3E/htTLBwMJijDUxA6x/nmirxYKfpSkJJKJet/245hhSaQio1NWhgkNh KgsjLzUUsu1fnWIUO9UoiZcBejjJZ8jlhy0f5HKId4mxBPRfp7HgpKf1xo5AHwg2H0N/23 P7l40JgbR4APqaSvnaZgeqOk1mDtoyE= X-MC-Unique: yxF8t5elOXyjLgdlJMPtCg-1 X-Mimecast-MFC-AGG-ID: yxF8t5elOXyjLgdlJMPtCg_1746622103 To: devel@lists.libvirt.org Subject: [PATCH] qemu_capabilities: Fetch caps for virtio-mem-ccw too Date: Wed, 7 May 2025 14:46:16 +0200 Message-ID: <9697279cc7df917911f603787f9c2dbe69ec4b4b.1746621976.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ss9Ogjn-psxwWu6TXbejyectlEvuH8vwU-Qiq7zt2Kg_1746622103 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: Q2DZIWEYNBLEPBAOKR6XGG2PIMEXJCJJ X-Message-ID-Hash: Q2DZIWEYNBLEPBAOKR6XGG2PIMEXJCJJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1746622145490116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik While with upstream QEMU it's impossible to have virtio-mem-ccw and not have virtio-mem-pci, in RHEL the QEMU's build system is patched to make that possible. But this breaks our assumption when fetching capabilities. Well, just do what we are already doing in this situation (e.g. "virtio-blk-pci"/"virtio-blk-ccw" & virQEMUCapsDevicePropsVirtioBlk, or "virtio-scsi-pci"/"virtio-net-ccw" & virQEMUCapsDevicePropsVirtioSCSI): fetch the same set of props for both devices. Resolves: https://issues.redhat.com/browse/RHEL-87528 Resolves: https://issues.redhat.com/browse/RHEL-87532 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 + .../caps_10.0.0_s390x.replies | 206 +++++++++++++++--- 2 files changed, 183 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index a804335c85..1a4f28facf 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1716,6 +1716,9 @@ static virQEMUCapsDeviceTypeProps virQEMUCapsDevicePr= ops[] =3D { { "virtio-mem-pci", virQEMUCapsDevicePropsVirtioMemPCI, G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioMemPCI), QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI }, + { "virtio-mem-ccw", virQEMUCapsDevicePropsVirtioMemPCI, + G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioMemPCI), + QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW }, { "virtio-iommu-pci", virQEMUCapsDevicePropsVirtioIOMMU, G_N_ELEMENTS(virQEMUCapsDevicePropsVirtioIOMMU), QEMU_CAPS_DEVICE_VIRTIO_IOMMU_PCI }, diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.replies b/tests/q= emucapabilitiesdata/caps_10.0.0_s390x.replies index d941bc41c7..1fe6526a3f 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_s390x.replies +++ b/tests/qemucapabilitiesdata/caps_10.0.0_s390x.replies @@ -29792,12 +29792,166 @@ "id": "libvirt-29" } =20 +{ + "execute": "device-list-properties", + "arguments": { + "typename": "virtio-mem-ccw" + }, + "id": "libvirt-30" +} + +{ + "return": [ + { + "name": "dev_id", + "description": "Read-only identifier of an I/O device in the channel= subsystem, example: fe.1.23ab", + "type": "str" + }, + { + "name": "devno", + "description": "Identifier of an I/O device in the channel subsystem= , example: fe.1.23ab", + "type": "str" + }, + { + "name": "subch_id", + "description": "Read-only identifier of an I/O device in the channel= subsystem, example: fe.1.23ab", + "type": "str" + }, + { + "default-value": 2, + "name": "max_revision", + "type": "uint32" + }, + { + "default-value": true, + "name": "ioeventfd", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "memaddr", + "type": "uint64" + }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "iommu_platform", + "description": "on/off", + "type": "bool" + }, + { + "name": "memdev", + "type": "link" + }, + { + "default-value": true, + "name": "event_idx", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "x-early-migration", + "description": "on/off", + "type": "bool" + }, + { + "default-value": 0, + "name": "node", + "type": "uint32" + }, + { + "name": "requested-size", + "type": "size" + }, + { + "default-value": true, + "name": "any_layout", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "x-disable-legacy-check", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "queue_reset", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "notify_on_empty", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "packed", + "description": "on/off", + "type": "bool" + }, + { + "name": "block-size", + "type": "size" + }, + { + "default-value": false, + "name": "prealloc", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "use-started", + "description": "on/off", + "type": "bool" + }, + { + "default-value": false, + "name": "in_order", + "description": "on/off", + "type": "bool" + }, + { + "name": "size", + "type": "size" + }, + { + "default-value": true, + "name": "use-disabled-flag", + "description": "on/off", + "type": "bool" + }, + { + "default-value": true, + "name": "dynamic-memslots", + "description": "on/off", + "type": "bool" + }, + { + "name": "virtio-backend", + "type": "child" + } + ], + "id": "libvirt-30" +} + { "execute": "device-list-properties", "arguments": { "typename": "virtio-iommu-pci" }, - "id": "libvirt-30" + "id": "libvirt-31" } =20 { @@ -30075,7 +30229,7 @@ "type": "child" } ], - "id": "libvirt-30" + "id": "libvirt-31" } =20 { @@ -30083,7 +30237,7 @@ "arguments": { "typename": "virtio-blk-ccw" }, - "id": "libvirt-31" + "id": "libvirt-32" } =20 { @@ -30373,7 +30527,7 @@ "type": "bool" } ], - "id": "libvirt-31" + "id": "libvirt-32" } =20 { @@ -30381,7 +30535,7 @@ "arguments": { "typename": "memory-backend-file" }, - "id": "libvirt-32" + "id": "libvirt-33" } =20 { @@ -30471,7 +30625,7 @@ "type": "bool" } ], - "id": "libvirt-32" + "id": "libvirt-33" } =20 { @@ -30479,7 +30633,7 @@ "arguments": { "typename": "memory-backend-memfd" }, - "id": "libvirt-33" + "id": "libvirt-34" } =20 { @@ -30558,12 +30712,12 @@ "type": "int" } ], - "id": "libvirt-33" + "id": "libvirt-34" } =20 { "execute": "query-machines", - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -30838,7 +30992,7 @@ "default-ram-id": "s390.ram" } ], - "id": "libvirt-34" + "id": "libvirt-35" } =20 { @@ -30846,7 +31000,7 @@ "arguments": { "typename": "none-machine" }, - "id": "libvirt-35" + "id": "libvirt-36" } =20 { @@ -30965,12 +31119,12 @@ "type": "bool" } ], - "id": "libvirt-35" + "id": "libvirt-36" } =20 { "execute": "query-cpu-definitions", - "id": "libvirt-36" + "id": "libvirt-37" } =20 { @@ -31680,32 +31834,32 @@ "deprecated": false } ], - "id": "libvirt-36" + "id": "libvirt-37" } =20 { "execute": "query-tpm-models", - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "return": [], - "id": "libvirt-37" + "id": "libvirt-38" } =20 { "execute": "query-tpm-types", - "id": "libvirt-38" + "id": "libvirt-39" } =20 { "return": [], - "id": "libvirt-38" + "id": "libvirt-39" } =20 { "execute": "query-command-line-options", - "id": "libvirt-39" + "id": "libvirt-40" } =20 { @@ -32983,12 +33137,12 @@ "option": "drive" } ], - "id": "libvirt-39" + "id": "libvirt-40" } =20 { "execute": "query-migrate-capabilities", - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -33082,7 +33236,7 @@ "capability": "mapped-ram" } ], - "id": "libvirt-40" + "id": "libvirt-41" } =20 { @@ -33093,7 +33247,7 @@ "name": "host" } }, - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -33165,7 +33319,7 @@ } } }, - "id": "libvirt-41" + "id": "libvirt-42" } =20 { @@ -33176,7 +33330,7 @@ "name": "host" } }, - "id": "libvirt-42" + "id": "libvirt-43" } =20 { @@ -33332,7 +33486,7 @@ } } }, - "id": "libvirt-42" + "id": "libvirt-43" } =20 { --=20 2.49.0