]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: validate: treat only real backing chains as NVRAM backingStore
authorFima Shevrin <efim.shevrin@virtuozzo.com>
Fri, 22 May 2026 15:49:27 +0000 (15:49 +0000)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 10 Jun 2026 09:16:13 +0000 (11:16 +0200)
qemuDomainInitializePflashStorageSource() always attaches a non-NULL
src->backingStore used as an empty virStorageSource chain terminator
(type VIR_STORAGE_TYPE_NONE). qemuValidateDomainDefNvram() incorrectly
interpreted every non-NULL backingStore as a genuine backing overlay and
reported VIR_ERR_CONFIG_UNSUPPORTED, so legitimate UEFI/NVRAM setups were
rejected.

Use 'virStorageSourceHasBacking' helper as the check.

Fixes: d57630c282ae7220d8998f74b7e4fec21841797f
Signed-off-by: Fima Shevrin <efim.shevrin@virtuozzo.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_validate.c

index 642244b62ee779c4901acc2fddaadd3038dac7c0..82ef761fb846998184ba952f982c1844c03e2bb3 100644 (file)
@@ -740,7 +740,7 @@ qemuValidateDomainDefNvram(const virDomainDef *def,
         return -1;
     }
 
-    if (src->backingStore) {
+    if (virStorageSourceHasBacking(src)) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                         _("backingStore is not supported with NVRAM"));
         return -1;