diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-21 22:30:47 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-21 22:30:47 +0000 |
commit | 030ea37b4898005fa2bc8ccaf2dd22368602b78f (patch) | |
tree | 0bcbd1509f3a40113fa0c6b2e3de586241684d7e /monitor.c | |
parent | 268a362c63dcd89754566b4e04c8311847c7eabb (diff) | |
download | qemu-030ea37b4898005fa2bc8ccaf2dd22368602b78f.zip |
add info numa command to monitor (Andre Przywara)
adds an "info numa" command to the monitor to output the current
topology. Since NUMA is advertised via static ACPI tables, no changes are
possible during runtime.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7211 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -1409,6 +1409,25 @@ static void do_info_kvm(Monitor *mon) #endif } +static void do_info_numa(Monitor *mon) +{ + int i, j; + 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; @@ -1792,6 +1811,8 @@ static const mon_cmd_t info_cmds[] = { "", "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, |