diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 188d9ece3b..e012035541 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -100,9 +100,11 @@ ERST { .name = "registers", - .args_type = "cpustate_all:-a", - .params = "[-a]", - .help = "show the cpu registers (-a: all - show register info for all cpus)", + .args_type = "cpustate_all:-a,vcpu:i?", + .params = "[-a|vcpu]", + .help = "show the cpu registers (-a: show register info for all cpus;" + " vcpu: specific vCPU to query; show the current CPU's registers if" + " no argument is specified)", .cmd = hmp_info_registers, }, diff --git a/hmp-commands.hx b/hmp-commands.hx index 182e639d14..8ab8000acd 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1742,23 +1742,6 @@ SRST *icount* for the reference may be observed with ``info replay`` command. ERST - { - .name = "info", - .args_type = "item:s?", - .params = "[subcommand]", - .help = "show various information about the system state", - .cmd = hmp_info_help, - .sub_table = hmp_info_cmds, - .flags = "p", - }, - -SRST -``calc_dirty_rate`` *second* - Start a round of dirty rate measurement with the period specified in *second*. - The result of the dirty rate measurement may be observed with ``info - dirty_rate`` command. -ERST - { .name = "calc_dirty_rate", .args_type = "dirty_ring:-r,dirty_bitmap:-b,second:l,sample_pages_per_GB:l?", @@ -1770,10 +1753,10 @@ ERST }, SRST -``set_vcpu_dirty_limit`` - Set dirty page rate limit on virtual CPU, the information about all the - virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit`` - command. +``calc_dirty_rate`` *second* + Start a round of dirty rate measurement with the period specified in *second*. + The result of the dirty rate measurement may be observed with ``info + dirty_rate`` command. ERST { @@ -1786,8 +1769,8 @@ ERST }, SRST -``cancel_vcpu_dirty_limit`` - Cancel dirty page rate limit on virtual CPU, the information about all the +``set_vcpu_dirty_limit`` + Set dirty page rate limit on virtual CPU, the information about all the virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit`` command. ERST @@ -1800,3 +1783,20 @@ ERST "\n\t\t\t\t\t limit on a specified virtual cpu", .cmd = hmp_cancel_vcpu_dirty_limit, }, + +SRST +``cancel_vcpu_dirty_limit`` + Cancel dirty page rate limit on virtual CPU, the information about all the + virtual CPU dirty limit status can be observed with ``info vcpu_dirty_limit`` + command. +ERST + + { + .name = "info", + .args_type = "item:s?", + .params = "[subcommand]", + .help = "show various information about the system state", + .cmd = hmp_info_help, + .sub_table = hmp_info_cmds, + .flags = "p", + }, diff --git a/monitor/hmp.c b/monitor/hmp.c index 15ca04735c..a3375d0341 100644 --- a/monitor/hmp.c +++ b/monitor/hmp.c @@ -285,10 +285,15 @@ void help_cmd(Monitor *mon, const char *name) if (!strcmp(name, "log")) { const QEMULogItem *item; monitor_printf(mon, "Log items (comma separated):\n"); - monitor_printf(mon, "%-10s %s\n", "none", "remove all logs"); + monitor_printf(mon, "%-15s %s\n", "none", "remove all logs"); for (item = qemu_log_items; item->mask != 0; item++) { - monitor_printf(mon, "%-10s %s\n", item->name, item->help); + monitor_printf(mon, "%-15s %s\n", item->name, item->help); } +#ifdef CONFIG_TRACE_LOG + monitor_printf(mon, "trace:PATTERN enable trace events\n"); + monitor_printf(mon, "\nUse \"log trace:help\" to get a list of " + "trace events.\n\n"); +#endif return; } diff --git a/monitor/misc.c b/monitor/misc.c index 3d2312ba8d..6436a8786b 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -307,6 +307,7 @@ int monitor_get_cpu_index(Monitor *mon) static void hmp_info_registers(Monitor *mon, const QDict *qdict) { bool all_cpus = qdict_get_try_bool(qdict, "cpustate_all", false); + int vcpu = qdict_get_try_int(qdict, "vcpu", -1); CPUState *cs; if (all_cpus) { @@ -315,13 +316,18 @@ static void hmp_info_registers(Monitor *mon, const QDict *qdict) cpu_dump_state(cs, NULL, CPU_DUMP_FPU); } } else { - cs = mon_get_cpu(mon); + cs = vcpu >= 0 ? qemu_get_cpu(vcpu) : mon_get_cpu(mon); if (!cs) { - monitor_printf(mon, "No CPU available\n"); + if (vcpu >= 0) { + monitor_printf(mon, "CPU#%d not available\n", vcpu); + } else { + monitor_printf(mon, "No CPU available\n"); + } return; } + monitor_printf(mon, "\nCPU#%d\n", cs->cpu_index); cpu_dump_state(cs, NULL, CPU_DUMP_FPU); } }