[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 21/25] x86: ioapic: ignore level irq during processin
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 21/25] x86: ioapic: ignore level irq during processing |
Date: |
Tue, 2 Aug 2016 21:39:31 +0200 |
From: Peter Xu <address@hidden>
For level triggered interrupts, we will get Remote IRR bit cleared after
guest kernel finished processing specific request. Before that, we
should ignore the same interrupt from triggering again.
Signed-off-by: Peter Xu <address@hidden>
Message-Id: <address@hidden>
[Push new "if" up so that it covers KVM split irqchip as well. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/intc/ioapic.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c
index 2d3282a..a00d882 100644
--- a/hw/intc/ioapic.c
+++ b/hw/intc/ioapic.c
@@ -117,21 +117,25 @@ static void ioapic_service(IOAPICCommonState *s)
s->ioredtbl[i] |= IOAPIC_LVT_REMOTE_IRR;
}
+ if (coalesce) {
+ /* We are level triggered interrupts, and the
+ * guest should be still working on previous one,
+ * so skip it. */
+ continue;
+ }
+
#ifdef CONFIG_KVM
if (kvm_irqchip_is_split()) {
if (info.trig_mode == IOAPIC_TRIGGER_EDGE) {
kvm_set_irq(kvm_state, i, 1);
kvm_set_irq(kvm_state, i, 0);
} else {
- if (!coalesce) {
- kvm_set_irq(kvm_state, i, 1);
- }
+ kvm_set_irq(kvm_state, i, 1);
}
continue;
}
-#else
- (void)coalesce;
#endif
+
/* No matter whether IR is enabled, we translate
* the IOAPIC message into a MSI one, and its
* address space will decide whether we need a
--
2.7.4
- [Qemu-devel] [PULL 11/25] qdist: use g_realloc_n instead of g_realloc, (continued)
- [Qemu-devel] [PULL 11/25] qdist: use g_realloc_n instead of g_realloc, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 12/25] qdist: return "(empty)" instead of NULL when printing an empty dist, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 13/25] mptsas: really fix migration compatibility, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 14/25] i2c: fix migration regression introduced by broadcast support, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 15/25] nbd: Fix bad flag detection on server, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 19/25] fw_cfg: Make base type "fw_cfg" abstract, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 18/25] block: Cater to iscsi with non-power-of-2 discard, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 17/25] osdep: Document differences in rounding macros, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 16/25] nbd: Limit nbdflags to 16 bits, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 20/25] apic: fix broken migration for kvm-apic, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 21/25] x86: ioapic: ignore level irq during processing,
Paolo Bonzini <=
- [Qemu-devel] [PULL 22/25] x86: ioapic: add support for explicit EOI, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 25/25] util: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset', Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 24/25] qdev: Fix use after free in qdev_init_nofail error path, Paolo Bonzini, 2016/08/02
- [Qemu-devel] [PULL 23/25] Reorganize help output of '-display' option, Paolo Bonzini, 2016/08/02
- Re: [Qemu-devel] [PULL 00/25] Misc QEMU fixes for 2016-08-02, Peter Maydell, 2016/08/03