]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ioapic: clear irq_eoi when updating the ioapic redirect table entry
authorLi Qiang <liq3ea@163.com>
Mon, 24 Jun 2019 15:16:35 +0000 (08:16 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Jul 2019 20:16:46 +0000 (22:16 +0200)
irq_eoi is used to count the number of irq injected during eoi
broadcast. It should be set to 0 when updating the ioapic's redirect
table entry.

Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Li Qiang <liq3ea@163.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20190624151635.22494-1-liq3ea@163.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/intc/ioapic.c

index 7074489fdf3d6fa654151c20c2dcb60324c2b2f6..db9e5186025bc230d1065a722c32b3470fe7dbb5 100644 (file)
@@ -380,6 +380,7 @@ ioapic_mem_write(void *opaque, hwaddr addr, uint64_t val,
                 /* restore RO bits */
                 s->ioredtbl[index] &= IOAPIC_RW_BITS;
                 s->ioredtbl[index] |= ro_bits;
+                s->irq_eoi[index] = 0;
                 ioapic_fix_edge_remote_irr(&s->ioredtbl[index]);
                 ioapic_service(s);
             }