summaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
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);
+}
+