qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Jan Kiszka <jan.kiszka@web.de>,
	qemu-devel@nongnu.org, "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [Qemu-devel] [PATCH v5 5/6] i8259: fix so that dropping IRQ level always clears the interrupt request
Date: Mon, 19 Nov 2012 22:05:31 -0700	[thread overview]
Message-ID: <20121120050531.GA2903@comcast.net> (raw)
In-Reply-To: <alpine.GSO.2.00.1211191626060.11133@mono>

On Mon, Nov 19, 2012 at 04:28:31PM +0100, BALATON Zoltan wrote:
> On Sun, 9 Sep 2012, 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.
> 
> What happened to this patch? Any chance it will be in 1.3?
> 
> Thanks,
> BALATON Zoltan

I kind of doubt it will make it into 1.3, although I would like to
get it in eventually.  Maybe the first few essentially unrelated
trivial patches can make it in?

Yours is the first comment I've seen since I've posted version 6 of
the series (this particular patch is the same as version 5).  The lack
of feedback combined with other demands on my time have prevented me
from progressing on this for over a month and a half.

Status:

   * We can't completely fix the i8259 model without addressing some
     issues in the i8254 model as well.  The i8254 issues (very short
     duty cycle on IRQ0 causing lost timer ticks) become rather
     severe if you try to fix the i8259 without fixing the i8254.
   * But the obvious direct fixes to the i8254 may risk causing issues with
     breaking migration between pre-fix and post-fix versions of qemu,
     due to lost and/or extra timer interrupts.  I'm not sure how big
     of an issue this is in practice, but it is a concern.
   * I've outlined some possible ways to address the migration issue
     in the cover letter of version 6 of the patch series.
   * Similar issue cascades exist in the in-kernel KVM model as well.
     The i8254 issues are even more severe in KVM: timer interrupts
     are always lost [0-length duty cycle in KVM model], instead of
     sometimes lost [non-0 but tiny duty cycle in qemu model].
   * I'm not aware of any similar problems in other device interrupt
     models, but I haven't really checked them, either.

Next step?:

In the absense of any other suggestions, I'm thinking about rolling
a version of the series that leaves IRQ0 (timer) working the way
it does in qemu 1.2.  Except in the i8254 I'll immediately preceed
each "intended to be leading edge transition" with an
explicit lowering of IRQ0, so that if migrating from some
future really-fixed version that leaves IRQ0 high most
of the time, it will still recognize the new edge.  A "real" fix
would then be delayed (years?) until versions without this first
stage fix are no longer in production.  I can probably
get this done this weekend.  [Although I'm not sure how to
deal with the issue that some of the i8254 modes' leading edge
transitions are off by one count.  Perhaps we'll need multiple
intermediate stages, or one of the other strategies outlined in
the version 6 cover letter.]

Or does anyone have a better suggestion?

                         - Matthew Ogilvie

  reply	other threads:[~2012-11-20  5:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10  1:27 [Qemu-devel] [PATCH v5 0/6] Running Microport UNIX (ca 1987) Matthew Ogilvie
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 1/6] fix some debug printf format strings Matthew Ogilvie
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 2/6] vl: fix -hdachs/-hda argument order parsing issues Matthew Ogilvie
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 3/6] qemu-options.hx: mention retrace= VGA option Matthew Ogilvie
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 4/6] vga: add some optional CGA compatibility hacks Matthew Ogilvie
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 5/6] i8259: fix so that dropping IRQ level always clears the interrupt request Matthew Ogilvie
2012-09-10  8:56   ` Avi Kivity
2012-09-10  9:09     ` Jan Kiszka
2012-09-10  9:18       ` Avi Kivity
2012-09-10  9:33         ` Jan Kiszka
2012-09-10 13:09         ` Maciej W. Rozycki
2012-09-11 12:57           ` Avi Kivity
2012-09-11  4:32       ` Matthew Ogilvie
2012-09-11  9:05         ` Jan Kiszka
2012-09-11 12:58           ` Avi Kivity
2012-11-19 15:28   ` BALATON Zoltan
2012-11-20  5:05     ` Matthew Ogilvie [this message]
2012-09-10  1:27 ` [Qemu-devel] [PATCH v5 6/6] i8259: refactor pic_set_irq level logic Matthew Ogilvie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121120050531.GA2903@comcast.net \
    --to=mmogilvi_qemu@miniinfo.net \
    --cc=balaton@eik.bme.hu \
    --cc=jan.kiszka@web.de \
    --cc=macro@linux-mips.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).