From nobody Tue Mar 3 04:55:52 2026 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=1771872802; cv=none; d=zohomail.com; s=zohoarc; b=RKEsPdtCSTJvCg0se0Dc6OyCvhWRy9PJJFN09ni4XWGumc+ZXFr0u3Ajaozh7ohv9guNk+Qyp2fPycLFlnXPIg2Obu6xAPwQ2iEmtFpKhreY+ih1pJUFd82td/qKaa6D3wmYSPSDfaSQfmMsnF19Rbd4humRbU3SDC3tNU/87K0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771872802; 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=xJy8f6tZV4a2dqxHUpkVgECenTwiyfPioFiRq9NVo/0=; b=CuUNBTPnel1GNp0fn+DZuMuLBc9tz3heWEPI0Nvt2sRvKsbgVtNwRvyW4qXLXdn3xPgcaIGAfxfTx3po03/3Ps4sCf4U0dFEVRSKm1Rl5xuT4pFASYxf53lybkT0oMUvDwq7a4aZSmpkTOoNj3ZvNp31O2VosIRuve6jQK3tHC4= 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 17718728024542.210815371012359; Mon, 23 Feb 2026 10:53:22 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9164941B65; Mon, 23 Feb 2026 13:53:21 -0500 (EST) Received: from [172.19.199.9] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7349644022; Mon, 23 Feb 2026 13:36:36 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id C1FB041A9D; Mon, 23 Feb 2026 13:36:22 -0500 (EST) 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 7857041A0A for ; Mon, 23 Feb 2026 13:32:15 -0500 (EST) Received: from mx-prod-mc-05.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-203-JqmxQ3puP7uJIt6irAyPag-1; Mon, 23 Feb 2026 13:32:13 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AF38A195609E for ; Mon, 23 Feb 2026 18:32:10 +0000 (UTC) Received: from kinshicho.usersys.redhat.com (unknown [10.44.32.20]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 90BC81955D71 for ; Mon, 23 Feb 2026 18:32:09 +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=-2.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HELO_MISC_IP,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=1771871535; 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=xJy8f6tZV4a2dqxHUpkVgECenTwiyfPioFiRq9NVo/0=; b=U19B3TVHuUE9FVlMrVcuzE41s8eBaxFghWfqRZCGtxjr62mTd8QFry921ZlkYoeIKHbrNT V67E8tkTDgdC7Ln9iHrb1rZZW0GWUyPLupK0VcK4FVHaOBLVyPG6ZPAapAitVJL3PcCu7h 7m4FEciZr2utFRYVc8MxdrNNjUk36yI= X-MC-Unique: JqmxQ3puP7uJIt6irAyPag-1 X-Mimecast-MFC-AGG-ID: JqmxQ3puP7uJIt6irAyPag_1771871533 To: devel@lists.libvirt.org Subject: [PATCH v4 25/36] qemu_firmware: Fill in varstore information Date: Mon, 23 Feb 2026 19:31:08 +0100 Message-ID: <20260223183119.501349-26-abologna@redhat.com> In-Reply-To: <20260223183119.501349-1-abologna@redhat.com> References: <20260223183119.501349-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XCgnKA_qa8hlKwmEOu-z8ZxTeQ2UGKECue-L0DN9hI0_1771871533 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: HTSA3YSLCFLMZAHKIWBPSJNM2OGEM3XO X-Message-ID-Hash: HTSA3YSLCFLMZAHKIWBPSJNM2OGEM3XO 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: 1771872803768158500 If the matching firmware requires the use of varstore, we have to bubble up information about it, namely the path to the template. If the struct member doesn't exist yet, we need to allocate it. Signed-off-by: Andrea Bolognani Reviewed-by: Michal Privoznik Acked-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_firmware.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index 60635b559f..5a07e3181f 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1492,6 +1492,7 @@ qemuFirmwareEnableFeaturesModern(virDomainDef *def, const qemuFirmwareMappingFlash *flash =3D &fw->mapping.data.flash; const qemuFirmwareMappingMemory *memory =3D &fw->mapping.data.memory; virDomainLoaderDef *loader =3D NULL; + virDomainVarstoreDef *varstore =3D NULL; virStorageFileFormat format; bool hasSecureBoot =3D false; bool hasEnrolledKeys =3D false; @@ -1552,8 +1553,17 @@ qemuFirmwareEnableFeaturesModern(virDomainDef *def, VIR_FREE(loader->path); loader->path =3D g_strdup(memory->filename); =20 - VIR_DEBUG("decided on loader '%s'", - loader->path); + if (memory->template) { + if (!def->os.varstore) + def->os.varstore =3D virDomainVarstoreDefNew(); + varstore =3D def->os.varstore; + + VIR_FREE(varstore->template); + varstore->template =3D g_strdup(memory->template); + } + + VIR_DEBUG("decided on loader '%s' template '%s'", + loader->path, NULLSTR(varstore ? varstore->template : NU= LL)); break; =20 case QEMU_FIRMWARE_DEVICE_NONE: --=20 2.53.0