aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/kvm/ioapic.c
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 /hw/i386/kvm/ioapic.c
parent6a218b032b2d62b3c13e9553593b75e445ce5f1a (diff)
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 'hw/i386/kvm/ioapic.c')
-rw-r--r--hw/i386/kvm/ioapic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c
index 646f6245ee..5274dc709b 100644
--- a/hw/i386/kvm/ioapic.c
+++ b/hw/i386/kvm/ioapic.c
@@ -132,8 +132,10 @@ static void kvm_ioapic_reset(DeviceState *dev)
static void kvm_ioapic_set_irq(void *opaque, int irq, int level)
{
KVMIOAPICState *s = opaque;
+ IOAPICCommonState *common = IOAPIC_COMMON(s);
int delivered;
+ ioapic_stat_update_irq(common, irq, level);
delivered = kvm_set_irq(kvm_state, s->kvm_gsi_base + irq, level);
apic_report_irq_delivered(delivered);
}