]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: validate: Fix logic for validating presence of the HPET timer
authorPeter Krempa <pkrempa@redhat.com>
Mon, 6 Mar 2023 14:38:15 +0000 (15:38 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 7 Mar 2023 11:26:32 +0000 (12:26 +0100)
commit4ee4809907e63e83db032b5f90261f51ec864aa9
tree4f9bb414e1a2ac3b7029117583806232f48141b0
parent9fecdaf1c80f8fb4390c77b4d353ad07ba77c87a
qemu: validate: Fix logic for validating presence of the HPET timer

Commit 24cc9cda826 switched over to use -machine hpet, but one of the
steps it did was to clear the QEMU_CAPS_NO_HPET capability.

The validation check still uses the old capability though which means
that for configs which would explicitly enable HPET we'd report an error.

Since HPET is an x86(_64) platform specific device, convert the
validation check to an architecture check as all supported qemu versions
actually support it.

Modify a test case to request HPET to catch posible future problems.

Fixes: 24cc9cda826
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_validate.c
tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
tests/qemuxml2argvdata/q35-virt-manager-basic.xml
tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml