[Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-05 Thread Andre Przywara
Upon receiving an LPI on the host, we need to find the right VCPU and virtual IRQ number to get this IRQ injected. Iterate our two-level LPI table to find this information quickly when the host takes an LPI. Call the existing injection function to let the GIC emulation deal with this interrupt. Als

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-05 Thread Stefano Stabellini
On Thu, 6 Apr 2017, Andre Przywara wrote: > Upon receiving an LPI on the host, we need to find the right VCPU and > virtual IRQ number to get this IRQ injected. > Iterate our two-level LPI table to find this information quickly when > the host takes an LPI. Call the existing injection function to l

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Andre Przywara
Hi Stefano, thanks for spending your brain cells on this nasty code. ... On 06/04/17 00:45, Stefano Stabellini wrote: > On Thu, 6 Apr 2017, Andre Przywara wrote: >> Upon receiving an LPI on the host, we need to find the right VCPU and >> virtual IRQ number to get this IRQ injected. >> Iterate ou

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Julien Grall
Hi Andre, On 06/04/17 00:19, Andre Przywara wrote: diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c index 270a136..f4d7949 100644 --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c @@ -1217,6 +1217,12 @@ static int __init gicv2_init(void) return 0; } +void gicv2_do_LPI(unsi

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Stefano Stabellini
On Thu, 6 Apr 2017, Andre Przywara wrote: > Hi Stefano, > > thanks for spending your brain cells on this nasty code. > > ... > > On 06/04/17 00:45, Stefano Stabellini wrote: > > On Thu, 6 Apr 2017, Andre Przywara wrote: > >> Upon receiving an LPI on the host, we need to find the right VCPU and >

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Julien Grall
Hi Stefano, On 04/06/2017 07:47 PM, Stefano Stabellini wrote: On Thu, 6 Apr 2017, Andre Przywara wrote: unsigned long status; struct irq_desc *desc; /* only set it the irq corresponds to a physical irq */ unsigned int irq; #define GIC_INVALID_LR (uint8_t)~0 uint8_t

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Stefano Stabellini
On Thu, 6 Apr 2017, Julien Grall wrote: > On 04/06/2017 07:47 PM, Stefano Stabellini wrote: > > On Thu, 6 Apr 2017, Andre Przywara wrote: > > > > > unsigned long status; > > > > > struct irq_desc *desc; /* only set it the irq corresponds to a > > > > > physical irq */ > > > > > unsig

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Julien Grall
Hi Stefano, On 04/06/2017 08:47 PM, Stefano Stabellini wrote: On Thu, 6 Apr 2017, Julien Grall wrote: On 04/06/2017 07:47 PM, Stefano Stabellini wrote: On Thu, 6 Apr 2017, Andre Przywara wrote: unsigned long status; struct irq_desc *desc; /* only set it the irq corresponds to a phys

Re: [Xen-devel] [PATCH v5 13/30] ARM: GICv3: forward pending LPIs to guests

2017-04-06 Thread Stefano Stabellini
On Thu, 6 Apr 2017, Julien Grall wrote: > Hi Stefano, > > On 04/06/2017 08:47 PM, Stefano Stabellini wrote: > > On Thu, 6 Apr 2017, Julien Grall wrote: > > > On 04/06/2017 07:47 PM, Stefano Stabellini wrote: > > > > On Thu, 6 Apr 2017, Andre Przywara wrote: > > > > > > > unsigned long status;