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

Re: [Xen-devel] Possible bug on ARM with irq passthrough

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:

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
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

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.

This would happen if some of the pCPUs are idle states (using wfi).r.
The main difference between credit1 and credit2 (I am not sure for RTDS) is there are IPI traffic with credit1 on idle pCPU because of the ticker.

Dario, do you have any status on this bug? I think we should consider
it as a blocker for Xen 4.10.





    Ivan Pavic

Xen-devel mailing list



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