xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Ivan Pavic <ivan.pavic2@fer.hr>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Dario Faggioli <dario.faggioli@citrix.com>
Subject: Re: Possible bug on ARM with irq passthrough
Date: Fri, 7 Jul 2017 17:19:33 +0100	[thread overview]
Message-ID: <f50b70ea-c3fe-a98e-1b83-ba2189238399@arm.com> (raw)
In-Reply-To: <04ec8977-2865-b210-ffaf-b757f1f015dc@fer.hr>

Hi Ivan,

On 05/07/17 14:50, Ivan Pavic wrote:
>
>
> On 07/05/2017 02:55 PM, Julien Grall wrote:
>> Hi Ivan,
>>
>> On 05/07/17 13:36, Ivan Pavic wrote:
>>> On 07/05/2017 01:27 PM, Julien Grall wrote:
>>>> On 04/07/17 21:20, Ivan Pavić2 wrote:
>>>>> Hello,
>>>>
>>>> Hi Ivan,
>>>>
>>>>> I'm testing IRQ latency on exynos5422. I'm using Xen 4.10-unstable. I
>>>>> used device passthrough for SPI irq 64. For guest domain I used
>>>>> FreeRTOS. When I use credit scheduler after destruction of domain,
>>>>> IRQ is released. I changed scheduler to credit2 and rtds at boot time
>>>>> and IRQ wasn't released after destruction. xl create
>>>>> dom-free-rtos.cfg fails with:
>>>>>
>>>>> libxl: error: libxl_create.c:1278:domcreate_launch_dm: Domain
>>>>> 5:failed give domain access to irq 64: Device or resource busy
>>>>>
>>>>> This is very strange because it doesn't happen with credit scheduler.
>>>>> This is output of xl dmesg:
>>>>>
>>>>> (XEN) IRQ 64 is already used by domain 1
>>>>>
>>>>> Everything works first time but when I destroy domain and try to
>>>>> create again it fails. It works normally with credit scheduler. In
>>>>> dom-free-rtos.cfg:
>>>>> ...
>>>>> irqs = [64]
>>>>> ....
>>>>
>>>> The Domain 1 still seems to be alive, you can confirm by via "xl
>>>> list". You said it works with credit but not credit2. I think you hit
>>>> the bug described in [1].
>>> I checked xl-list. There is no domain with id 1, only dom0. Also I tried
>>> xenctx 1 which resulted in
>>>     xc_domain_getinfo: No such process
>>>
>>> Same problem is with rtds scheduler. As I said, no problem with credit
>>> scheduler.
>>
>> IRQs assigned to a domain will be released by domain_vgic_free() when
>> calling release_guest_irq(). This is called by Xen when the domain is
>> fully destroyed.
>>
>> It might be possible the domain is waiting to be fully destroyed, and
>> therefore hidden from the toolstack. Can you check if the domain is
>> been destroyed by Xen. You can add printk in domain_destroy and
>> complete_domain_destroy.
>>
>>  * domain_destroy is called when there is no more reference on the
>> domain (see put_domain)
>>  * complete_domain_destroy is called when RCU is quiescent
>>
>> If you got a message in the former, but not the latter. Then you hit
>> the bug described in my previous e-mail.
>     Yes, I've got message only in domain_destroy.

Ok, so you are hitting the bug described in my previous e-mail. I would 
recommend to stick on credit1 until this bug is fixed (I will mark it as 
a blocker).

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-07-07 16:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04 20:20 Possible bug on ARM with irq passthrough Ivan Pavić2
2017-07-05 11:27 ` Julien Grall
2017-07-05 12:36   ` Ivan Pavic
2017-07-05 12:55     ` Julien Grall
2017-07-05 13:42       ` Dario Faggioli
2017-07-05 13:50       ` Ivan Pavic
2017-07-07 16:19         ` Julien Grall [this message]
2017-07-08  7:25           ` Dario Faggioli
2017-07-27 11:27             ` Dario Faggioli
2017-07-05 13:39   ` Dario Faggioli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f50b70ea-c3fe-a98e-1b83-ba2189238399@arm.com \
    --to=julien.grall@arm.com \
    --cc=dario.faggioli@citrix.com \
    --cc=ivan.pavic2@fer.hr \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).