From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeP9k-0001Cp-6T for qemu-devel@nongnu.org; Tue, 22 Sep 2015 11:06:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeP9g-000102-ER for qemu-devel@nongnu.org; Tue, 22 Sep 2015 11:06:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeP9g-0000zq-AL for qemu-devel@nongnu.org; Tue, 22 Sep 2015 11:06:52 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E9E49A2C31 for ; Tue, 22 Sep 2015 15:06:51 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-71.ams2.redhat.com [10.36.112.71]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8MF6IoM027175 for ; Tue, 22 Sep 2015 11:06:51 -0400 From: Paolo Bonzini Date: Tue, 22 Sep 2015 17:05:40 +0200 Message-Id: <1442934371-12567-18-git-send-email-pbonzini@redhat.com> In-Reply-To: <1442934371-12567-1-git-send-email-pbonzini@redhat.com> References: <1442934371-12567-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 17/48] ioapic: coalesce level interrupts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org If a level-triggered interrupt goes down and back up before the corresponding EOI, it should be coalesced. This fixes one testcase in kvm-unit-tests' ioapic.flat. Signed-off-by: Paolo Bonzini --- hw/intc/ioapic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index b527932..6ad3c66 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -98,7 +98,9 @@ static void ioapic_set_irq(void *opaque, int vector, int level) /* level triggered */ if (level) { s->irr |= mask; - ioapic_service(s); + if (!(entry & IOAPIC_LVT_REMOTE_IRR)) { + ioapic_service(s); + } } else { s->irr &= ~mask; } -- 2.5.0