#include "disas.h"
#include <dirent.h>
#include "qemu-timer.h"
+#include "migration.h"
+#include "kvm.h"
//#define DEBUG
//#define DEBUG_COMPLETION
static void monitor_start_input(void);
-CPUState *mon_cpu = NULL;
+static CPUState *mon_cpu = NULL;
void term_flush(void)
{
#endif
}
+static void do_info_kvm(void)
+{
+#ifdef CONFIG_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;
{ "nmi", "i", do_inject_nmi,
"cpu", "inject an NMI on the given CPU", },
#endif
+ { "migrate", "-ds", do_migrate,
+ "[-d] uri", "migrate to URI (using -d to not wait for completion)" },
+ { "migrate_cancel", "", do_migrate_cancel,
+ "", "cancel the current VM migration" },
+ { "migrate_set_speed", "s", do_migrate_set_speed,
+ "value", "set maximum speed (in bytes) for migrations" },
{ NULL, NULL, },
};
"", "show the version of qemu" },
{ "network", "", do_info_network,
"", "show the network state" },
+ { "chardev", "", qemu_chr_info,
+ "", "show the character devices" },
{ "block", "", do_info_block,
"", "show the block devices" },
{ "blockstats", "", do_info_blockstats,
"", "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,
{ "slirp", "", do_info_slirp,
"", "show SLIRP statistics", },
#endif
+ { "migrate", "", do_info_migrate, "", "show migration status" },
{ NULL, NULL, },
};
CPUState *env = mon_get_cpu();
if (!env)
return 0;
- return ppc_load_xer(env);
+ return env->xer;
}
static target_long monitor_get_decr (const struct MonitorDef *md, int val)
readline_handle_byte(buf[i]);
}
+static int monitor_suspended;
+
static void monitor_handle_command1(void *opaque, const char *cmdline)
{
monitor_handle_command(cmdline);
- monitor_start_input();
+ if (!monitor_suspended)
+ monitor_start_input();
+ else
+ monitor_suspended = 2;
+}
+
+void monitor_suspend(void)
+{
+ monitor_suspended = 1;
+}
+
+void monitor_resume(void)
+{
+ if (monitor_suspended == 2)
+ monitor_start_input();
+ monitor_suspended = 0;
}
static void monitor_start_input(void)