From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBMPz-000583-Lb for qemu-devel@nongnu.org; Tue, 11 Sep 2012 05:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBMPt-00059Z-PP for qemu-devel@nongnu.org; Tue, 11 Sep 2012 05:06:03 -0400 Received: from mout.web.de ([212.227.15.3]:62989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBMPt-00059V-ES for qemu-devel@nongnu.org; Tue, 11 Sep 2012 05:05:57 -0400 Message-ID: <504EFEF1.2080107@web.de> Date: Tue, 11 Sep 2012 11:05:53 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1347240466-6152-1-git-send-email-mmogilvi_qemu@miniinfo.net> <1347240466-6152-6-git-send-email-mmogilvi_qemu@miniinfo.net> <504DAB38.4000407@redhat.com> <504DAE47.8090607@web.de> <20120911043237.GA5194@comcast.net> In-Reply-To: <20120911043237.GA5194@comcast.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC7BDEA11D536D81B5315BA1C" Subject: Re: [Qemu-devel] [PATCH v5 5/6] i8259: fix so that dropping IRQ level always clears the interrupt request List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Matthew Ogilvie , Avi Kivity Cc: Paolo Bonzini , qemu-devel@nongnu.org, "Maciej W. Rozycki" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC7BDEA11D536D81B5315BA1C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-09-11 06:32, Matthew Ogilvie wrote: > On Mon, Sep 10, 2012 at 11:09:27AM +0200, Jan Kiszka wrote: >> On 2012-09-10 10:56, Avi Kivity wrote: >>> On 09/10/2012 04:27 AM, Matthew Ogilvie wrote: >>>> Intel's definition of "edge triggered" means: "asserted with a >>>> low-to-high transition at the time an interrupt is registered and >>>> then kept high until the interrupt is served via one of the >>>> EOI mechanisms or goes away unhandled." >>>> >>>> So the only difference between edge triggered and level triggered >>>> is in the leading edge, with no difference in the trailing edge. >>> >>> Hard to believe. So an edge while cpu interrupts are disabled is ign= ored? >> >> No, this is about the PIC, not the CPU interrupt inputs. >> >> Matthew, did you verify this on real hardware by reading back the IRR = as >> I suggested? >> >> Jan >=20 > I hadn't before, but now that I've checked, it's as expected: >=20 > ----------- > Real hardware [Pentium 4]: >=20 > cmdRead unmask IRR=3D4005 mask IRR=3D4001 sti unmask irq14 IRR=3D0001= DONE >=20 > [I also see a final IRR=3D0000 occasionally. Probably just happened to= > ask it while the timer (IRQ0) line is low (without the new understandin= g > of the trailing edge of an edge triggered interrupt, this would > have been confusing). I have most IRQ's (including > timer) masked off.] >=20 > ----------- > Unpatched qemu: >=20 > cmdRead unmask IRR=3D4015 mask IRR=3D4015 sti irq15 unmask IRR=3D4015= DONE >=20 > [Presumably IRQ4 (0x10 - qemu's serial device model?) had a transient > edge during initialization, but had been masked off even before I > masked it off?] >=20 > ----------- > Patched qemu: >=20 > cmdRead unmask IRR=3D4005 mask IRR=3D4001 sti unmask irq14 IRR=3D0001= DONE >=20 I think this is convincing, maybe worth documenting in the related changelogs of QEMU and KVM. Avi, doubts remaining? Jan --------------enigC7BDEA11D536D81B5315BA1C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBO/vEACgkQitSsb3rl5xQt2gCfaMpOUACVTuefpFl5M3lOuDUC 9nsAoIHQ2YoLSpDxRXPTZ70mIfxBY3dE =8BxY -----END PGP SIGNATURE----- --------------enigC7BDEA11D536D81B5315BA1C--