On Fri, 2014-12-12 at 14:43 +0000, Julien Grall wrote:
> This help for guest interrupts debugging. If the vIRQ is not allocate,
> this means that nothing is wired to it.

Should we short circuit the rest of the enable operation for this IRQ
then? i.e. implement such writes as ignored, e.g. not reflect it in
reads of ISENABLER etc.

What (if anything) does the GIC spec have to say on the subject?

> Signed-off-by: Julien Grall <julien.gr...@linaro.org>
> ---
>  xen/arch/arm/vgic.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> index dbfc259..719cb9f 100644
> --- a/xen/arch/arm/vgic.c
> +++ b/xen/arch/arm/vgic.c
> @@ -282,6 +282,10 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n)
>          if ( !list_empty(&p->inflight) && !test_bit(GIC_IRQ_GUEST_VISIBLE, 
> &p->status) )
>              gic_raise_guest_irq(v_target, irq, p->priority);
>          spin_unlock_irqrestore(&v_target->arch.vgic.lock, flags);
> +
> +        if ( !test_bit(irq, d->arch.vgic.allocated_irqs) )
> +            gdprintk(XENLOG_DEBUG, "vIRQ %u is not allocated\n", irq);

Should this not be first after the irq= line inside this loop?

> +
>          if ( p->desc != NULL )
>          {
>              irq_set_affinity(p->desc, cpumask_of(v_target->processor));



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to