[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keystone Issue


  • To: CodeWiz2280 <codewiz2280@xxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 9 Jun 2020 17:05:56 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ROTFjDWmhBnCCOeV+iChPmj7xKuwbzclHrRQGgb0oYw=; b=eofFkdSiCdL+HVMwQ9RJAwA7QQSUYJ9X+5iAsldDd8r0/2aDAHMjSmqz1OL8rHKErNVIjUKioY6n5VNsdYtz9fTAtPpC7gFXDWQgnMY7oQ6iVCn9GCyyqspaaGAWYmok9QfVojv30mHet4nhF8qmbzbxGKNzdusb9CQbsiwhbKjGLyTRzimQLzZzkkbjFWdFw1L4bAECNLZIqy8QUDHTSVA0qzEpStNMTr4vvTklL+ZKpOS7KFIrkgjDqBkCrpmga5tZlIR1YvEfPCif2TUuCXVNu9T+2XGzFMPcufjS3cErCVKFUygT3yqhnbgAE2Mv7hXEHyuk+Yf6pdlNvlCPxg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jrtuHnSH4c3Lar1juExLlnQovkdFhuu57nSWqb5g2W3W5W6o/6k/MujHIA5g1Ce1i1Y1j2JBXBzhMBOuVKL2g04a3O9AAit1I4uCXsDbDgXtVkEwZeBqNgxzx/vdFXXiHv6BlurUXPVtHqhmyyMlRzcZ2vE3ywVliFfeVgs/0cNnt4X5waZCueXlQISgtvUDloA2iyu7pKW3Sx/+fhMECE4xSWspd8PWhW9lCTLEtN1Cpb0J3D/duUiGkV6iqJxwMlManyN8qADY1u1ldzJI8A6QUjynEoMwo8h6Q5sgqBtBig8oJLz/xfYRhlWyU8Y82jx8j1Xrdae1NT03VXp6Xg==
  • Authentication-results-original: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 09 Jun 2020 17:06:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWOBaIAfEL/lLkK0WiNSn4kZcZc6jDwRQAgAAfVYCAACZwgIACvmKAgABfPYCAAA+JgIAA6NEAgAAP9wCAAAJxgIAAEuGAgAAfEwCAAGmFAIAAh2UAgABV34CAAFCtAIAAAUSAgAADZQCAAAGKgIAAJpOAgABE7QCABAZcAIAAQRIAgAA9oACAAXYtAIAAD3sAgAAFaoCAAAL0gIAAEuIA
  • Thread-topic: Keystone Issue


> On 9 Jun 2020, at 16:58, CodeWiz2280 <codewiz2280@xxxxxxxxx> wrote:
> 
> On Tue, Jun 9, 2020 at 11:47 AM Julien Grall <julien@xxxxxxx> wrote:
>> 
>> 
>> 
>> On 09/06/2020 16:28, Bertrand Marquis wrote:
>>> 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.
>>>> Admittedly, i'm not sure how it is being used with regards to the
>>>> peripherals.  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 and
>>>> returns, but gic_interrupt() never fires again in Xen.
>>> 
>>> I do not remember of any CIC but the behaviour definitely look like an 
>>> interrupt acknowledge problem.
>>> 
>>> 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)
>>>      /* Lower the priority of the IRQ */
>>>      gicv2_eoi_irq(desc);
>>>      /* Deactivation happens in maintenance interrupt / via GICV */
>>> +
>>> +    /* Test for Keystone2 */
>>> +    gicv2_dir_irq(desc);
>>>  }
>>> 
>>> I think the problem I had was related to the vgic not deactivating properly 
>>> the interrupt.
>> 
> This seemed to help with the edge triggered interrupts, e.g. UART

So the missing ack is definitely the issue.

> 
>> 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.
>> 
>>> This might make the interrupt fire indefinitely !!
>> 
>> Most likely with level interrupt ;).
>> 
> This is what's happening with the Ethernet driver which is level
> triggered.  I had to temporarily disable it
> to check the patch with the UART driver, otherwise the system would
> hang processing the interrupt
> repeatedly.

This is quite logic yes.
The way forward, as mentioned by Julien, will be to use a maintenance interrupt 
when the interrupt has been handled by the guest so that Xen can do the 
deactivation of the corresponding interrupt.
This will add some overhead but there is probably no other solution.

Cheers
Bertrand




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.