aboutsummaryrefslogtreecommitdiff
path: root/hmp.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 /hmp.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 'hmp.c')
-rw-r--r--hmp.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/hmp.c b/hmp.c
index bb6c86f259..94a7f74483 100644
--- a/hmp.c
+++ b/hmp.c
@@ -37,3 +37,19 @@ void hmp_info_version(Monitor *mon)
qapi_free_VersionInfo(info);
}
+
+void hmp_info_kvm(Monitor *mon)
+{
+ KvmInfo *info;
+
+ info = qmp_query_kvm(NULL);
+ monitor_printf(mon, "kvm support: ");
+ if (info->present) {
+ monitor_printf(mon, "%s\n", info->enabled ? "enabled" : "disabled");
+ } else {
+ monitor_printf(mon, "not compiled\n");
+ }
+
+ qapi_free_KvmInfo(info);
+}
+