summaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-09-12 15:10:53 -0300
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-04 11:02:57 -0300
commit292a26027c8567556795dde771e46d87306bd013 (patch)
treed74f603eb11c7a9b5c59d7cf7a398b87dea66e75 /qmp.c
parentb9c15f16d702306aeb984f30490cddb8b418a231 (diff)
qapi: Convert query-kvm
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/qmp.c b/qmp.c
index f978ea4240..8f7f666bbf 100644
--- a/qmp.c
+++ b/qmp.c
@@ -14,6 +14,8 @@
#include "qemu-common.h"
#include "sysemu.h"
#include "qmp-commands.h"
+#include "kvm.h"
+#include "arch_init.h"
NameInfo *qmp_query_name(Error **errp)
{
@@ -42,3 +44,14 @@ VersionInfo *qmp_query_version(Error **err)
return info;
}
+
+KvmInfo *qmp_query_kvm(Error **errp)
+{
+ KvmInfo *info = g_malloc0(sizeof(*info));
+
+ info->enabled = kvm_enabled();
+ info->present = kvm_available();
+
+ return info;
+}
+