From: Avi Kivity <avi@qumranet.com>
To: Mark McLoughlin <markmc@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: IOAPIC: Fix level-triggered irq injection hang
Date: Sat, 05 Jul 2008 11:35:42 +0300 [thread overview]
Message-ID: <486F325E.3050502@qumranet.com> (raw)
In-Reply-To: <1215192195-10359-1-git-send-email-markmc@redhat.com>
Mark McLoughlin wrote:
> The "remote_irr" variable is used to indicate an interrupt
> which has been received by the LAPIC, but not acked.
>
> In our EOI handler, we unset remote_irr and re-inject the
> interrupt if the interrupt line is still asserted.
>
> However, we do not set remote_irr here, leading to a
> situation where if kvm_ioapic_set_irq() is called, then we go
> ahead and call ioapic_service(). This means that IRR is
> re-asserted even though the interrupt is currently in service
> (i.e. LAPIC IRR is cleared and ISR/TMR set)
>
> The issue with this is that when the currently executing
> interrupt handler finishes and writes LAPIC EOI, then TMR is
> unset and EOI sent to the IOAPIC. Since IRR is now asserted,
> but TMR is not, then when the second interrupt is handled,
> no EOI is sent and if there is any pending interrupt, it is
> not re-injected.
>
> This fixes a hang only seen while running mke2fs -j on an
> 8Gb virtio disk backed by a fully sparse raw file, with
> aliguori "avoid fragmented virtio-blk transfers by copying"
> changes.
>
>
Good catch indeed; applied. I think it also fixes the case where the
ioapic entry is masked when the eoi occurs.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
prev parent reply other threads:[~2008-07-05 8:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-04 17:23 [PATCH] KVM: IOAPIC: Fix level-triggered irq injection hang Mark McLoughlin
2008-07-05 8:35 ` Avi Kivity [this message]
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=486F325E.3050502@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=markmc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.