For combined firmware builds, the variable storage is part of the same image as the executable code, whereas stateless builds don't support variable storage at all.
In both cases, the use of a separate NVRAM storage area is not supported, so if attributes connected to one are present in the domain XML, firmware descriptors for stateless/combined builds should be ignored. ROM firmware builds are stateless by definition, so the same handling applies to them as well. Signed-off-by: Andrea Bolognani <[email protected]> --- src/qemu/qemu_firmware.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index a22853361b..47a3987b64 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1285,6 +1285,17 @@ qemuFirmwareMatchDomain(const virDomainDef *def, flash->nvram_template.format); return false; } + } else { + if (loader && loader->nvram && + (loader->nvram->path || loader->nvram->format)) { + VIR_DEBUG("Discarding non split loader (nvram configured)"); + return false; + } + if (loader && + (loader->nvramTemplate || loader->nvramTemplateFormat)) { + VIR_DEBUG("Discarding non split loader (nvram template configured)"); + return false; + } } } else if (fw->mapping.device == QEMU_FIRMWARE_DEVICE_MEMORY) { if (loader && loader->type && @@ -1302,6 +1313,17 @@ qemuFirmwareMatchDomain(const virDomainDef *def, VIR_DEBUG("Discarding readonly loader"); return false; } + + if (loader && loader->nvram && + (loader->nvram->path || loader->nvram->format)) { + VIR_DEBUG("Discarding rom loader (nvram configured)"); + return false; + } + if (loader && + (loader->nvramTemplate || loader->nvramTemplateFormat)) { + VIR_DEBUG("Discarding rom loader (nvram template configured)"); + return false; + } } if (def->sec) { -- 2.52.0
