aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2017-12-29 15:31:03 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2018-06-28 19:05:37 +0200
commitcce5405e0ebce0cd400cfd3d3d218a776ac6b333 (patch)
treec6a5b1e6fb59692151f96686548d8628a4c38771 /include
parent6a218b032b2d62b3c13e9553593b75e445ce5f1a (diff)
downloadqemu-cce5405e0ebce0cd400cfd3d3d218a776ac6b333.zip
qemu-cce5405e0ebce0cd400cfd3d3d218a776ac6b333.tar.gz
qemu-cce5405e0ebce0cd400cfd3d3d218a776ac6b333.tar.bz2
ioapic: support "info irq"
This include both userspace and in-kernel ioapic. Note that the numbers can be inaccurate for kvm-ioapic. One reason is the same with kvm-i8259, that when irqfd is used, irqs can be delivered all inside kernel without our notice. Meanwhile, kvm-ioapic is specially treated when irq numbers <ISA_NUM_IRQS, those irqs will be delivered in kernel too via kvm-i8259 (please refer to kvm_pc_gsi_handler). Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <20171229073104.3810-5-peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/ioapic_internal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h
index a11d86d..9848f39 100644
--- a/include/hw/i386/ioapic_internal.h
+++ b/include/hw/i386/ioapic_internal.h
@@ -109,10 +109,13 @@ struct IOAPICCommonState {
uint64_t ioredtbl[IOAPIC_NUM_PINS];
Notifier machine_done;
uint8_t version;
+ uint64_t irq_count[IOAPIC_NUM_PINS];
+ int irq_level[IOAPIC_NUM_PINS];
};
void ioapic_reset_common(DeviceState *dev);
void ioapic_print_redtbl(Monitor *mon, IOAPICCommonState *s);
+void ioapic_stat_update_irq(IOAPICCommonState *s, int irq, int level);
#endif /* QEMU_IOAPIC_INTERNAL_H */