Probe for TCG with QMP right after probing for KVM.
Signed-off-by: Tobin Feldman-Fitzthum <tobin(a)linux.vnet.ibm.com>
---
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 9abc6e80e7..fa3084484d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5073,12 +5073,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)
@@ -5571,10 +5569,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)