From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH] reset edge sense circuit of i8259 on init Date: Tue, 31 Jan 2012 17:52:40 +0200 Message-ID: <20120131155240.GC32059@redhat.com> References: <20120124130605.GA9571@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@redhat.com, mtosatti@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18783 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754510Ab2AaPwl (ORCPT ); Tue, 31 Jan 2012 10:52:41 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0VFqfZB015285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 31 Jan 2012 10:52:41 -0500 Content-Disposition: inline In-Reply-To: <20120124130605.GA9571@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jan 24, 2012 at 03:06:05PM +0200, Gleb Natapov wrote: > The spec says that during initialization "The edge sense circuit is > reset which means that following initialization an interrupt request > (IR) input must make a low-to-high transition to generate an interrupt", > but currently if edge triggered interrupt is in IRR it is delivered > after i8259 initialization. > ping > Signed-off-by: Gleb Natapov > diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c > index b6a7353..81cf4fa 100644 > --- a/arch/x86/kvm/i8259.c > +++ b/arch/x86/kvm/i8259.c > @@ -307,6 +307,7 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) > if (val & 0x10) { > s->init4 = val & 1; > s->last_irr = 0; > + s->irr &= s->elcr; > s->imr = 0; > s->priority_add = 0; > s->special_mask = 0; > -- > Gleb. > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Gleb.