From nobody Sun Oct 5 01:49:58 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=1758825959; cv=none; d=zohomail.com; s=zohoarc; b=brLLI3eFdz7JdGpNvxzsv9IIBubohZP3fyy9xQYNF0Jt+R1p2NvyC1c+m6Xja0oH1M1GTYK/g3iGSpMUZu5gpYr/lUAYqKzz/EbKWGo6IqR9/V5Yv+vIMYasRKICn73w1VtnPn9F/evgjzgQSAyI9vrutbVuK+dwI6Ts8duLI48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1758825959; 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=+E4+cLyYpnynbDcU1ufYs3DTj9ah7qTSanKwSJdtZy8=; b=LK/cn2SrgthiUsja/QSKX5Uwo+SqojabcRObwB8Pl5/jl8pbr+wMbukFVdNiYJ80iu6zXAngfapQVtUhZ6UnULkp5idh6pRbfSvshe+Ef6clc6xU6O+6XYWYJqPzZhV1WWrZfjjuhWwCdVnVU8ZiNUYiQ4Eh8YZqvZbfRWRAOiE= 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 1758825959194494.4188110475567; Thu, 25 Sep 2025 11:45:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 1E9CA43FBE; Thu, 25 Sep 2025 14:45:57 -0400 (EDT) Received: from [172.19.199.14] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 089F9443DC; Thu, 25 Sep 2025 14:11:21 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id F046E43F3D; Thu, 25 Sep 2025 14:11:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 60E8044079 for ; Thu, 25 Sep 2025 14:07:50 -0400 (EDT) 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-25-XPuLNEx6Pn2B42JGTQn-CA-1; Thu, 25 Sep 2025 14:07:48 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DE2BE195609E for ; Thu, 25 Sep 2025 18:07:47 +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 16CFC300021A for ; Thu, 25 Sep 2025 18:07:46 +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=1758823670; 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=+E4+cLyYpnynbDcU1ufYs3DTj9ah7qTSanKwSJdtZy8=; b=Znzt2JUUGISB8ROQ+nxx06KyALbDzf/XvhfPZwrDj446y3Ye9FtWcAX+4MdbLS9/kVFUaB vynRU9QDqUizqc6QuYhtsZjElfqDv7oQe/6+GiSXNBk/NmwfxMxhQx0RgbKjy6332UVnn/ i4KL7p7QEYPqADF6rDppUHLRq8rg3mA= X-MC-Unique: XPuLNEx6Pn2B42JGTQn-CA-1 X-Mimecast-MFC-AGG-ID: XPuLNEx6Pn2B42JGTQn-CA_1758823668 To: devel@lists.libvirt.org Subject: [PATCH v2 14/38] qemu: Don't add PCI, USB or memballoon to microvm Date: Thu, 25 Sep 2025 20:07:00 +0200 Message-ID: <20250925180724.500758-15-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: 04_8X5ppvjP61jgyxIARmO6bI5fKq55gDRSsGLvao7s_1758823668 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GXGVNDQKSJK6A4XGPKKTNDTTHETBRIB5 X-Message-ID-Hash: GXGVNDQKSJK6A4XGPKKTNDTTHETBRIB5 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: 1758825960890116600 Content-Type: text/plain; charset="utf-8"; x-default="true" The microvm machine type doesn't support PCI, so adding PCI controllers to it doesn't make sense, and nor does adding a USB controller or a memballon since both are PCI devices. Signed-off-by: Andrea Bolognani Reviewed-by: Peter Krempa --- src/qemu/qemu_postparse.c | 3 ++- .../microvm-pci.x86_64-latest.args | 2 -- .../microvm-pci.x86_64-latest.xml | 6 ----- ...ller-automatic-microvm.x86_64-latest.args} | 20 ++++++++-------- ...roller-automatic-microvm.x86_64-latest.err | 1 - ...roller-automatic-microvm.x86_64-latest.xml | 23 +++++++++++++++++++ tests/qemuxmlconftest.c | 2 +- 7 files changed, 35 insertions(+), 22 deletions(-) copy tests/qemuxmlconfdata/{microvm-pci.x86_64-latest.args =3D> usb-contro= ller-automatic-microvm.x86_64-latest.args} (56%) delete mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-microvm.= x86_64-latest.err create mode 100644 tests/qemuxmlconfdata/usb-controller-automatic-microvm.= x86_64-latest.xml diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c index ab39dfe138..d5708fbff9 100644 --- a/src/qemu/qemu_postparse.c +++ b/src/qemu/qemu_postparse.c @@ -1252,7 +1252,8 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver, switch (def->os.arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: - if (STREQ(def->os.machine, "isapc")) { + if (STREQ(def->os.machine, "isapc") || + STREQ(def->os.machine, "microvm")) { break; } =20 diff --git a/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.args b/tests/q= emuxmlconfdata/microvm-pci.x86_64-latest.args index 33bbaacd7c..06598ddcbc 100644 --- a/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.args +++ b/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.args @@ -26,8 +26,6 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-test/.c= onfig \ -rtc base=3Dutc \ -no-shutdown \ -boot strict=3Don \ --device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1"}= ' \ -audiodev '{"id":"audio1","driver":"none"}' \ --device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ -sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ -msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.xml b/tests/qe= muxmlconfdata/microvm-pci.x86_64-latest.xml index 1cac541367..06b5a8b789 100644 --- a/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.xml +++ b/tests/qemuxmlconfdata/microvm-pci.x86_64-latest.xml @@ -18,12 +18,6 @@ /usr/bin/qemu-system-x86_64 - -
-