diff options
| author | Yi Wang <wang.yi59@zte.com.cn> | 2017-07-26 02:18:37 -0400 |
|---|---|---|
| committer | Eduardo Habkost <ehabkost@redhat.com> | 2017-09-01 11:54:24 -0300 |
| commit | 1bef228474482e70b2750832e8d67eacf3135c74 (patch) | |
| tree | a221070cbcad896f81d966c1a62f55eb8c9ddc66 /target/i386/monitor.c | |
| parent | 5ce46cb34eecec0bc94a4b1394763f9a1bbe20c3 (diff) | |
| download | focaccia-qemu-1bef228474482e70b2750832e8d67eacf3135c74.tar.gz focaccia-qemu-1bef228474482e70b2750832e8d67eacf3135c74.zip | |
hmp: allow apic-id for "info lapic"
Add [apic-id] support for hmp command "info lapic", which is useful when debugging ipi and so on. Current behavior is not changed when the parameter isn't specified. Signed-off-by: Yi Wang <wang.yi59@zte.com.cn> Signed-off-by: Yun Liu <liu.yunh@zte.com.cn> Message-Id: <1501049917-4701-3-git-send-email-wang.yi59@zte.com.cn> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
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"); |