If we need to inject an irq into a VCPU that is running on a different
processor, we shouldn't just enqueue the irq into the lr_pending and
inflight lists and wait for something to interrupt the guest execution.
Send an IPI to the target pcpu so that Xen can inject the new interrupt
returning to guest.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
struct vgic_irq_rank *rank = vgic_irq_rank(v, 8, idx);
struct pending_irq *iter, *n = irq_to_pending(v, irq);
unsigned long flags;
+ bool_t running;
spin_lock_irqsave(&v->arch.vgic.lock, flags);
out:
spin_unlock_irqrestore(&v->arch.vgic.lock, flags);
/* we have a new higher priority irq, inject it into the guest */
+ running = v->is_running;
vcpu_unblock(v);
+ if ( running && v != current )
+ smp_send_event_check_mask(cpumask_of(v->processor));
}
/*