From nobody Mon Dec 15 11:53:47 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741948023317618.7564527245645; Fri, 14 Mar 2025 03:27:03 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id A5E7321CE; Fri, 14 Mar 2025 06:27:02 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 83B3B2297; Fri, 14 Mar 2025 06:25:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 7EA7E1505; Fri, 14 Mar 2025 06:25:50 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 71F0F137E for ; Fri, 14 Mar 2025 06:25:49 -0400 (EDT) Received: from mx-prod-mc-04.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-391-QdE2b-c7PeeNn8LntG_T1g-1; Fri, 14 Mar 2025 06:25:47 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A589B1956048 for ; Fri, 14 Mar 2025 10:25:46 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BF4441801756 for ; Fri, 14 Mar 2025 10:25:45 +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, HEADER_FROM_DIFFERENT_DOMAINS,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=1741947949; 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: in-reply-to:in-reply-to:references:references; bh=VtaLKCkQ9o5NjJwbCKBcc7vXLroEWuMqxYKHh8mO+y4=; b=Oc1Fk49xR3sf6QArUnbYch5S+0YL5xFgDwRlnu9+d9Ci8MuPhkNg+xx1tSFPrpqPJUdE/L aDV5rgT1wa0stSpXbi3jiYdpBVAAVk7o90/mEG43p6EpizsVnGR83l+9uI3dLvnTqSHT7e HNRpu0hUkOx+VCSuQqiikJwAan+j0b4= X-MC-Unique: QdE2b-c7PeeNn8LntG_T1g-1 X-Mimecast-MFC-AGG-ID: QdE2b-c7PeeNn8LntG_T1g_1741947946 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 1/6] qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to v9.2.0-2799-g0462a32b4f Date: Fri, 14 Mar 2025 11:25:37 +0100 Message-ID: In-Reply-To: References: 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: SFCKNDTSZrpN8okX42sOEtTLsBiU5epK4pZFOj2djZA_1741947946 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CRDSRODQMRYLVZB6XBOORY474AJTQPZ3 X-Message-ID-Hash: CRDSRODQMRYLVZB6XBOORY474AJTQPZ3 X-MailFrom: pkrempa@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741948026283019000 Content-Type: text/plain; charset="utf-8" Notable changes: - 'virtio-scsi' supports 'iothread-vq-mapping' - 'vfio-pci' device gained two unstable options 'x-igd-legacy-mode' and 'x-igd-lpc' Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- .../caps_10.0.0_x86_64.replies | 193 ++++++++++-------- .../caps_10.0.0_x86_64.xml | 6 +- 2 files changed, 108 insertions(+), 91 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies b/tests/= qemucapabilitiesdata/caps_10.0.0_x86_64.replies index aea8060984..bbb14a06c8 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.replies @@ -20,7 +20,7 @@ "minor": 2, "major": 9 }, - "package": "v9.2.0-2369-g98c7362b1e" + "package": "v9.2.0-2799-g0462a32b4f" }, "id": "libvirt-2" } @@ -24148,7 +24148,7 @@ "parent": "pci-device" }, { - "name": "ClearwaterForest-v1-x86_64-cpu", + "name": "max-x86_64-cpu", "parent": "x86_64-cpu" }, { @@ -24156,7 +24156,7 @@ "parent": "generic-pc-machine" }, { - "name": "Haswell-v1-x86_64-cpu", + "name": "ClearwaterForest-v1-x86_64-cpu", "parent": "x86_64-cpu" }, { @@ -24199,6 +24199,10 @@ "name": "pci-ipmi-bt", "parent": "pci-device" }, + { + "name": "core2duo-x86_64-cpu", + "parent": "x86_64-cpu" + }, { "name": "filter-buffer", "parent": "netfilter" @@ -24216,8 +24220,8 @@ "parent": "pci-vga" }, { - "name": "kvm-pit", - "parent": "pit-common" + "name": "Haswell-v1-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "tpm-crb", @@ -24227,14 +24231,14 @@ "name": "rtl8139", "parent": "pci-device" }, - { - "name": "core2duo-x86_64-cpu", - "parent": "x86_64-cpu" - }, { "name": "pci-bridge", "parent": "base-pci-bridge" }, + { + "name": "cxl-rp", + "parent": "pcie-root-port-base" + }, { "name": "pc-q35-2.5-machine", "parent": "generic-pc-machine" @@ -24244,8 +24248,8 @@ "parent": "generic-pc-machine" }, { - "name": "cxl-rp", - "parent": "pcie-root-port-base" + "name": "kvm-pit", + "parent": "pit-common" }, { "name": "virtio-crypto-device", @@ -24308,8 +24312,8 @@ "parent": "virtio-9p-pci-base" }, { - "name": "chardev-pty", - "parent": "chardev" + "name": "chardev-serial", + "parent": "chardev-fd" }, { "name": "virtio-blk-device", @@ -24331,10 +24335,6 @@ "name": "virtio-gpu-gl-device", "parent": "virtio-gpu-device" }, - { - "name": "pc-q35-6.2-machine", - "parent": "generic-pc-machine" - }, { "name": "Westmere-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -24352,8 +24352,8 @@ "parent": "sys-bus-device" }, { - "name": "PCIE", - "parent": "PCI" + "name": "pc-q35-6.2-machine", + "parent": "generic-pc-machine" }, { "name": "ich9-usb-uhci2", @@ -24364,8 +24364,8 @@ "parent": "generic-pc-machine" }, { - "name": "chardev-serial", - "parent": "chardev-fd" + "name": "Cooperlake-x86_64-cpu", + "parent": "x86_64-cpu" }, { "name": "resettable-container", @@ -24376,8 +24376,8 @@ "parent": "vhost-user-vsock-pci-base" }, { - "name": "Cooperlake-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "kvmclock", + "parent": "sys-bus-device" }, { "name": "ich9-usb-uhci1", @@ -24400,8 +24400,8 @@ "parent": "pci-device" }, { - "name": "kvmclock", - "parent": "sys-bus-device" + "name": "PCIE", + "parent": "PCI" }, { "name": "pc-i440fx-8.2-machine", @@ -24471,14 +24471,14 @@ "name": "ps2-mouse", "parent": "ps2-device" }, - { - "name": "tulip", - "parent": "pci-device" - }, { "name": "xen-xenstore", "parent": "sys-bus-device" }, + { + "name": "tulip", + "parent": "pci-device" + }, { "name": "piix3-ide", "parent": "pci-ide" @@ -24556,8 +24556,8 @@ "parent": "pci-device" }, { - "name": "pc-i440fx-6.0-machine", - "parent": "generic-pc-machine" + "name": "vhost-vsock-pci-non-transitional", + "parent": "vhost-vsock-pci-base" }, { "name": "virtio-9p-device", @@ -24599,6 +24599,10 @@ "name": "pc-q35-7.2-machine", "parent": "generic-pc-machine" }, + { + "name": "pc-i440fx-6.0-machine", + "parent": "generic-pc-machine" + }, { "name": "qemu32-x86_64-cpu", "parent": "x86_64-cpu" @@ -24608,12 +24612,8 @@ "parent": "x86_64-cpu" }, { - "name": "vhost-vsock-pci-non-transitional", - "parent": "vhost-vsock-pci-base" - }, - { - "name": "ich9-usb-ehci2", - "parent": "pci-ehci-usb" + "name": "xen-gnttab", + "parent": "sys-bus-device" }, { "name": "usb-net", @@ -24624,8 +24624,8 @@ "parent": "PCIE" }, { - "name": "xen-gnttab", - "parent": "sys-bus-device" + "name": "ich9-usb-ehci2", + "parent": "pci-ehci-usb" }, { "name": "isa-debug-exit", @@ -25347,10 +25347,6 @@ "name": "xen-bus", "parent": "bus" }, - { - "name": "tls-creds-x509", - "parent": "tls-creds" - }, { "name": "Penryn-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -25440,8 +25436,8 @@ "parent": "object" }, { - "name": "qio-channel-command", - "parent": "qio-channel" + "name": "tls-creds-x509", + "parent": "tls-creds" }, { "name": "isapc-machine", @@ -25544,8 +25540,8 @@ "parent": "ide-device" }, { - "name": "virtio-pmem", - "parent": "virtio-device" + "name": "qio-channel-command", + "parent": "qio-channel" }, { "name": "Snowridge-v2-x86_64-cpu", @@ -25555,6 +25551,10 @@ "name": "Broadwell-x86_64-cpu", "parent": "x86_64-cpu" }, + { + "name": "acpi-generic-initiator", + "parent": "object" + }, { "name": "vhost-user-scsi-pci", "parent": "vhost-user-scsi-pci-base" @@ -25575,10 +25575,6 @@ "name": "dbus-vmstate", "parent": "object" }, - { - "name": "acpi-generic-initiator", - "parent": "object" - }, { "name": "pc-i440fx-4.1-machine", "parent": "generic-pc-machine" @@ -25592,8 +25588,8 @@ "parent": "e1000-base" }, { - "name": "host-iommu-device-iommufd-vfio", - "parent": "host-iommu-device-iommufd" + "name": "virtio-pmem", + "parent": "virtio-device" }, { "name": "Opteron_G3-v1-x86_64-cpu", @@ -25603,6 +25599,10 @@ "name": "usb-ccid", "parent": "usb-device" }, + { + "name": "host-iommu-device-iommufd-vfio", + "parent": "host-iommu-device-iommufd" + }, { "name": "x-remote-iommu", "parent": "object" @@ -26543,10 +26543,6 @@ "name": "virtio-net-pci", "parent": "virtio-net-pci-base" }, - { - "name": "virtio-vga", - "parent": "virtio-vga-base-type" - }, { "name": "i82558a", "parent": "pci-device" @@ -26583,6 +26579,10 @@ "name": "virtio-mem-pci", "parent": "virtio-mem-pci-base" }, + { + "name": "chardev-pty", + "parent": "chardev" + }, { "name": "SierraForest-v2-x86_64-cpu", "parent": "x86_64-cpu" @@ -26831,6 +26831,10 @@ "name": "sd-bus", "parent": "bus" }, + { + "name": "virtio-vga", + "parent": "virtio-vga-base-type" + }, { "name": "filter-dump", "parent": "netfilter" @@ -26851,10 +26855,6 @@ "name": "smbus-ipmi", "parent": "smbus-device" }, - { - "name": "authz-pam", - "parent": "authz" - }, { "name": "Skylake-Server-v1-x86_64-cpu", "parent": "x86_64-cpu" @@ -26900,8 +26900,8 @@ "parent": "x86_64-cpu" }, { - "name": "max-x86_64-cpu", - "parent": "x86_64-cpu" + "name": "authz-pam", + "parent": "authz" }, { "name": "Dhyana-v2-x86_64-cpu", @@ -28095,6 +28095,11 @@ "description": "on/off", "type": "bool" }, + { + "name": "iothread-vq-mapping", + "description": "IOThread virtqueue mapping list [{\"iothread\":\"\", \"vqs\":[1,2,3,...]},...]", + "type": "IOThreadVirtQueueMappingList" + }, { "default-value": 4294967295, "name": "num_queues", @@ -28313,7 +28318,7 @@ { "default-value": "on", "name": "x-device-dirty-page-tracking", - "description": "Disable device dirty page tracking and use container= -based dirty page tracking (DEBUG)", + "description": "Disable device dirty page tracking and use container= -based dirty page tracking", "type": "OnOffAuto" }, { @@ -28374,18 +28379,18 @@ "description": "Disable MMAP for device. Allows to trace MMIO access= es (DEBUG)", "type": "bool" }, - { - "default-value": true, - "name": "x-req", - "description": "Disable device request notification support (DEBUG)", - "type": "bool" - }, { "default-value": "off", "name": "x-msix-relocation", "description": "Specify MSI-X MMIO relocation to the end of specifie= d existing BAR or new BAR to avoid virtualization overhead due to adjacent = device registers", "type": "OffAutoPCIBAR" }, + { + "default-value": true, + "name": "x-req", + "description": "Disable device request notification support (DEBUG)", + "type": "bool" + }, { "default-value": false, "name": "x-no-kvm-ioeventfd", @@ -28437,6 +28442,12 @@ "description": "Specify UUID VF token. Required for VF when PF is ow= ned by another VFIO driver", "type": "str" }, + { + "default-value": false, + "name": "x-igd-lpc", + "description": "on/off", + "type": "bool" + }, { "default-value": 0, "name": "yres", @@ -28471,6 +28482,12 @@ "description": "Host PCI address [domain:] of ass= igned device", "type": "str" }, + { + "default-value": "auto", + "name": "x-igd-legacy-mode", + "description": "on/off/auto", + "type": "OnOffAuto" + }, { "default-value": false, "name": "x-no-geforce-quirks", @@ -34951,31 +34968,31 @@ }, { "hotpluggable-cpus": true, - "name": "pc-q35-7.2", + "name": "pc-i440fx-6.0", "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, - "cpu-max": 288, - "deprecated": false, + "cpu-max": 255, + "deprecated": true, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-q35-4.0", - "numa-mem-supported": true, + "name": "pc-q35-7.2", + "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, "cpu-max": 288, - "deprecated": true, + "deprecated": false, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-i440fx-6.0", - "numa-mem-supported": false, + "name": "pc-q35-4.0", + "numa-mem-supported": true, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, - "cpu-max": 255, + "cpu-max": 288, "deprecated": true, "default-ram-id": "pc.ram" }, @@ -45190,31 +45207,31 @@ }, { "hotpluggable-cpus": true, - "name": "pc-q35-7.2", + "name": "pc-i440fx-6.0", "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, - "cpu-max": 288, - "deprecated": false, + "cpu-max": 255, + "deprecated": true, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-q35-4.0", - "numa-mem-supported": true, + "name": "pc-q35-7.2", + "numa-mem-supported": false, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, "cpu-max": 288, - "deprecated": true, + "deprecated": false, "default-ram-id": "pc.ram" }, { "hotpluggable-cpus": true, - "name": "pc-i440fx-6.0", - "numa-mem-supported": false, + "name": "pc-q35-4.0", + "numa-mem-supported": true, "default-cpu-type": "qemu64-x86_64-cpu", "acpi": true, - "cpu-max": 255, + "cpu-max": 288, "deprecated": true, "default-ram-id": "pc.ram" }, diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.0.0_x86_64.xml index 24509f6a0a..3a272c8002 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml @@ -208,7 +208,7 @@ 9002050 43100285 - v9.2.0-2369-g98c7362b1e + v9.2.0-2799-g0462a32b4f x86_64 @@ -2146,9 +2146,9 @@ + - @@ -4187,9 +4187,9 @@ + - --=20 2.48.1 From nobody Mon Dec 15 11:53:47 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741948050232135.12178804989685; Fri, 14 Mar 2025 03:27:30 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3E008927; Fri, 14 Mar 2025 06:27:29 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B06681505; Fri, 14 Mar 2025 06:25:56 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 45E611901; Fri, 14 Mar 2025 06:25:51 -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 5EC931501 for ; Fri, 14 Mar 2025 06:25:50 -0400 (EDT) Received: from mx-prod-mc-04.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-440-1ckwwjCVMNuwPdyDNnPFrw-1; Fri, 14 Mar 2025 06:25:48 -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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0801E19560BB for ; Fri, 14 Mar 2025 10:25:48 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C15D18001D4 for ; Fri, 14 Mar 2025 10:25:46 +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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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=1741947950; 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: in-reply-to:in-reply-to:references:references; bh=Xik7uJmWqLhG0NpVmgK+lflM0ToxSmw75384+nXLkAE=; b=asTkYdgpa9TCPOOAVJnOfpaMpmznxCvkZw1yCko6NfD1uPESf15ThZKzExEx6vDUStRr1A SrBQtjDPrHH6ZV/JtzUmWJOc2g7VJ0rhq8R+9euNUj1PKC5Hf8rDKEnuELzhNYkTnb+Svf slT6Bu6jlV9CGh3Lv7E1sZaJ6s/WKjc= X-MC-Unique: 1ckwwjCVMNuwPdyDNnPFrw-1 X-Mimecast-MFC-AGG-ID: 1ckwwjCVMNuwPdyDNnPFrw_1741947948 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 2/6] qemu: capabilities: Introduce QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING Date: Fri, 14 Mar 2025 11:25:38 +0100 Message-ID: <01e6c58368bc433f2f22aea794c2a4ca635b123f.1741947785.git.pkrempa@redhat.com> In-Reply-To: References: 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: d5lFiK0whEZC6JQ9xWZCXjLiF-uRYiEEx0yayI2WOE4_1741947948 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2YXRIXAJIFJ5FS3DUCYRMPXQNNRNBQ4M X-Message-ID-Hash: 2YXRIXAJIFJ5FS3DUCYRMPXQNNRNBQ4M X-MailFrom: pkrempa@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741948051577019100 Content-Type: text/plain; charset="utf-8" The 'virtio-scsi' controller now supports iothread<->virtqueue mapping configuration. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 4 ++++ src/qemu/qemu_capabilities.h | 3 +++ tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 1 + 3 files changed, 8 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index d13b4c8109..0fb231a619 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -729,6 +729,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "virtio-mem-ccw", /* QEMU_CAPS_DEVICE_VIRTIO_MEM_CCW */ "blockdev-set-active", /* QEMU_CAPS_BLOCKDEV_SET_ACTIVE */ "shim", /* QEMU_CAPS_MACHINE_SHIM */ + + /* 475 */ + "virtio-scsi.iothread-mapping", /* QEMU_CAPS_VIRTIO_SCSI_IOT= HREAD_MAPPING */ ); @@ -1478,6 +1481,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsSpaprPCIHostBrid static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioSCSI= [] =3D { { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, + { "iothread-vq-mapping", QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING, NULL = }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVfioPCI[] = =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e836d107aa..68e545c6de 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -709,6 +709,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_BLOCKDEV_SET_ACTIVE, /* blockdev-set-active QMP command supp= orted */ QEMU_CAPS_MACHINE_SHIM, /* -shim command line argument */ + /* 475 */ + QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING, /* virtio-scsi supports per-vi= rtqueue iothread mapping */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.0.0_x86_64.xml index 3a272c8002..529ec7fbe2 100644 --- a/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml @@ -206,6 +206,7 @@ + 9002050 43100285 v9.2.0-2799-g0462a32b4f --=20 2.48.1 From nobody Mon Dec 15 11:53:47 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741948077967821.9002063083619; Fri, 14 Mar 2025 03:27:57 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E2C091F07; Fri, 14 Mar 2025 06:27:56 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 77A491600; Fri, 14 Mar 2025 06:26:02 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id F3E181F23; Fri, 14 Mar 2025 06:25:57 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 F17BB1901 for ; Fri, 14 Mar 2025 06:25:51 -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-379-Pi43fA5aPRqsNvUBjuRqeA-1; Fri, 14 Mar 2025 06:25:50 -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 54F451801A00 for ; Fri, 14 Mar 2025 10:25:49 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 80AFE1801756 for ; Fri, 14 Mar 2025 10:25:48 +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, HEADER_FROM_DIFFERENT_DOMAINS,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=1741947951; 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: in-reply-to:in-reply-to:references:references; bh=/jble4vLhl/ZVnczwS4w2blJm54liI+anENCIC+4B8I=; b=N6X4YRw7KHkTCRezSU9lqAQeWYX2NapOtcm1/yVdsA6FgC9qVXFzJIWVKposzdEvBw6Fj/ e5WRjd5VNz1U4dDAcO3OWsMVyS4PS4qWaCdYiVs5L4DfocWCWF+0LYB64rjNAQXcTToPHw 5XxgnHC1gZdhOLhkFj4wEDcSZfy1Fmg= X-MC-Unique: Pi43fA5aPRqsNvUBjuRqeA-1 X-Mimecast-MFC-AGG-ID: Pi43fA5aPRqsNvUBjuRqeA_1741947949 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 3/6] conf: Add support for iothread to queue mapping config for 'virtio-scsi' Date: Fri, 14 Mar 2025 11:25:39 +0100 Message-ID: <4108988ba8c6dc4bc634404f4c743cb3bfa6294e.1741947785.git.pkrempa@redhat.com> In-Reply-To: References: 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: 7hnlJ4uLzprth_CN7sj8FyhRPdpEuGszzqTi_Q2BfEs_1741947949 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NIFQICVZGXPC6YJ36MLQWVRDCROBCFP3 X-Message-ID-Hash: NIFQICVZGXPC6YJ36MLQWVRDCROBCFP3 X-MailFrom: pkrempa@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741948079557019100 Content-Type: text/plain; charset="utf-8" Upcoming qemu release will support configuring mapping iothreads to virtio queues for 'virtio-scsi' controllers in order to improve performance. Reuse the infrastructure we have from the same configuration for 'virti-blk' to implement the conf support for this feature. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- docs/formatdomain.rst | 39 +++++++++++++++++++++++++++++++ src/conf/domain_conf.c | 10 +++++++- src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 10 +++++++- src/conf/schemas/domaincommon.rng | 3 +++ src/hypervisor/domain_driver.c | 3 ++- 6 files changed, 63 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index c1876ad467..92374ce2f3 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -4168,6 +4168,45 @@ An optional sub-element ``driver`` can specify the d= river specific options: If a specific IOThread is desired for a specific SCSI ``disk``, then mu= ltiple controllers must be defined each having a specific ``iothread`` value. = The ``iothread`` value must be within the range 1 to the domain iothreads v= alue. +``iothreads`` + Supported for ``virtio-scsi`` controllers using ``address`` types ``pci= `` and + ``ccw``. :since:`since 11.2.0 (QEMU 10.0).` Mutually exclusive with ``i= othread``. + + The optional ``iothreads`` sub-element allows specifying multiple IOThr= eads + via the ``iothread`` sub-element with attribute ``id`` the ``virtio-sc= si`` + controller will use for I/O operations. The virt queues (see ``queues`` + attribute of ``driver``) are automatically distributed among the config= ured + iothreads. + + Optionally the ``iothread`` element can have multiple ``queue`` + subelements with mandatory ``id`` atribute specifying that the iothread + should be used to handle given virt queue. If queue mapping is present + the ``queues`` attribute of ``driver`` must be configured and all + configured virt queues must be included in the mapping. The + ``virtio-scsi`` device exposes request virt queues ``0`` to ``N-1`` whe= re + N is the number of queues configured for the device. + + Example:: + + + + + + + + + + + + + + + + + + + + virtio options For virtio controllers, `Virtio-related options`_ can also be set. ( :since:`Since 3.5.0` ) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b94cf99236..28d811de1f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2565,6 +2565,8 @@ void virDomainControllerDefFree(virDomainControllerDe= f *def) if (!def) return; + g_slist_free_full(def->iothreads, (GDestroyNotify) virDomainIothreadMa= ppingDefFree); + virDomainDeviceInfoClear(&def->info); g_free(def->virtio); @@ -8639,6 +8641,9 @@ virDomainControllerDefParseXML(virDomainXMLOption *xm= lopt, &def->iothread) < 0) return NULL; + if (virDomainIothreadMappingDefParse(driver, &def->iothreads) < 0) + return NULL; + if (virDomainVirtioOptionsParseXML(driver, &def->virtio) < 0) return NULL; } @@ -23486,6 +23491,7 @@ virDomainControllerDriverFormat(virBuffer *buf, virDomainControllerDef *def) { g_auto(virBuffer) driverBuf =3D VIR_BUFFER_INITIALIZER; + g_auto(virBuffer) driverChildBuf =3D VIR_BUFFER_INIT_CHILD(buf); if (def->queues) virBufferAsprintf(&driverBuf, " queues=3D'%u'", def->queues); @@ -23504,9 +23510,11 @@ virDomainControllerDriverFormat(virBuffer *buf, if (def->iothread) virBufferAsprintf(&driverBuf, " iothread=3D'%u'", def->iothread); + virDomainIothreadMappingDefFormat(&driverChildBuf, def->iothreads); + virDomainVirtioOptionsFormat(&driverBuf, def->virtio); - virXMLFormatElement(buf, "driver", &driverBuf, NULL); + virXMLFormatElement(buf, "driver", &driverBuf, &driverChildBuf); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 3a97fd866c..c8a8d17c91 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -764,6 +764,7 @@ struct _virDomainControllerDef { unsigned int max_sectors; virTristateSwitch ioeventfd; unsigned int iothread; /* unused =3D 0, > 0 specific thread # */ + GSList *iothreads; /* List of virDomainIothreadMappingDef */ union { virDomainVirtioSerialOpts vioserial; virDomainPCIControllerOpts pciopts; diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c index f2a98f143d..33c3a3ffcc 100644 --- a/src/conf/domain_validate.c +++ b/src/conf/domain_validate.c @@ -1267,7 +1267,7 @@ virDomainControllerDefValidate(const virDomainControl= lerDef *controller) } } - if (controller->iothread !=3D 0) { + if (controller->iothread !=3D 0 || controller->iothreads) { if (controller->type !=3D VIR_DOMAIN_CONTROLLER_TYPE_SCSI || !(controller->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VI= RTIO_SCSI || controller->model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VI= RTIO_TRANSITIONAL || @@ -1276,6 +1276,14 @@ virDomainControllerDefValidate(const virDomainContro= llerDef *controller) _("iothreads are supported only by 'virtio-scsi= ' controllers")); return -1; } + + /* configuring both and it's s= ub-element + * isn't supported */ + if (controller->iothread && controller->iothreads) { + virReportError(VIR_ERR_XML_ERROR, "%s", + _("controller driver 'iothread' attribute can't= be used together with 'iothreads' subelement")); + return -1; + } } return 0; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index 3276569325..e4f4626b33 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -3064,6 +3064,9 @@ + + + diff --git a/src/hypervisor/domain_driver.c b/src/hypervisor/domain_driver.c index b7499a376f..29ba358477 100644 --- a/src/hypervisor/domain_driver.c +++ b/src/hypervisor/domain_driver.c @@ -585,7 +585,8 @@ virDomainDriverDelIOThreadCheck(virDomainDef *def, } for (i =3D 0; i < def->ncontrollers; i++) { - if (def->controllers[i]->iothread =3D=3D iothread_id) { + if (virDomainIothreadMappingDefHasIothread(def->controllers[i]->io= threads, iothread_id) || + def->controllers[i]->iothread =3D=3D iothread_id) { virReportError(VIR_ERR_INVALID_ARG, _("cannot remove IOThread '%1$u' since it is be= ing used by controller"), iothread_id); --=20 2.48.1 From nobody Mon Dec 15 11:53:47 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741948110194703.3318572014065; Fri, 14 Mar 2025 03:28:30 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 83404B48; Fri, 14 Mar 2025 06:28:29 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C8C3C17DE; Fri, 14 Mar 2025 06:26:07 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B0D8222B8; Fri, 14 Mar 2025 06:26:02 -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 29A3D2270 for ; Fri, 14 Mar 2025 06:25:53 -0400 (EDT) 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-620-jgj3u7IeMfe85vcEnQhMzg-1; Fri, 14 Mar 2025 06:25:51 -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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A8D77180049D for ; Fri, 14 Mar 2025 10:25:50 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D785C1801756 for ; Fri, 14 Mar 2025 10:25:49 +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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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=1741947952; 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: in-reply-to:in-reply-to:references:references; bh=11emzQr14RtVkyfY1/5IJwo8GQ0OfSjnkpjmuFnkU98=; b=fM1HRoHKUfsB+O4PTlgv3UEY4nmXV/MLINJCWVvbLnbEz3UAKyHtDoCCA/lS8cpp9eESA1 6K3nug6PapZUZTkUnOXfWDlTLK8d6tUi8HAgE4NoaVu1HeQLUi4Uu3OPob7jajCbTJIm/e X9HhOJrIBTnKlEZuDWtcE0KO84FHCzs= X-MC-Unique: jgj3u7IeMfe85vcEnQhMzg-1 X-Mimecast-MFC-AGG-ID: jgj3u7IeMfe85vcEnQhMzg_1741947950 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 4/6] qemu: Implement support for iothread <-> virtqueue mapping for 'virtio-scsi' controllers Date: Fri, 14 Mar 2025 11:25:40 +0100 Message-ID: <7644713ceb3adada0bfeee3e268f361e9d82c0cc.1741947785.git.pkrempa@redhat.com> In-Reply-To: References: 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: lx0nOfwG8f4MKka8gNeZMsdiVP_XcGija_Api7znAm0_1741947950 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WATXHOESHJL4GTSSDM5DNFZB5WPSYBM7 X-Message-ID-Hash: WATXHOESHJL4GTSSDM5DNFZB5WPSYBM7 X-MailFrom: pkrempa@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741948111475019000 Content-Type: text/plain; charset="utf-8" Similarly to 'virtio-blk' users can map multiple iothreads and pin them appropriately for 'virtio-scsi' controllers to ensure the best performance. Implement the validation and command line generation based on the helpers we have for 'virtio-blk'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 6 ++++++ src/qemu/qemu_validate.c | 30 +++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 51e428e017..4c87a74d0e 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2505,6 +2505,7 @@ qemuBuildControllerSCSIDevProps(virDomainControllerDe= f *def, virQEMUCaps *qemuCaps) { g_autoptr(virJSONValue) props =3D NULL; + g_autoptr(virJSONValue) iothreadsMapping =3D NULL; g_autofree char *iothread =3D NULL; const char *driver =3D NULL; @@ -2516,6 +2517,10 @@ qemuBuildControllerSCSIDevProps(virDomainControllerD= ef *def, qemuCaps))) return NULL; + if (def->iothreads && + !(iothreadsMapping =3D qemuBuildIothreadMappingProps(def->ioth= reads))) + return NULL; + if (def->iothread > 0) iothread =3D g_strdup_printf("iothread%u", def->iothread); @@ -2523,6 +2528,7 @@ qemuBuildControllerSCSIDevProps(virDomainControllerDe= f *def, "S:iothread", iothread, "s:id", def->info.alias, "p:num_queues", def->queues, + "A:iothread-vq-mapping", &iothreadsMappi= ng, "p:cmd_per_lun", def->cmd_per_lun, "p:max_sectors", def->max_sectors, "T:ioeventfd", def->ioeventfd, diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 4ef944addb..1220c5dca0 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3657,9 +3657,10 @@ qemuValidateDomainDeviceDefControllerIDE(const virDo= mainControllerDef *controlle */ static int qemuValidateCheckSCSIControllerIOThreads(const virDomainControllerDef *con= troller, - const virDomainDef *def) + const virDomainDef *def, + virQEMUCaps *qemuCaps) { - if (!controller->iothread) + if (controller->iothread =3D=3D 0 && !controller->iothreads) return 0; if (controller->info.type !=3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE && @@ -3670,8 +3671,20 @@ qemuValidateCheckSCSIControllerIOThreads(const virDo= mainControllerDef *controlle return -1; } - /* Can we find the controller iothread in the iothreadid list? */ - if (!virDomainIOThreadIDFind(def, controller->iothread)) { + if (controller->iothreads) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPI= NG)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("IOThread mapping for virtio-scsi controllers= is not available with this QEMU binary")); + return -1; + } + + if (qemuDomainValidateIothreadMapping(def, controller->iothreads, + controller->queues) < 0) + return -1; + } + + if (controller->iothread > 0 && + !virDomainIOThreadIDFind(def, controller->iothread)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("controller iothread '%1$u' not defined in iothre= adid"), controller->iothread); @@ -3684,13 +3697,15 @@ qemuValidateCheckSCSIControllerIOThreads(const virD= omainControllerDef *controlle static int qemuValidateDomainDeviceDefControllerSCSI(const virDomainControllerDef *co= ntroller, - const virDomainDef *def) + const virDomainDef *def, + virQEMUCaps *qemuCaps) { switch ((virDomainControllerModelSCSI) controller->model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_TRANSITIONAL: case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_NON_TRANSITIONAL: - if (qemuValidateCheckSCSIControllerIOThreads(controller, def) = < 0) + if (qemuValidateCheckSCSIControllerIOThreads(controller, def, + qemuCaps) < 0) return -1; break; @@ -4364,7 +4379,8 @@ qemuValidateDomainDeviceDefController(const virDomain= ControllerDef *controller, break; case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: - ret =3D qemuValidateDomainDeviceDefControllerSCSI(controller, def); + ret =3D qemuValidateDomainDeviceDefControllerSCSI(controller, def, + qemuCaps); break; case VIR_DOMAIN_CONTROLLER_TYPE_PCI: --=20 2.48.1 From nobody Mon Dec 15 11:53:47 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174194813975920.93023788574169; Fri, 14 Mar 2025 03:28:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 114F3981; Fri, 14 Mar 2025 06:28:59 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8C11C9A8; Fri, 14 Mar 2025 06:26:10 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 1187E17C2; Fri, 14 Mar 2025 06:26:06 -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 4C302228F for ; Fri, 14 Mar 2025 06:25:54 -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-326-pZd6wJZQM2-X-5IVjNkYKw-1; Fri, 14 Mar 2025 06:25:52 -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 02AE5180899B for ; Fri, 14 Mar 2025 10:25:52 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.6]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3214718001D4 for ; Fri, 14 Mar 2025 10:25:50 +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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,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=1741947954; 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: in-reply-to:in-reply-to:references:references; bh=ILuI92d4bHo7X9qCBsYeEE5QTzT/Z7+YD4kT58cF4rQ=; b=IMZDd8X4KN6Ro9sWvo7v2o7AR27XEBGVtwMVVhLj8LA56Bwd9Cg0vpYzBox6A54WLNCm+D T+6QamL+G77GdMOnUS10Ax3w4ylUh+HWbvvdZwro25S+fCYj2POl4fBaFduuuhKL2RxeGf nt4+02yRCFgjkDSQ94hLxEc2bDbQXXU= X-MC-Unique: pZd6wJZQM2-X-5IVjNkYKw-1 X-Mimecast-MFC-AGG-ID: pZd6wJZQM2-X-5IVjNkYKw_1741947952 From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 5/6] qemuxmlconftest: Add 'iothreads-virtio-scsi-mapping' case Date: Fri, 14 Mar 2025 11:25:41 +0100 Message-ID: <4713565b5f5870607ebc470e23391eda6b3f9b27.1741947785.git.pkrempa@redhat.com> In-Reply-To: References: 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: f5YBKG6G9VOGffhlmPBfvlLZUNBOHf59gcxzymji97g_1741947952 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2U5GDBIEWZ4PS2W77OGRN7TMFZ7YHQ3W X-Message-ID-Hash: 2U5GDBIEWZ4PS2W77OGRN7TMFZ7YHQ3W X-MailFrom: pkrempa@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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741948143931019000 Content-Type: text/plain; charset="utf-8" Test the XML and commandline for iothread<->virtqueue mapping for 'virtio-scsi' controllers. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- ...ads-virtio-scsi-mapping.x86_64-latest.args | 40 ++++++++++++ ...eads-virtio-scsi-mapping.x86_64-latest.xml | 61 +++++++++++++++++++ .../iothreads-virtio-scsi-mapping.xml | 53 ++++++++++++++++ tests/qemuxmlconftest.c | 1 + 4 files changed, 155 insertions(+) create mode 100644 tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86= _64-latest.args create mode 100644 tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86= _64-latest.xml create mode 100644 tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.xml diff --git a/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-lat= est.args b/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-lates= t.args new file mode 100644 index 0000000000..c4491cd995 --- /dev/null +++ b/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-object '{"qom-type":"iothread","id":"iothread1"}' \ +-object '{"qom-type":"iothread","id":"iothread2"}' \ +-object '{"qom-type":"iothread","id":"iothread3"}' \ +-object '{"qom-type":"iothread","id":"iothread4"}' \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","num_queues":3,"iothread= -vq-mapping":[{"iothread":"iothread2"},{"iothread":"iothread3"}],"bus":"pci= .0","addr":"0xb"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi1","num_queues":2,"iothread= -vq-mapping":[{"iothread":"iothread4","vqs":[0]},{"iothread":"iothread2","v= qs":[1]}],"bus":"pci.0","addr":"0xc"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/iothrtest2= .img","node-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"scsi-hd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun"= :3,"device_id":"drive-scsi0-0-0-3","drive":"libvirt-1-storage","id":"scsi0-= 0-0-3","bootindex":1}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-lat= est.xml b/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-latest= .xml new file mode 100644 index 0000000000..11f0aff401 --- /dev/null +++ b/tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-latest.xml @@ -0,0 +1,61 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 2 + 4 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + + + + + + +
+ + + + + + + + + + + + +
+ + + +