#include "hw/pcmcia.h"
#include "hw/pc.h"
#include "hw/pci.h"
+#include "hw/watchdog.h"
#include "gdbstub.h"
#include "net.h"
#include "qemu-char.h"
static void do_info_version(Monitor *mon)
{
- monitor_printf(mon, "%s\n", QEMU_VERSION);
+ monitor_printf(mon, "%s\n", QEMU_VERSION QEMU_PKGVERSION);
}
static void do_info_name(Monitor *mon)
cpu_set_log(mask);
}
+static void do_singlestep(Monitor *mon, const char *option)
+{
+ if (!option || !strcmp(option, "on")) {
+ singlestep = 1;
+ } else if (!strcmp(option, "off")) {
+ singlestep = 0;
+ } else {
+ monitor_printf(mon, "unexpected option %s\n", option);
+ }
+}
+
static void do_stop(Monitor *mon)
{
vm_stop(EXCP_INTERRUPT);
}
#endif
+static void do_watchdog_action(Monitor *mon, const char *action)
+{
+ if (select_watchdog_action(action) == -1) {
+ monitor_printf(mon, "Unknown watchdog action '%s'\n", action);
+ }
+}
+
static void monitor_printc(Monitor *mon, int c)
{
monitor_printf(mon, "'");
static void do_info_kqemu(Monitor *mon)
{
-#ifdef USE_KQEMU
+#ifdef CONFIG_KQEMU
CPUState *env;
int val;
val = 0;
#endif
}
+static void do_info_numa(Monitor *mon)
+{
+ int i;
+ CPUState *env;
+
+ monitor_printf(mon, "%d nodes\n", nb_numa_nodes);
+ for (i = 0; i < nb_numa_nodes; i++) {
+ monitor_printf(mon, "node %d cpus:", i);
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
+ if (env->numa_node == i) {
+ monitor_printf(mon, " %d", env->cpu_index);
+ }
+ }
+ monitor_printf(mon, "\n");
+ monitor_printf(mon, "node %d size: %" PRId64 " MB\n", i,
+ node_mem[i] >> 20);
+ }
+}
+
#ifdef CONFIG_PROFILER
int64_t kqemu_time;
kqemu_ret_int_count = 0;
kqemu_ret_excp_count = 0;
kqemu_ret_intr_count = 0;
-#ifdef USE_KQEMU
+#ifdef CONFIG_KQEMU
kqemu_record_dump();
#endif
}
static void do_info_status(Monitor *mon)
{
- if (vm_running)
- monitor_printf(mon, "VM status: running\n");
- else
+ if (vm_running) {
+ if (singlestep) {
+ monitor_printf(mon, "VM status: running (single step mode)\n");
+ } else {
+ monitor_printf(mon, "VM status: running\n");
+ }
+ } else
monitor_printf(mon, "VM status: paused\n");
}
{ "commit", "s", do_commit,
"device|all", "commit changes to the disk images (if -snapshot is used) or backing files" },
{ "info", "s?", do_info,
- "subcommand", "show various information about the system state" },
+ "[subcommand]", "show various information about the system state" },
{ "q|quit", "", do_quit,
"", "quit the emulator" },
{ "eject", "-fB", do_eject,
{ "log", "s", do_log,
"item1[,...]", "activate logging of the specified items to '/tmp/qemu.log'" },
{ "savevm", "s?", do_savevm,
- "tag|id", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
+ "[tag|id]", "save a VM snapshot. If no tag or id are provided, a new snapshot is created" },
{ "loadvm", "s", do_loadvm,
"tag|id", "restore a VM snapshot from its tag or id" },
{ "delvm", "s", do_delvm,
"tag|id", "delete a VM snapshot from its tag or id" },
+ { "singlestep", "s?", do_singlestep,
+ "[on|off]", "run emulation in singlestep mode or switch to normal mode", },
{ "stop", "", do_stop,
"", "stop emulation", },
{ "c|cont", "", do_cont,
"", "resume emulation", },
#ifdef CONFIG_GDBSTUB
{ "gdbserver", "s?", do_gdbserver,
- "[port]", "start gdbserver session (default port=1234)", },
+ "[device]", "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", },
#endif
{ "x", "/l", do_memory_dump,
"/fmt addr", "virtual memory dump starting at 'addr'", },
"index", "set which mouse device receives events" },
#ifdef HAS_AUDIO
{ "wavcapture", "si?i?i?", do_wav_capture,
- "path [frequency bits channels]",
+ "path [frequency [bits [channels]]]",
"capture audio to a wave file (default frequency=44100 bits=16 channels=2)" },
#endif
{ "stopcapture", "i", do_stop_capture,
"add drive to PCI storage controller" },
{ "pci_add", "sss", pci_device_hot_add, "pci_addr=auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
{ "pci_del", "s", pci_device_hot_remove, "pci_addr=[[<domain>:]<bus>:]<slot>", "hot remove PCI device" },
- { "host_net_add", "ss", net_host_device_add,
- "[tap,user,socket,vde] options", "add host VLAN client" },
+#endif
+ { "host_net_add", "ss?", net_host_device_add,
+ "tap|user|socket|vde|dump [options]", "add host VLAN client" },
{ "host_net_remove", "is", net_host_device_remove,
"vlan_id name", "remove host VLAN client" },
+#ifdef CONFIG_SLIRP
+ { "host_net_redir", "s", net_slirp_redir,
+ "[tcp|udp]:host-port:[guest-host]:guest-port", "redirect TCP or UDP connections from host to guest (requires -net user)" },
#endif
{ "balloon", "i", do_balloon,
"target", "request VM to change it's memory allocation (in MB)" },
{ "set_link", "ss", do_set_link,
- "name [up|down]", "change the link status of a network adapter" },
- { "acl", "sss?i?", do_acl, "<command> <aclname> [<match>] [<index>]\n",
+ "name up|down", "change the link status of a network adapter" },
+ { "watchdog_action", "s", do_watchdog_action,
+ "[reset|shutdown|poweroff|pause|debug|none]", "change watchdog action" },
+ { "acl", "sss?i?", do_acl, "<command> <aclname> [<match> [<index>]]\n",
"acl show vnc.username\n"
"acl policy vnc.username deny\n"
"acl allow vnc.username fred\n"
"", "show KQEMU information", },
{ "kvm", "", do_info_kvm,
"", "show KVM information", },
+ { "numa", "", do_info_numa,
+ "", "show NUMA information", },
{ "usb", "", usb_info,
"", "show guest USB devices", },
{ "usbhost", "", usb_host_info,