]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuFirmwareMatchDomain: Don't base firmware selection on nvram image format
authorPeter Krempa <pkrempa@redhat.com>
Tue, 20 Aug 2024 14:15:05 +0000 (16:15 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 15 Nov 2024 08:42:04 +0000 (09:42 +0100)
Basing the selection on the format of the actual NVRAM image makes no
sense as user may format the image themselves.

Additionally it doesn't make much sense to even limit the firmware
selection based on the nvram template itself. As format of the template
is given and firmware images don't really provide any choice.

Remove the limitation so that autoselection can pick a template
regardless of the selected format or template format.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_firmware.c

index d9d21b47711e2fc08222f5ba2e83eb2e828b921c..2d0ec0b4fa228a0bdf996a4301b203f593a28ee0 100644 (file)
@@ -1332,13 +1332,6 @@ qemuFirmwareMatchDomain(const virDomainDef *def,
                           flash->nvram_template.format);
                 return false;
             }
-            if (loader && loader->nvram && loader->nvram->format &&
-                STRNEQ(flash->nvram_template.format, virStorageFileFormatTypeToString(loader->nvram->format))) {
-                VIR_DEBUG("Discarding loader with mismatching nvram template format '%s' != '%s'",
-                          flash->nvram_template.format,
-                          virStorageFileFormatTypeToString(loader->nvram->format));
-                return false;
-            }
         }
     } else if (fw->mapping.device == QEMU_FIRMWARE_DEVICE_MEMORY) {
         if (loader && loader->type &&