From: Avi Kivity <avi@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>, Gleb Natapov <gleb@redhat.com>
Subject: Re: KVM: read apic->irr with ioapic lock held
Date: Wed, 02 Jun 2010 18:12:04 +0300 [thread overview]
Message-ID: <4C0674C4.70807@redhat.com> (raw)
In-Reply-To: <20100602142626.GA23058@amt.cnet>
On 06/02/2010 05:26 PM, Marcelo Tosatti wrote:
> Read ioapic->irr inside ioapic->lock protected section.
>
> KVM-Stable-Tag
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
> index 3bc4fdb..1149c60 100644
> --- a/virt/kvm/ioapic.c
> +++ b/virt/kvm/ioapic.c
> @@ -193,12 +193,13 @@ static int ioapic_deliver(struct kvm_ioapic *ioapic, int irq)
>
> int kvm_ioapic_set_irq(struct kvm_ioapic *ioapic, int irq, int level)
> {
> - u32 old_irr = ioapic->irr;
> + u32 old_irr;
> u32 mask = 1<< irq;
> union kvm_ioapic_redirect_entry entry;
> int ret = 1;
>
> spin_lock(&ioapic->lock);
> + old_irr = ioapic->irr;
> if (irq>= 0&& irq< IOAPIC_NUM_PINS) {
> entry = ioapic->redirtbl[irq];
> level ^= entry.fields.polarity;
>
Yikes.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-06-02 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 14:26 KVM: read apic->irr with ioapic lock held Marcelo Tosatti
2010-06-02 15:12 ` 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=4C0674C4.70807@redhat.com \
--to=avi@redhat.com \
--cc=gleb@redhat.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).