From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
gleb@redhat.com, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] kvm: fix race with level interrupts
Date: Fri, 20 Jul 2012 16:04:54 -0300 [thread overview]
Message-ID: <20120720190454.GA24024@amt.cnet> (raw)
In-Reply-To: <20120719104520.GA14748@redhat.com>
On Thu, Jul 19, 2012 at 01:45:20PM +0300, Michael S. Tsirkin wrote:
> When more than 1 source id is in use for the same GSI, we have the
> following race related to handling irq_states race:
>
> CPU 0 clears bit 0. CPU 0 read irq_state as 0. CPU 1 sets level to 1.
> CPU 1 calls kvm_ioapic_set_irq(1). CPU 0 calls kvm_ioapic_set_irq(0).
> Now ioapic thinks the level is 0 but irq_state is not 0.
>
> Fix by performing all irq_states bitmap handling under pic/ioapic lock.
> This also removes the need for atomics with irq_states handling.
>
> Reported-by: Gleb Natapov <gleb@redhat.com>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> ---
Applied, thanks.
> Changes from v1:
> Address comments by Gleb and Alex:
> renamed some variables for clarify
> renamed kvm_irq_line_state -> __kvm_irq_line_state
>
> Any chance we can put this in 3.5? I know level IRQs are not widely
> used, which is likely why this went unnoticed for so long, but still ...
http://yarchive.net/comp/linux/merge_window.html
"From: Linus Torvalds <torvalds@linux-foundation.org>
The thing is, I don't take bug fixes late in the -rc just because they
are bug fixes.
And I really shouldn't.
If it's an old bug, and doesn't cause an oops or a security issue, it
had damn well better wait for the next merge window. There is absolutely
_no_ reason to just blindly "fix bugs" at the end of the rc stage,
because quite frankly, the risks coming from fixing a bug is often
bigger than the advantage.
"
prev parent reply other threads:[~2012-07-20 19:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 10:45 [PATCHv2] kvm: fix race with level interrupts Michael S. Tsirkin
2012-07-20 19:04 ` Marcelo Tosatti [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=20120720190454.GA24024@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@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