]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Relax os.loader->type check when validating domain
authorMichal Privoznik <mprivozn@redhat.com>
Sat, 13 Jul 2019 07:17:06 +0000 (09:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 15 Jul 2019 11:24:09 +0000 (13:24 +0200)
commit7711a7346a990810603c0715d3c6ba922eb88c51
tree65a43b65e3b9bee5d6c79a8e179af4692443fc8b
parent35e3069ce481d6d9fc54917b30a0f6ea7880608a
qemu: Relax os.loader->type check when validating domain

When validating a domain among all the checks there are two that
concern VIR_DOMAIN_LOADER_TYPE_PFLASH specifically. The first
check ensures that on x86 ACPI is enabled when UEFI is requested,
the second ensures that UEFI is used when ACPI is requested on
aarch64. However, check for UEFI is done by plain comparison of
def->os.loader->type which is insufficient because we have
def->os.firmware too.

NB, this wouldn't be a problem for active domain, because on
startup process def->os.loader->type gets filled by
qemuFirmwareEnableFeatures(), but that's not the case for
inactive domains.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1729604
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/aarch64-os-firmware-efi.aarch64-latest.args
tests/qemuxml2argvdata/aarch64-os-firmware-efi.xml
tests/qemuxml2xmloutdata/aarch64-os-firmware-efi.aarch64-latest.xml