Signed-off-by: Tobin Feldman-Fitzthum <tobin(a)linux.vnet.ibm.com>
---
src/qemu/qemu_capabilities.c | 14 ++++++++++++++
src/qemu/qemu_capabilities.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 0371ca9b03..9c946339a3 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4956,6 +4956,20 @@ virQEMUCapsProbeQMPSchemaCapabilities(virQEMUCapsPtr qemuCaps,
#define QEMU_MIN_MINOR 5
#define QEMU_MIN_MICRO 0
+virDomainVirtType
+virQEMUCapsGetVirtType(virQEMUCapsPtr qemuCaps)
+{
+ virDomainVirtType type;
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
+ type = VIR_DOMAIN_VIRT_KVM;
+ else if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_TCG_DISABLED))
+ type = VIR_DOMAIN_VIRT_QEMU;
+ else
+ type = VIR_DOMAIN_VIRT_NONE;
+
+ return type;
+}
+
int
virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
qemuMonitorPtr mon)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 372806f585..aa73c7c6e1 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -630,6 +630,8 @@ int virQEMUCapsGetCPUFeatures(virQEMUCapsPtr qemuCaps,
bool migratable,
char ***features);
+virDomainVirtType virQEMUCapsGetVirtType(virQEMUCapsPtr qemuCaps);
+
bool virQEMUCapsIsArchSupported(virQEMUCapsPtr qemuCaps,
virArch arch);
bool virQEMUCapsIsVirtTypeSupported(virQEMUCapsPtr qemuCaps,
--
2.20.1 (Apple Git-117)