]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Assume QEMU_CAPS_FW_CFG
authorPeter Krempa <pkrempa@redhat.com>
Mon, 20 Sep 2021 15:04:33 +0000 (17:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 21 Sep 2021 10:26:08 +0000 (12:26 +0200)
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 <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_validate.c
tests/qemuxml2argvtest.c
tests/qemuxml2xmltest.c

index 5db7832a1a4fa954d257ef1916cfc1fcaced684e..4fc344b493cd1fe81c0a1dde7b92c3249f6603ca 100644 (file)
@@ -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 == 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 = 0; i < def->nfw_cfgs; i++) {
         const virSysinfoFWCfgDef *f = &def->fw_cfgs[i];
 
@@ -1239,7 +1231,7 @@ qemuValidateDomainDef(const virDomainDef *def,
     }
 
     for (i = 0; i < def->nsysinfo; i++) {
-        if (qemuValidateDomainDefSysinfo(def->sysinfo[i], qemuCaps) < 0)
+        if (qemuValidateDomainDefSysinfo(def->sysinfo[i]) < 0)
             return -1;
     }
 
index 1d262c23c1a0078cb548a084b765b378e51c468c..18b7b0ecf16d6c3564a547f545a6046e06482a7f 100644 (file)
@@ -1863,7 +1863,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");
index f9d20242fc3b43877e50a05892e5fc974eac75c9..59d1e2428900addd9e0f6e5bc52435debbc65212 100644 (file)
@@ -1107,7 +1107,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_IVSHMEM_PLAIN, QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL);
     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");