[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 7/8] xen/arm: Allow DOM0 to set the irq type when ACPI is inuse
On Wed, 22 Jun 2016, Julien Grall wrote: > > > @@ -356,6 +375,8 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int > > > n) > > > { > > > irq_set_affinity(p->desc, cpumask_of(v_target->processor)); > > > spin_lock_irqsave(&p->desc->lock, flags); > > > + if ( irq_type_set_by_domain(d) ) > > > + gic_set_irq_type(p->desc, __vgic_get_virq_type(v, irq)); > > > p->desc->handler->enable(p->desc); > > > spin_unlock_irqrestore(&p->desc->lock, flags); > > > } > > > > This is OK. But I am wondering if it wouldn't make sense to call > > gic_set_irq_type when the guest actually writes to the virtual icfg? > > Hmmm it looks like that I forgot to explain in the commit message why I chose > to call gic_set_irq_type here. > > Changing the value of Int_config is UNPREDICTABLE when the corresponding > interrupt is not disabled (see 4.3.13 in ARM IHI 0048B.b). > > So calling gic_set_irq_type when the guest actualy writes to the virtual cfg > would require to disable the IRQ before hand. > > Given that the behavior is UNPREDICTABLE, I chose to set the type before > enabling the IRQ because the resulting code is simpler. Ah, I see. Makes sense. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |