]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: capabilities: Fix testing of 'TCG' capabilities probing
authorPeter Krempa <pkrempa@redhat.com>
Wed, 8 Mar 2023 17:58:51 +0000 (18:58 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Apr 2023 07:19:06 +0000 (09:19 +0200)
commit111cfc5532596366bf6dc37d4a94333059522a0e
treef5455fb94fddbcad865d342ce575e891bc1043d5
parent738c5bae888cfa72ed359899cf1a41fed9dbb0f5
qemu: capabilities: Fix testing of 'TCG' capabilities probing

The logic in 'virQEMUCapsInitQMP' invokes a second probe of qemu in case
when acceleration is used and TCG is supported to specifically probe the
CPU and features of non-accelerated guests.

The same logic must then be used in 'qemucapabilitiestest' when
replaying the data for testing otherwise the test would fail.

Export 'virQEMUCapsHaveAccel' for test usage and use the same logic
in 'testQemuCaps'.

Fix the comment in 'virQEMUCapsInitQMP' to outline what's happening.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capspriv.h
tests/qemucapabilitiestest.c