diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2020-02-07 07:43:42 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-10 19:26:55 -0400 |
commit | 6e083c0de41a606f304168fce75ea77f3c031f98 (patch) | |
tree | 6e59f9ccd8278ff3556b1da88158fbf537905c2c /target | |
parent | 86f13ef31806e5f829ee3d9ed82694f44dd1c02d (diff) |
apic: Report current_count via 'info lapic'
This is helpful when debugging stuck guest timers.
As we need apic_get_current_count for that, and it is really not
emulation specific, move it to apic_common.c and export it. Fix its
style at this chance as well.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <e00e2896-ca5b-a929-de7a-8e5762f0c1c2@siemens.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target/i386/helper.c b/target/i386/helper.c index fa2a1dcdda..70be53e2c3 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -370,10 +370,11 @@ void x86_cpu_dump_local_apic_state(CPUState *cs, int flags) dump_apic_lvt("LVTTHMR", lvt[APIC_LVT_THERMAL], false); dump_apic_lvt("LVTT", lvt[APIC_LVT_TIMER], true); - qemu_printf("Timer\t DCR=0x%x (divide by %u) initial_count = %u\n", + qemu_printf("Timer\t DCR=0x%x (divide by %u) initial_count = %u" + " current_count = %u\n", s->divide_conf & APIC_DCR_MASK, divider_conf(s->divide_conf), - s->initial_count); + s->initial_count, apic_get_current_count(s)); qemu_printf("SPIV\t 0x%08x APIC %s, focus=%s, spurious vec %u\n", s->spurious_vec, |