From nobody Tue Sep 9 19:12:40 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=1753976911; cv=none; d=zohomail.com; s=zohoarc; b=bdjUYOhuUYMKy4Z8PQxOTYuuaogauXDKythvLgaazP0RgyxcYpdSYH1HR3VFcEyJoOxjTi5LMR4JOK9UPUEA+2vVTcMeSU8Y4XqmIoncq2SMtY0hSvk+nCiQJ3dgj1SwbcPNqMBWFiwbZNWv5wpRxWzId7/n060r7EJH/nhDYns= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1753976911; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post: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=gfX4FB3VuuwmPQ9/Gw+/H/AkXByKpuRO2JW7H+OT3Gg=; b=bfluv9g1snts4p/lz9N0Z07xU7XwOUThl+5/Hp4oeWCP9ZvGIC08csVljehRx1p12OaaVmJBF0+t2Nqsr1IBREl2NkyCt8SbR69tLUcX+NDDy5KO5DINnqGrkKHktXWrUf2qIGMS4wN8TVFQ4FrJEV+dFvvYyxHiJo8PnsgTGDA= 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 175397691115087.75613168301288; Thu, 31 Jul 2025 08:48:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 02742A7E; Thu, 31 Jul 2025 11:48:29 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A4803E3A; Thu, 31 Jul 2025 11:46:05 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id AE41EAD6; Thu, 31 Jul 2025 11:45:55 -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 38E8CA4E for ; Thu, 31 Jul 2025 11:45:55 -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-180-OOGXJRssPkOSXC2BZ5eLbQ-1; Thu, 31 Jul 2025 11:45:53 -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 BCCDB19560B2 for ; Thu, 31 Jul 2025 15:45:52 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.44.33.228]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E7BA8180035E for ; Thu, 31 Jul 2025 15:45:51 +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=2.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_SBL_CSS,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1753976755; 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=FsBbhh7iXuNNt7JiuNxXazoiKGdLeqdNOGrRkeO3Ass=; b=IpRIhEcZZUP7hkAmSrAPXNyCF43F2102hkkK30jwGga79GCE1CkwztO3btpoyKEHaxlMVZ 89u8ncL2TT59R0i+VKkMxat7RWOxG6+4Zsx4clHHEL5iOfOOzmeDy+sKliDY5ddCJY3pZ7 4+JpkC2Bv2danJcVOAdoSWfv9jMQqAo= X-MC-Unique: OOGXJRssPkOSXC2BZ5eLbQ-1 X-Mimecast-MFC-AGG-ID: OOGXJRssPkOSXC2BZ5eLbQ_1753976752 To: devel@lists.libvirt.org Subject: [PATCH 4/5] qemu: Fix matching for read/write firmware Date: Thu, 31 Jul 2025 17:45:41 +0200 Message-ID: <20250731154542.109878-5-abologna@redhat.com> In-Reply-To: <20250731154542.109878-1-abologna@redhat.com> References: <20250731154542.109878-1-abologna@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: oKmiJnqMudqWRcTUQGahfoEz3q8NQU-SHWTzgrpZKhY_1753976752 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: PYINSEA4MGAL65IGFPQVFW2XYI72QNW4 X-Message-ID-Hash: PYINSEA4MGAL65IGFPQVFW2XYI72QNW4 X-MailFrom: abologna@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: Andrea Bolognani via Devel Reply-To: Andrea Bolognani X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1753976914498116600 Content-Type: text/plain; charset="utf-8"; x-default="true" We currently always pick a read-only firmware unless we are explicitly asked for a read/write one, which is probably what most people expect anyway but doesn't really make sense otherwise: if no specific requirement has been provided by the user, both read-only and read/write firmwares should be allowed to match. This won't result in any change in practice, since distros are not shipping read/write builds of edk2 anyway. If they started doing that, it would be their responsibility to ensure that they are ordered after the read-only builds. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 22e0eb83f0..0fb954993a 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1317,6 +1317,13 @@ qemuFirmwareMatchDomain(const virDomainDef *def, return false; } =20 + /* Same for read-only status */ + if (loader && + loader->readonly =3D=3D VIR_TRISTATE_BOOL_YES && + flash->mode =3D=3D QEMU_FIRMWARE_FLASH_MODE_COMBINED) { + VIR_DEBUG("Discarding read/write loader"); + return false; + } if (loader && loader->readonly =3D=3D VIR_TRISTATE_BOOL_NO && flash->mode !=3D QEMU_FIRMWARE_FLASH_MODE_COMBINED) { --=20 2.50.1