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 61123f0e63..0b44ee0745 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4957,6 +4957,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)