From nobody Mon Feb 9 08:05:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1632151881; cv=none; d=zohomail.com; s=zohoarc; b=RP4vKpcn+gTlshXR+h8ccmfFMJ/mTuLu/8iwpdHo1VMlXSlChTBN52DIiMwk3fF0lqNZLXX/JgUUXw31lpnmydo5MJMkn5WZsqj9kxPkxZRZZhf2hDwO9JMqdEmMmlIteSDwbvksnnGb8qIILT9KOR2F8f8T1cgPNVVVKMHqlyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632151881; 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; bh=ihzG1lMaPYvmasreSz3fc1PfOBSJujOsh9M3dB7XN6c=; b=AA6Jy9pysmLf+V8iLSg2R9KXFjZJitR7IdgPPI2Ba5BPIdbJz2w4iOFPvzKib8Abkk9ZHnB6Qpj8vqEU3TuCa7JuaHV4k2Hr6d768q8bXZr0ICftvvMYTWvoAz8SvAR13l72TZJlnxY4wQH7agQmH4s0x9lz7c60qv7RgC68bdQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 163215188197964.34108786184629; Mon, 20 Sep 2021 08:31:21 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-517-6tRUvieaOi6SBvflRNM0uA-1; Mon, 20 Sep 2021 11:31:19 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51492101F001; Mon, 20 Sep 2021 15:31:13 +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 340116D98E; Mon, 20 Sep 2021 15:31:13 +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 EF6E04EA3B; Mon, 20 Sep 2021 15:31:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 18KFVAqI017757 for ; Mon, 20 Sep 2021 11:31:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 5554F60C5F; Mon, 20 Sep 2021 15:31:10 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EB4260C4A for ; Mon, 20 Sep 2021 15:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632151881; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ihzG1lMaPYvmasreSz3fc1PfOBSJujOsh9M3dB7XN6c=; b=fyzu0vF5OSRuMZTDGc71570hyeUOvqkHND++S+BFXz9Z5cEIzf9scz5b2QaBhIeq0g/48i xUmUq1CxTYL7vj/JvaOEzCbEZKy70zutvmMpx/QWu5zYJFUZOiUmcs+TYhQLWtus1VBzmo bVz6VD2BAPu23XFLfrbNsczL68XvNdg= X-MC-Unique: 6tRUvieaOi6SBvflRNM0uA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/14] qemu: Assume QEMU_CAPS_FW_CFG Date: Mon, 20 Sep 2021 17:29:35 +0200 Message-Id: <981293a219b544b0c0b54e8deda47e3c48315371.1632151607.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1632151884025100001 Content-Type: text/plain; charset="utf-8" qemu supports this since 81b2b81062 ("fw_cfg: insert fw_cfg file blobs via qemu cmdline") released in qemu-v2.4.0 and it can't be compiled out. Assume that the option always works and remove the corresponding check. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 12 ++---------- tests/qemuxml2argvtest.c | 2 +- tests/qemuxml2xmltest.c | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index c4b7269589..c94a4b2eb3 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -886,18 +886,10 @@ qemuValidateDomainDefConsole(const virDomainDef *def, static int -qemuValidateDomainDefSysinfo(const virSysinfoDef *def, - virQEMUCaps *qemuCaps) +qemuValidateDomainDefSysinfo(const virSysinfoDef *def) { size_t i; - if (def->type =3D=3D VIR_SYSINFO_FWCFG && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_FW_CFG)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("fw_cfg is not supported with this QEMU")); - return -1; - } - for (i =3D 0; i < def->nfw_cfgs; i++) { const virSysinfoFWCfgDef *f =3D &def->fw_cfgs[i]; @@ -1239,7 +1231,7 @@ qemuValidateDomainDef(const virDomainDef *def, } for (i =3D 0; i < def->nsysinfo; i++) { - if (qemuValidateDomainDefSysinfo(def->sysinfo[i], qemuCaps) < 0) + if (qemuValidateDomainDefSysinfo(def->sysinfo[i]) < 0) return -1; } diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 77e384f67c..947f73e78e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1864,7 +1864,7 @@ mymain(void) DO_TEST_NOCAPS("smbios"); DO_TEST_PARSE_ERROR_NOCAPS("smbios-date"); DO_TEST_PARSE_ERROR_NOCAPS("smbios-uuid-match"); - DO_TEST("smbios-type-fwcfg", QEMU_CAPS_FW_CFG); + DO_TEST_NOCAPS("smbios-type-fwcfg"); DO_TEST_NOCAPS("watchdog"); DO_TEST_NOCAPS("watchdog-device"); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 05cb87bbd1..147a00d03f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1107,7 +1107,7 @@ mymain(void) QEMU_CAPS_DEVICE_IVSHMEM_PLAIN, QEMU_CAPS_DEVICE_IVSHMEM_DOORB= ELL); DO_TEST_NOCAPS("smbios"); DO_TEST_NOCAPS("smbios-multiple-type2"); - DO_TEST("smbios-type-fwcfg", QEMU_CAPS_FW_CFG); + DO_TEST_NOCAPS("smbios-type-fwcfg"); DO_TEST_CAPS_LATEST("os-firmware-bios"); DO_TEST_CAPS_LATEST("os-firmware-efi"); --=20 2.31.1