|
@@ -307,6 +307,7 @@ int monitor_get_cpu_index(Monitor *mon)
|
|
static void hmp_info_registers(Monitor *mon, const QDict *qdict)
|
|
static void hmp_info_registers(Monitor *mon, const QDict *qdict)
|
|
{
|
|
{
|
|
bool all_cpus = qdict_get_try_bool(qdict, "cpustate_all", false);
|
|
bool all_cpus = qdict_get_try_bool(qdict, "cpustate_all", false);
|
|
|
|
+ int vcpu = qdict_get_try_int(qdict, "vcpu", -1);
|
|
CPUState *cs;
|
|
CPUState *cs;
|
|
|
|
|
|
if (all_cpus) {
|
|
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);
|
|
cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- cs = mon_get_cpu(mon);
|
|
|
|
|
|
+ cs = vcpu >= 0 ? qemu_get_cpu(vcpu) : mon_get_cpu(mon);
|
|
|
|
|
|
if (!cs) {
|
|
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;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ monitor_printf(mon, "\nCPU#%d\n", cs->cpu_index);
|
|
cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
|
|
cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
|
|
}
|
|
}
|
|
}
|
|
}
|