It's possible to have firmware descriptors for builds intended to
be loaded as ROM, as is the case for those loaded as pflash.
There is no reason to skip firmware autoselection in those cases,
and doing so prevents useful information from being filled in.
After this change, the firmware-manual-efi-tdx test case is
augmented with some additional information. Even more information
will be filled in later, when we improve the matching logic.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
return -1;
}
- /* If firmware autoselection is disabled and the loader is a ROM
- * instead of a PFLASH device, then we're using BIOS and we don't
- * need any information at all */
- if (!autoSelection &&
- (!loader || (loader && loader->type == VIR_DOMAIN_LOADER_TYPE_ROM))) {
+ /* If firmware autoselection is disabled and no information
+ * related to the loader was provided, then we're using the
+ * default built-in firmware and we can stop here */
+ if (!autoSelection && !loader)
return 0;
- }
/* Look for the information we need in firmware descriptors */
if ((ret = qemuFirmwareFillDomainModern(driver, def)) < 0)
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
- <loader readonly='yes' type='rom'>/usr/share/edk2/ovmf/OVMF.inteltdx.secboot.fd</loader>
+ <loader readonly='yes' type='rom' format='raw'>/usr/share/edk2/ovmf/OVMF.inteltdx.secboot.fd</loader>
<boot dev='hd'/>
</os>
<features>