[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@xxxxxxxxxxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
Jano
Attachment:
signature.asc
Description: PGP signature