* KVM: read apic->irr with ioapic lock held
@ 2010-06-02 14:26 Marcelo Tosatti
2010-06-02 15:12 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2010-06-02 14:26 UTC (permalink / raw)
To: kvm; +Cc: Gleb Natapov
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: KVM: read apic->irr with ioapic lock held
2010-06-02 14:26 KVM: read apic->irr with ioapic lock held Marcelo Tosatti
@ 2010-06-02 15:12 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-06-02 15:12 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm, Gleb Natapov
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-02 15:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-02 14:26 KVM: read apic->irr with ioapic lock held Marcelo Tosatti
2010-06-02 15:12 ` Avi Kivity
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).