[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC 03/16] vgic: move pause_flags check out of vgic spinlock
From: Andrii Anisov <andrii_anisov@xxxxxxxx> Pause_flags is not related to vgic spinlock, so reduce code under lock. Signed-off-by: Andrii Anisov <andrii_anisov@xxxxxxxx> --- xen/arch/arm/vgic.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index a2419d0..a64633f 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -563,6 +563,12 @@ void vgic_inject_irq(struct domain *d, struct vcpu *v, unsigned int virq, v = vgic_get_target_vcpu(d->vcpu[0], virq); }; + /* vcpu offline */ + if ( unlikely(test_bit(_VPF_down, &v->pause_flags)) ) + { + return; + } + spin_lock_irqsave(&v->arch.vgic.lock, flags); n = irq_to_pending(v, virq); @@ -575,13 +581,6 @@ void vgic_inject_irq(struct domain *d, struct vcpu *v, unsigned int virq, } #endif - /* vcpu offline */ - if ( test_bit(_VPF_down, &v->pause_flags) ) - { - spin_unlock_irqrestore(&v->arch.vgic.lock, flags); - return; - } - set_bit(GIC_IRQ_GUEST_QUEUED, &n->status); if ( !list_empty(&n->inflight) ) -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |