Probe for TCG with QMP right after probing for KVM. Signed-off-by: Tobin Feldman-Fitzthum <tobin@xxxxxxxxxxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 528bf6e504..b3ba1cb079 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5046,12 +5046,10 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, /* Some capabilities may differ depending on KVM state */ if (virQEMUCapsProbeQMPKVMState(qemuCaps, mon) < 0) return -1; + if (virQEMUCapsProbeQMPTCGState(qemuCaps, mon) < 0) + return -1; - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) - type = VIR_DOMAIN_VIRT_KVM; - else - type = VIR_DOMAIN_VIRT_QEMU; - + type = virQEMUCapsGetVirtType(qemuCaps); accel = virQEMUCapsGetAccel(qemuCaps, type); if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0) @@ -5544,10 +5542,7 @@ virQEMUCapsCacheLookupDefault(virFileCachePtr cache, goto cleanup; } - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) - capsType = VIR_DOMAIN_VIRT_KVM; - else - capsType = VIR_DOMAIN_VIRT_QEMU; + capsType = virQEMUCapsGetVirtType(qemuCaps); if (virttype == VIR_DOMAIN_VIRT_NONE) virttype = capsType; -- 2.20.1 (Apple Git-117)