Add an 'info kvm' command to the monitor to be used to determine if KVM is
active.  It's very similar to the existing 'info kqemu' command.

Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>

diff --git a/qemu/monitor.c b/qemu/monitor.c
index 46d5998..20dcca6 100644
--- a/qemu/monitor.c
+++ b/qemu/monitor.c
@@ -1272,6 +1272,19 @@ static void do_info_kqemu(void)
 #endif
 }
 
+static void do_info_kvm(void)
+{
+#ifdef USE_KVM
+    term_printf("kvm support: ");
+    if (kvm_enabled())
+       term_printf("enabled\n");
+    else
+       term_printf("disabled\n");
+#else
+    term_printf("kvm support: not compiled\n");
+#endif
+}
+
 #ifdef CONFIG_PROFILER
 
 int64_t kqemu_time;
@@ -1517,6 +1530,8 @@ static term_cmd_t info_cmds[] = {
       "", "show dynamic compiler info", },
     { "kqemu", "", do_info_kqemu,
       "", "show kqemu information", },
+    { "kvm", "", do_info_kvm,
+      "", "show kvm information", },
     { "usb", "", usb_info,
       "", "show guest USB devices", },
     { "usbhost", "", usb_host_info,
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to