On Fri, 10 Jul 2015, vijay.kil...@gmail.com wrote: > From: Vijaya Kumar K <vijaya.ku...@caviumnetworks.com> > > Allocate and initialize irq descriptor for LPIs and > route LPIs to guest > > Signed-off-by: Vijaya Kumar K <vijaya.ku...@caviumnetworks.com> > > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > index a5f66f6..8190a46 100644 > --- a/xen/arch/arm/vgic.c > +++ b/xen/arch/arm/vgic.c > @@ -30,6 +30,7 @@ > > #include <asm/mmio.h> > #include <asm/gic.h> > +#include <asm/gic-its.h> > #include <asm/vgic.h> > > static inline struct vgic_irq_rank *vgic_get_rank(struct vcpu *v, int rank) > @@ -111,6 +112,15 @@ int domain_vgic_init(struct domain *d, unsigned int > nr_spis) > for (i=0; i<d->arch.vgic.nr_spis; i++) > vgic_init_pending_irq(&d->arch.vgic.pending_irqs[i], i + 32); > > +#ifdef CONFIG_ARM_64 > + d->arch.vgic.pending_lpis = xzalloc_array(struct pending_irq, > NR_GIC_LPI);
Would it be possible to only allocate pending_lpis if lpi_supported? > + if ( d->arch.vgic.pending_lpis == NULL ) > + return -ENOMEM; > + > + for ( i = 0; i < NR_GIC_LPI; i++ ) > + vgic_init_pending_irq(&d->arch.vgic.pending_lpis[i], i); > +#endif > + > for (i=0; i<DOMAIN_NR_RANKS(d); i++) > spin_lock_init(&d->arch.vgic.shared_irqs[i].lock); > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel