diff options
author | Peter Xu | 2017-12-10 07:38:18 +0100 |
---|---|---|
committer | Paolo Bonzini | 2017-12-21 09:30:32 +0100 |
commit | e267d16496e3998f271767a80ff9b0cc43be8a35 (patch) | |
tree | 08c09262036a49cf2f499be62bbf24065056f338 /hw/intc/i8259_common.c | |
parent | i8259: generalize statistics into common code (diff) | |
download | qemu-e267d16496e3998f271767a80ff9b0cc43be8a35.tar.gz qemu-e267d16496e3998f271767a80ff9b0cc43be8a35.tar.xz qemu-e267d16496e3998f271767a80ff9b0cc43be8a35.zip |
kvm-i8259: support "info pic" and "info irq"
Let's leverage the i8259 common code for kvm-i8259 too.
I think it's still possible that stats can lost when i8259 is in kernel
and meanwhile when irqfd is used, e.g., by vfio or vhost devices.
However that should be rare IMHO since they should be using MSIs mostly
if they really want performance (that's why people use vhost and device
assignment), and no old INTx should be used. As long as the INTx users
are emulated in QEMU the stats will be correct.
For "info pic", it should be always accurate since we fetch kvm regs
before dump.
More importantly, it's just too simple to do this now - it's only 10+
LOC to gain this feature.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20171210063819.14892-5-peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/intc/i8259_common.c')
-rw-r--r-- | hw/intc/i8259_common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index a3caddeefb..7efd2e8012 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -132,6 +132,7 @@ void pic_print_info(InterruptStatsProvider *obj, Monitor *mon) { PICCommonState *s = PIC_COMMON(obj); + pic_dispatch_pre_save(s); monitor_printf(mon, "pic%d: irr=%02x imr=%02x isr=%02x hprio=%d " "irq_base=%02x rr_sel=%d elcr=%02x fnm=%d\n", s->master ? 0 : 1, s->irr, s->imr, s->isr, s->priority_add, |