Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-20 Thread Ian Campbell
On Sat, 2015-07-18 at 11:13 +0100, Julien Grall wrote: > Hi Ian, > > On 15/07/2015 10:32, Ian Campbell wrote: > >> and save 2 byte if not more with the alignment per irq_desc. > > > > If this is a concern then I would say we would either want a separate > > array of per-pLPI information which we d

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-20 Thread Ian Campbell
On Sat, 2015-07-18 at 11:13 +0100, Julien Grall wrote: > Hi Ian, > > On 15/07/2015 10:32, Ian Campbell wrote: > >> and save 2 byte if not more with the alignment per irq_desc. > > > > If this is a concern then I would say we would either want a separate > > array of per-pLPI information which we d

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-18 Thread Julien Grall
Hi Ian, On 15/07/2015 10:32, Ian Campbell wrote: and save 2 byte if not more with the alignment per irq_desc. If this is a concern then I would say we would either want a separate array of per-pLPI information which we do not want in irq_desc because it is irq specific, or do add a pointer to

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Ian Campbell
On Thu, 2015-07-16 at 17:27 +0100, Marc Zyngier wrote: > On 16/07/15 17:18, Ian Campbell wrote: > > On Thu, 2015-07-16 at 16:21 +0100, Marc Zyngier wrote: > >> Hope this helps, > > > > It, plus the chat we had on IRC did, yes, thanks. > > > > In summary: > > > > I was very confusedly talking abo

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Marc Zyngier
On 16/07/15 17:18, Ian Campbell wrote: > On Thu, 2015-07-16 at 16:21 +0100, Marc Zyngier wrote: >> Hope this helps, > > It, plus the chat we had on IRC did, yes, thanks. > > In summary: > > I was very confusedly talking about INV when I meant SYNC. > > There is a real issue with the update of i

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Ian Campbell
On Thu, 2015-07-16 at 16:21 +0100, Marc Zyngier wrote: > Hope this helps, It, plus the chat we had on IRC did, yes, thanks. In summary: I was very confusedly talking about INV when I meant SYNC. There is a real issue with the update of its_dev->collection in its_set_affinity since it will resul

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Marc Zyngier
On 16/07/15 15:49, Ian Campbell wrote: > On Wed, 2015-07-15 at 22:31 +0530, Vijay Kilari wrote: >> Sorry. I may not be clear. >> >> In Linux when MSIx is enabled. >> Device is created first and its_device->its_collection is set for >> first onine cpu >> and mapvi is called with collection set in it

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-16 Thread Ian Campbell
On Wed, 2015-07-15 at 22:31 +0530, Vijay Kilari wrote: > Sorry. I may not be clear. > > In Linux when MSIx is enabled. > Device is created first and its_device->its_collection is set for > first onine cpu > and mapvi is called with collection set in its_create_device() as below. [...] > When affin

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Julien Grall
Hi Vijay, On 10/07/2015 09:42, vijay.kil...@gmail.com wrote: +static void its_host_irq_end(struct irq_desc *desc) +{ +/* Lower the priority */ +gicv3_eoi_irq(desc); +/* Deactivate */ +gicv3_dir_irq(desc); +} I though that an LPI doesn't have active state. And therefore, deacti

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Vijay Kilari
On Wed, Jul 15, 2015 at 7:58 PM, Ian Campbell wrote: > On Wed, 2015-07-15 at 19:45 +0530, Vijay Kilari wrote: >> On Wed, Jul 15, 2015 at 3:02 PM, Ian Campbell >> wrote: >> > On Wed, 2015-07-15 at 10:26 +0200, Julien Grall wrote: >> > >> >> >>> @@ -149,7 +173,7 @@ int gic_route_irq_to_guest(struc

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Ian Campbell
On Wed, 2015-07-15 at 19:45 +0530, Vijay Kilari wrote: > On Wed, Jul 15, 2015 at 3:02 PM, Ian Campbell wrote: > > On Wed, 2015-07-15 at 10:26 +0200, Julien Grall wrote: > > > >> >>> @@ -149,7 +173,7 @@ int gic_route_irq_to_guest(struct domain *d, > >> >>> unsigned > >> >>> int virq, > >> >>>

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Julien Grall
On 15/07/2015 16:15, Vijay Kilari wrote: Not associated with same collection. Events are associated with cpu for which cpu_mask is set and the collection id of that cpu is stored in the its_device, which is later used for SYNC. So effectively it_device does not store collection id associated

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Vijay Kilari
On Wed, Jul 15, 2015 at 3:02 PM, Ian Campbell wrote: > On Wed, 2015-07-15 at 10:26 +0200, Julien Grall wrote: > >> >>> @@ -149,7 +173,7 @@ int gic_route_irq_to_guest(struct domain *d, unsigned >> >>> int virq, >> >>> test_bit(GIC_IRQ_GUEST_ENABLED, &p->status) ) >> >>>goto

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Ian Campbell
On Wed, 2015-07-15 at 11:49 +0200, Julien Grall wrote: > Hi Ian, > > On 15/07/2015 11:32, Ian Campbell wrote: > Why can't we store the event ID in the irq_guest? As said on v3, this is > not > >>> > >>> Are you referring to irq_desc in above statement? > >> > >> Yes sorry. > > > > I'm a

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Julien Grall
Hi Ian, On 15/07/2015 11:32, Ian Campbell wrote: Why can't we store the event ID in the irq_guest? As said on v3, this is not Are you referring to irq_desc in above statement? Yes sorry. I'm afraid I don't follow your suggestion here, are you suggesting that the vid field added above shoul

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Ian Campbell
On Wed, 2015-07-15 at 10:26 +0200, Julien Grall wrote: > >>> @@ -149,7 +173,7 @@ int gic_route_irq_to_guest(struct domain *d, unsigned > >>> int virq, > >>> test_bit(GIC_IRQ_GUEST_ENABLED, &p->status) ) > >>>goto out; > >>> > >>> -desc->handler = gic_hw_ops->gic_guest_i

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Julien Grall
Hi Vijay, On 15/07/2015 09:16, Vijay Kilari wrote: On Tue, Jul 14, 2015 at 2:48 AM, Julien Grall wrote: Hi, On 10/07/2015 09:42, vijay.kil...@gmail.com wrote: diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index c41e82e..4f3801b 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-15 Thread Vijay Kilari
On Tue, Jul 14, 2015 at 2:48 AM, Julien Grall wrote: > Hi, > > On 10/07/2015 09:42, vijay.kil...@gmail.com wrote: >> >> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c >> index c41e82e..4f3801b 100644 >> --- a/xen/arch/arm/gic.c >> +++ b/xen/arch/arm/gic.c >> +static inline hw_irq_controller

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-13 Thread Julien Grall
Hi, On 10/07/2015 09:42, vijay.kil...@gmail.com wrote: diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index c41e82e..4f3801b 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c +static inline hw_irq_controller *get_host_hw_irq_controller(unsigned int irq) +{ +if ( is_lpi(irq) ) +

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-13 Thread Ian Campbell
On Sat, 2015-07-11 at 20:10 +0530, Vijay Kilari wrote: > On Fri, Jul 10, 2015 at 7:16 PM, Ian Campbell wrote: > > On Fri, 2015-07-10 at 13:12 +0530, vijay.kil...@gmail.com wrote: > >> From: Vijaya Kumar K > >> > >> Implements hw_irq_controller api's required > >> to handle LPI's > >> > >> Signed-

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-11 Thread Julien Grall
Hi Vijay, On 11/07/2015 16:40, Vijay Kilari wrote: diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h index e9d5f36..44c2317 100644 --- a/xen/include/asm-arm/gic.h +++ b/xen/include/asm-arm/gic.h @@ -20,6 +20,9 @@ #define NR_GIC_LOCAL_IRQS NR_LOCAL_IRQS #define NR_GIC_SGI

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-11 Thread Vijay Kilari
On Fri, Jul 10, 2015 at 7:16 PM, Ian Campbell wrote: > On Fri, 2015-07-10 at 13:12 +0530, vijay.kil...@gmail.com wrote: >> From: Vijaya Kumar K >> >> Implements hw_irq_controller api's required >> to handle LPI's >> >> Signed-off-by: Vijaya Kumar K >> --- >> v4: - Implement separate hw_irq_contr

Re: [Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-10 Thread Ian Campbell
On Fri, 2015-07-10 at 13:12 +0530, vijay.kil...@gmail.com wrote: > From: Vijaya Kumar K > > Implements hw_irq_controller api's required > to handle LPI's > > Signed-off-by: Vijaya Kumar K > --- > v4: - Implement separate hw_irq_controller for LPIs > - Drop setting LPI affinity > - virq

[Xen-devel] [PATCH v4 05/17] xen/arm: ITS: implement hw_irq_controller for LPIs

2015-07-10 Thread vijay . kilari
From: Vijaya Kumar K Implements hw_irq_controller api's required to handle LPI's Signed-off-by: Vijaya Kumar K --- v4: - Implement separate hw_irq_controller for LPIs - Drop setting LPI affinity - virq and vid are moved under union - Introduced inv command handling - its_device