[PATCH] qemu: softfail for TCG capabilities probe

Ján Tomko jtomko at redhat.com
Tue Mar 24 16:25:45 UTC 2020


[please wrap the lines to something sensible like 72 columns,
especially in the commit message]

On a Monday in 2020, Tobin Feldman-Fitzthum wrote:
>As of version 2.10, QEMU can be built without the TCG. When libvirt
>determines that capabilities of a QEMU binary using QMP, it launches a
>QEMU process with KVM acceleration and TCG as a fallback. If QEMU
>supports KVM, a second probe is performed, forcing QEMU to use only
>TCG. This causes an error if the QEMU binary was built without TCG.

>This patch allows execution to continue when the second probe fails.
>Thus libvirt can be used with QEMU built without TCG.

The second probe can fail for other reasons so ideally we would not even
call it if we know TCG is unsupported.

grep'ing through collected capabilitiesdata replies shows that since
2.10.0 the "qom-list-types" command shows two new 'types':
kvm-accel and tcg-accel

So we could introduce QEMU_CAPS_TCG, that would be set to true if
tcg-accel is present, or none of them are (to account for QEMU's earlier
than 2.10 - libvirt currently supports QEMUs back to 1.5.0)

>First patch.
>Feedback appreciated. If better solution, please advise.
>

Messages like this should not be in the git history, you can put them
under the three dashes below:

>Signed-off-by: Tobin Feldman-Fitzthum <tobin at linux.vnet.ibm.com>
>---
> src/qemu/qemu_capabilities.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200324/75d78e3a/attachment-0001.sig>


More information about the libvir-list mailing list