diff options
Diffstat (limited to 'target/i386/monitor.c')
-rw-r--r-- | target/i386/monitor.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 77ead60437..fe7d57b6aa 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -632,7 +632,15 @@ const MonitorDef *target_monitor_defs(void) void hmp_info_local_apic(Monitor *mon, const QDict *qdict) { - CPUState *cs = mon_get_cpu(); + CPUState *cs; + + if (qdict_haskey(qdict, "apic-id")) { + int id = qdict_get_try_int(qdict, "apic-id", 0); + cs = cpu_by_arch_id(id); + } else { + cs = mon_get_cpu(); + } + if (!cs) { monitor_printf(mon, "No CPU available\n"); |