From nobody Sun Oct 5 01:51:54 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=1758828103; cv=none; d=zohomail.com; s=zohoarc; b=WrjiHUCBm7uBmIiXz1ljzQj1bnd9zAM9DLueiX9AGQP+op6MoGju1t0h1HgmvPRDJcDhHY0Ouf66t1uTXItnhWefO7eOfznVDOSMof6r2e/sIm7BCNe079IZ4Q7YT5ECylGc1j+iQW81E7yyOfLYq3RsuZsQL8Pj+/rAZVKSk8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758828103; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=BzaA8/0K6J7BPxBua9ZSrNdPhZuOafg3pTDBQd43GWs=; b=ef+G48mROcAxZfpdC2Lkseqk8RLzit+fUMVg5lG3QYoPxHC1eBcipASeudzb7VMyC3YkbCc8SR4RGzNZ18ALdKw+geiCiX38Kq7chz99We37m40pAQzJrKjzf7IUIHtEK/ImgFT2uCmD8cksX1GmtGjnToHZE+V6mXhdbBzJEYI= 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 1758828103151147.8044733121136; Thu, 25 Sep 2025 12:21:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 3A38C41886; Thu, 25 Sep 2025 15:21:42 -0400 (EDT) Received: from [172.19.199.14] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7A59144198; Thu, 25 Sep 2025 14:28:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 1ED0F441C4; Thu, 25 Sep 2025 14:23:41 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 706E4441C4 for ; Thu, 25 Sep 2025 14:08:18 -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-564-pemVbX_XPqGfwALtRE7Bvw-1; Thu, 25 Sep 2025 14:08:16 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AD7C91800451 for ; Thu, 25 Sep 2025 18:08:15 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.225.196]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DB140300021A for ; Thu, 25 Sep 2025 18:08:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1758823698; 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=BzaA8/0K6J7BPxBua9ZSrNdPhZuOafg3pTDBQd43GWs=; b=CnykbDopARtJxyUN/UMv9GRT2vXKzloUuLoZw2zhwIksY2rVySIvQnU74nkNWt+QxAn+ek ppBq/TsUEiyVr+r/p0yn/gOCCbiA0sn9pqj2PhuzGCSP4JR2WPgjzIVJ+BK0zPTgjuMk7k mavcBU1UiQKULJL39dBILvEcsYYFTvw= X-MC-Unique: pemVbX_XPqGfwALtRE7Bvw-1 X-Mimecast-MFC-AGG-ID: pemVbX_XPqGfwALtRE7Bvw_1758823695 To: devel@lists.libvirt.org Subject: [PATCH v2 35/38] qemu: Don't special-case realview/versatilebp for USB Date: Thu, 25 Sep 2025 20:07:21 +0200 Message-ID: <20250925180724.500758-36-abologna@redhat.com> In-Reply-To: <20250925180724.500758-1-abologna@redhat.com> References: <20250925180724.500758-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ux1rcxOwY6U8eFk_tpTask7OlXOF4Vz16hrwPAJ1jss_1758823695 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: S2DWJZFQJXFYEWBUZJ4EG3SUZX5P3TA2 X-Message-ID-Hash: S2DWJZFQJXFYEWBUZJ4EG3SUZX5P3TA2 X-MailFrom: abologna@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Andrea Bolognani via Devel Reply-To: Andrea Bolognani X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1758828104839116600 Content-Type: text/plain; charset="utf-8"; x-default="true" We have special behavior for these two machine types, and more specifically for the USB controller that they get added by default - something that doesn't generally happen on Arm. Not only this is inconsistent with other machine types for the architecture, it also means that the model for the USB controller that gets added automatically (pci-ohci, USB1) is worse than the default one for user-added USB controllers (qemu-xhci, USB3) which is just silly. Bring these machine types in line with the rest of the architecture. Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/qemu/qemu_domain.c | 7 ------- ...aarch64-realview-minimal.aarch64-latest.abi-update.args | 2 +- .../aarch64-realview-minimal.aarch64-latest.abi-update.xml | 2 +- .../aarch64-realview-minimal.aarch64-latest.args | 2 +- .../aarch64-realview-minimal.aarch64-latest.xml | 2 +- ...rmv7l-versatilepb-minimal.armv7l-latest.abi-update.args | 2 +- ...armv7l-versatilepb-minimal.armv7l-latest.abi-update.xml | 2 +- .../armv7l-versatilepb-minimal.armv7l-latest.args | 2 +- .../armv7l-versatilepb-minimal.armv7l-latest.xml | 2 +- .../usb-controller-automatic-realview.aarch64-latest.args | 2 +- .../usb-controller-automatic-realview.aarch64-latest.xml | 2 +- ...usb-controller-automatic-versatilepb.armv7l-latest.args | 2 +- .../usb-controller-automatic-versatilepb.armv7l-latest.xml | 2 +- ...ontroller-default-fallback-realview.aarch64-latest.args | 2 +- ...controller-default-fallback-realview.aarch64-latest.xml | 2 +- tests/qemuxmlconftest.c | 2 +- 16 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 118470fef8..9927ab3cbb 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4434,13 +4434,6 @@ qemuDomainDefaultUSBControllerModelAutoAdded(const v= irDomainDef *def, } } =20 - if (ARCH_IS_ARM(def->os.arch)) { - if (STREQ(def->os.machine, "versatilepb") || - STRPREFIX(def->os.machine, "realview-eb")) - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI)) - return VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI; - } - return VIR_DOMAIN_CONTROLLER_MODEL_USB_DEFAULT; } =20 diff --git a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.= abi-update.args b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-la= test.abi-update.args index 0d956241fc..ccbff79f35 100644 --- a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-upd= ate.args +++ b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-upd= ate.args @@ -25,7 +25,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.= abi-update.xml b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-lat= est.abi-update.xml index c31c7b2bbc..056e5e56a8 100644 --- a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-upd= ate.xml +++ b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.abi-upd= ate.xml @@ -15,7 +15,7 @@ destroy /usr/bin/qemu-system-aarch64 - +
diff --git a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.= args b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.args index 0d956241fc..ccbff79f35 100644 --- a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.args +++ b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.args @@ -25,7 +25,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.= xml b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.xml index c31c7b2bbc..056e5e56a8 100644 --- a/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.xml +++ b/tests/qemuxmlconfdata/aarch64-realview-minimal.aarch64-latest.xml @@ -15,7 +15,7 @@ destroy /usr/bin/qemu-system-aarch64 - +
diff --git a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest= .abi-update.args b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-= latest.abi-update.args index a05a413290..88fe2b62e8 100644 --- a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-up= date.args +++ b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-up= date.args @@ -26,7 +26,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-armv7lt= est/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest= .abi-update.xml b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-l= atest.abi-update.xml index 7b21b24927..a9da2a3b13 100644 --- a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-up= date.xml +++ b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.abi-up= date.xml @@ -17,7 +17,7 @@ destroy /usr/bin/qemu-system-armv7l - +
diff --git a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest= .args b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.args index a05a413290..88fe2b62e8 100644 --- a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.args +++ b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.args @@ -26,7 +26,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-armv7lt= est/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest= .xml b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.xml index 7b21b24927..a9da2a3b13 100644 --- a/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.xml +++ b/tests/qemuxmlconfdata/armv7l-versatilepb-minimal.armv7l-latest.xml @@ -17,7 +17,7 @@ destroy /usr/bin/qemu-system-armv7l - +
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch6= 4-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aar= ch64-latest.args index 0d956241fc..ccbff79f35 100644 --- a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-lates= t.args +++ b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-lates= t.args @@ -25,7 +25,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch6= 4-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarc= h64-latest.xml index 250da1b5e0..8bb25de20a 100644 --- a/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-lates= t.xml +++ b/tests/qemuxmlconfdata/usb-controller-automatic-realview.aarch64-lates= t.xml @@ -15,7 +15,7 @@ destroy /usr/bin/qemu-system-aarch64 - +
diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.arm= v7l-latest.args b/tests/qemuxmlconfdata/usb-controller-automatic-versatilep= b.armv7l-latest.args index a05a413290..88fe2b62e8 100644 --- a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-lat= est.args +++ b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-lat= est.args @@ -26,7 +26,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-armv7lt= est/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.arm= v7l-latest.xml b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb= .armv7l-latest.xml index 482029e3b0..8a12dda0f7 100644 --- a/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-lat= est.xml +++ b/tests/qemuxmlconfdata/usb-controller-automatic-versatilepb.armv7l-lat= est.xml @@ -17,7 +17,7 @@ destroy /usr/bin/qemu-system-armv7l - +
diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-realview= .aarch64-latest.args b/tests/qemuxmlconfdata/usb-controller-default-fallbac= k-realview.aarch64-latest.args index ccbff79f35..0d956241fc 100644 --- a/tests/qemuxmlconfdata/usb-controller-default-fallback-realview.aarch6= 4-latest.args +++ b/tests/qemuxmlconfdata/usb-controller-default-fallback-realview.aarch6= 4-latest.args @@ -25,7 +25,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-aarch64= test/.config \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"qemu-xhci","id":"usb","bus":"pci","addr":"0x1"}' \ +-device '{"driver":"pci-ohci","id":"usb","bus":"pci","addr":"0x1"}' \ -audiodev '{"id":"audio1","driver":"none"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/usb-controller-default-fallback-realview= .aarch64-latest.xml b/tests/qemuxmlconfdata/usb-controller-default-fallback= -realview.aarch64-latest.xml index 8bb25de20a..250da1b5e0 100644 --- a/tests/qemuxmlconfdata/usb-controller-default-fallback-realview.aarch6= 4-latest.xml +++ b/tests/qemuxmlconfdata/usb-controller-default-fallback-realview.aarch6= 4-latest.xml @@ -15,7 +15,7 @@ destroy /usr/bin/qemu-system-aarch64 - +
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index abe5609889..7663a43856 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -2192,7 +2192,7 @@ mymain(void) DO_TEST_FULL("usb-controller-default-fallback-realview", ".aarch64-lat= est", ARG_CAPS_ARCH, "aarch64", ARG_CAPS_VER, "latest", - ARG_QEMU_CAPS_DEL, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LA= ST, + ARG_QEMU_CAPS_DEL, QEMU_CAPS_DEVICE_QEMU_XHCI, QEMU_CAPS_= NEC_USB_XHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_LAST, ARG_END); DO_TEST_FULL("usb-controller-default-unavailable-realview", ".aarch64-= latest", ARG_CAPS_ARCH, "aarch64", --=20 2.51.0