From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] avoid redeliver of edge interrupt before next edge Date: Sun, 05 Jul 2009 18:58:09 +0300 Message-ID: <4A50CD91.8070407@redhat.com> References: <1246808892-2179-1-git-send-email-gleb@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44267 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752907AbZGEPzy (ORCPT ); Sun, 5 Jul 2009 11:55:54 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n65FtwLt001202 for ; Sun, 5 Jul 2009 11:55:58 -0400 In-Reply-To: <1246808892-2179-1-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/05/2009 06:48 PM, Gleb Natapov wrote: > The check for an edge is broken in current ioapic code. ioapic->irr is > cleared on each edge interrupt by ioapic_service() and this makes > old_irr != ioapic->irr condition in kvm_ioapic_set_irq() to be always > true. The patch fixes the code to properly recognise edge. > > Some HW emulation calls set_irq() without level change. If each such > call is propagated to an OS it may confuse a device driver. This is the > case with keyboard device emulation and WindowsXP installer on SMP VM. > Each button stroke produce two interrupts (down/up) one interrupt is > submitted to CPU0 and another to CPU1. This confuses Windows somehow > and it ignores button strokes. > > Signed-off-by: Gleb Natapov > --- > > Same patch as before but split in two. First one fixes bug, second > make cosmetic changes. > > Applied both, thanks. -- error compiling committee.c: too many arguments to function