From nobody Mon Feb 9 07:39:22 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565021691; cv=none; d=zoho.com; s=zohoarc; b=mpZXNn8xorYTgECRqv9TfMl7TsAvt2Bz3BZtfvDq8IsYnocdQ9RL7mFgAZ/wdAGw6+X5iGK7EVPfTFg/oHh+dgZFfXhgxNGt6QbIft4lhReQ7MROthHzwfOHv6wRM1Mv0uhj08SB7LuT1Mavj/Vv+wgl4wWQ3QKeRyPqZR/vVBM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565021691; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5MPqhN4meMD9iaaB82gSuMuOIKmab6Ljz4XYQSPaTCg=; b=SAJeXz9w121YbbIm6/p2+mPBmMx7dR7yzMz3WFOaTVxbBLuYhlnUuJc430o6y1IXmp7KFuNUBrp8v14SK8I8MClnIf8Le+sVvy1NQINZrIPRv/XZBJekM4EcxbSeQ4UJSH9OWmzPY0oKfvhQ6qFcPb8Bh0zhd3p6lMAz+Z/feFM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565021691226492.1347152475904; Mon, 5 Aug 2019 09:14:51 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8AF9B20260; Mon, 5 Aug 2019 16:14:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 622C860605; Mon, 5 Aug 2019 16:14:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2396D24FDE; Mon, 5 Aug 2019 16:14:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x75GEgOs026363 for ; Mon, 5 Aug 2019 12:14:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8330960A97; Mon, 5 Aug 2019 16:14:42 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-137.brq.redhat.com [10.40.204.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 021C9608C1 for ; Mon, 5 Aug 2019 16:14:41 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 5 Aug 2019 18:14:25 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/5] qemu: Use FW descriptors to report FW image paths X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 05 Aug 2019 16:14:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Now that we have qemuFirmwareGetSupported() so that it also returns a list of FW image paths, we can use it to report them in domain capabilities instead of the old time default list. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1733940 Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index db1fc31cd9..318cfcebf3 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5161,12 +5161,16 @@ virQEMUCapsFillDomainOSCaps(virDomainCapsOSPtr os, virDomainCapsLoaderPtr capsLoader =3D &os->loader; uint64_t autoFirmwares =3D 0; bool secure =3D false; + virFirmwarePtr *firmwaresAlt =3D NULL; + size_t nfirmwaresAlt =3D 0; + int ret =3D -1; =20 os->supported =3D VIR_TRISTATE_BOOL_YES; os->firmware.report =3D true; =20 if (qemuFirmwareGetSupported(machine, arch, privileged, - &autoFirmwares, &secure, NULL, NULL) < 0) + &autoFirmwares, &secure, + &firmwaresAlt, &nfirmwaresAlt) < 0) return -1; =20 if (autoFirmwares & (1ULL << VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS)) @@ -5174,9 +5178,15 @@ virQEMUCapsFillDomainOSCaps(virDomainCapsOSPtr os, if (autoFirmwares & (1ULL << VIR_DOMAIN_OS_DEF_FIRMWARE_EFI)) VIR_DOMAIN_CAPS_ENUM_SET(os->firmware, VIR_DOMAIN_OS_DEF_FIRMWARE_= EFI); =20 - if (virQEMUCapsFillDomainLoaderCaps(capsLoader, secure, firmwares, nfi= rmwares) < 0) - return -1; - return 0; + if (virQEMUCapsFillDomainLoaderCaps(capsLoader, secure, + firmwaresAlt ? firmwaresAlt : firm= wares, + firmwaresAlt ? nfirmwaresAlt : nfi= rmwares) < 0) + goto cleanup; + + ret =3D 0; + cleanup: + virFirmwareFreeList(firmwaresAlt, nfirmwaresAlt); + return ret; } =20 =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list