From: Gleb Natapov <gleb@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: kvm@vger.kernel.org, avi@redhat.com, mtosatti@redhat.com
Subject: Re: [PATCH] reset edge sense circuit of i8259 on init
Date: Tue, 24 Jan 2012 15:46:28 +0200 [thread overview]
Message-ID: <20120124134628.GB9571@redhat.com> (raw)
In-Reply-To: <4F1EB5AF.1090006@siemens.com>
On Tue, Jan 24, 2012 at 02:44:15PM +0100, Jan Kiszka wrote:
> On 2012-01-24 14:06, 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.
> >
> > Signed-off-by: Gleb Natapov <gleb@redhat.com>
> > 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;
>
> Does & elcr make a relevant difference? QEMU simply sets irr to 0. If
> that's an issue, we need to fix both.
>
I saw what QEMU does. It's hard to tell looking at the spec what's more
correct. I think by zeroing irr we may lose level triggered interrupts
that happened just before init.
--
Gleb.
next prev parent reply other threads:[~2012-01-24 13:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 13:06 [PATCH] reset edge sense circuit of i8259 on init Gleb Natapov
2012-01-24 13:44 ` Jan Kiszka
2012-01-24 13:46 ` Gleb Natapov [this message]
2012-01-24 13:49 ` Jan Kiszka
2012-01-24 13:54 ` Gleb Natapov
2012-01-24 15:06 ` Jan Kiszka
2012-01-31 15:52 ` Gleb Natapov
2012-02-06 18:16 ` Marcelo Tosatti
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=20120124134628.GB9571@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/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).