| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: Keystone Issue
 On 2020-06-10 09:06, Bertrand Marquis wrote: Hi,On 9 Jun 2020, at 18:45, Marc Zyngier <maz@xxxxxxxxxx> wrote: Hi Julien, On 2020-06-09 18:32, Julien Grall wrote:(+ Marc) On 09/06/2020 18:03, Bertrand Marquis wrote:HiAgree the maintenance interrupt would definitely be the right solutionOn 9 Jun 2020, at 16:47, Julien Grall <julien@xxxxxxx> wrote: On 09/06/2020 16:28, Bertrand Marquis wrote:Are you suggesting the guest EOI is not properly forwarded to the hardware when LR.HW is set? If so, this could possibly be workaround in Xen by raising a maintenance interrupt every time a guest EOI an interrupt.Hi,On 9 Jun 2020, at 15:33, CodeWiz2280 <codewiz2280@xxxxxxxxx> wrote: There does appear to be a secondary (CIC) controller that can forward events to the GIC-400 and EDMA controllers for the keystone 2 family.I do not remember of any CIC but the behaviour definitely look like an interrupt acknowledge problem.Admittedly, i'm not sure how it is being used with regards to theperipherals. I only see mention of the GIC-400 parent for the devices in the device tree. Maybe Bertrand has a better idea on whether any peripherals go through the CIC first? I see that gic_interrupt () fires once in Xen, which calls doIRQ to push out the virtual interrupt to the dom0 kernel. The dom0 kernel then handles the interrupt andreturns, but gic_interrupt() never fires again in Xen.Could you try the following: --- a/xen/arch/arm/gic-v2.c +++ b/xen/arch/arm/gic-v2.c@@ -667,6 +667,9 @@ static void gicv2_guest_irq_end(struct irq_desc *desc) Can you please check this with the TI folks? It may be fixable if the bridge is SW configurable. So the only way to solve this is actually to do the interrupt deactivate inside Xen (using a maintenance interrupt). That's a terrible hack, and one that would encourage badly integrated HW. I appreciate the need to "make things work", but I'd be wary of puttingthis in released SW. Broken HW must die. I have written more than my share of these terrible hacks (see TX1 support), and I deeply regret it, as it has only given Si vendors an excuse not to fix things. I remember that I also had to do something specific for the configuration of edge/level and priorities to have an almost proper behaviour. Well, the moment the GIC observes secure accesses when they should be non-secure, all bets are off and you have to resort to the above hacks. The fun part is that if you have secure SW running on this platform, you can probably DoS it from non-secure. It's good, isn't it? Sadly I have no access to the code anymore, so I would need to guess back what that was.. 
I'd say this *is* a good thing.
        M.
--
Jazz is not dead. It just smells funny...
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |