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 <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
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 &&
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) {