This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH][RFC] pv-ops: fix shared irq device passthrough

To: "Han, Weidong" <weidong.han@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][RFC] pv-ops: fix shared irq device passthrough
From: "Mr. Teo En Ming (Zhang Enming)" <space.time.universe@xxxxxxxxx>
Date: Tue, 10 Nov 2009 14:30:07 +0800
Cc: space.time.universe@xxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "Kay, Allen M" <allen.m.kay@xxxxxxxxx>, "keir.fraser@xxxxxxxxxxxxx" <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 09 Nov 2009 22:30:40 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=xb9+3TWpYESxFeAd7r38KMabseXwa0D4ZgF4539xUNo=; b=ulo+8xmvgfRH2GTRNG4Uz6ibOD7bDb7aVi7ZDpJEZi9Vkj6ZB/88i4sT+vcGj+Grp3 owVuc/WQ69KQ5c+Evh+ejnInhmK/wcs+jJ2QrfREAZsLaj5Ai91MRVPBin/5SCb7b0ZX lXOP85nf9Axw1g4ZAePWhwNs9Kmt5iHMZuvJI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Dg5WDfqXevZ0KwB2NgWcYjhcJrb5psVTOcamSuQfWbzIYiKfbpJFuVOiNkDsIvLM/h S8QwYZdk4UoSkFBQJKRwpNyZdzDUP4fE51MaGUHkyOlxIbqUloWKTHnSMTiPGYtws8RV RE5HkanMCU2A+9bYsYOzg0Kq+stTKWl6wbbbE=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <715D42877B251141A38726ABF5CABF2C05534DC58B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <715D42877B251141A38726ABF5CABF2C05509A75F3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AE60646.7050307@xxxxxxxx> <715D42877B251141A38726ABF5CABF2C05509A7C3A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AEA1D82.8060609@xxxxxxxx> <715D42877B251141A38726ABF5CABF2C0550A02DAD@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AEB5BF9.20307@xxxxxxxx> <715D42877B251141A38726ABF5CABF2C055064A406@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <715D42877B251141A38726ABF5CABF2C0550A64B6C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <715D42877B251141A38726ABF5CABF2C05534DC58B@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Weidong,

Have you seen the debug messages in my qemu-dm log after I have applied the shared irq device passthrough patch version 2 to my pvops dom0 kernel in the other xen-devel mailing list thread for firewire controller passthrough?

Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
My Primary Blog: http://teo-en-ming-aka-zhang-enming.blogspot.com
My Secondary Blog: http://enmingteo.wordpress.com
My Youtube videos: http://www.youtube.com/user/enmingteo
Email: space.time.universe@xxxxxxxxx
Mobile Phone (Starhub Prepaid): +65-8369-2618
Street: Bedok Reservoir Road
Country: Singapore

2009/11/10 Han, Weidong <weidong.han@xxxxxxxxx>

Any comments?


-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Han, Weidong
Sent: 2009年11月2日 18:13
To: 'Jeremy Fitzhardinge'
Cc: 'xen-devel@xxxxxxxxxxxxxxxxxxx'; Kay, Allen M; 'keir.fraser@xxxxxxxxxxxxx'
Subject: RE: [Xen-devel] [PATCH][RFC] pv-ops: fix shared irq device passthrough

Hi Jeremy,

Instead of changing kernel __setup_irq and use probing_irq to determine if pirq is shareable or not, I changed to set shareable flag in irq_info according to trigger mode in xen_allocate_pirq. Set level triggered interrupts shareable. This patch doesn't touch kernel IRQ code, it only changes xen related code. Do you think it is reasonable? Attached the patch.


Han, Weidong wrote:
> Jeremy Fitzhardinge wrote:
>> On 10/30/09 02:29, Han, Weidong wrote:
>>> All devices will call probing_irq in startup_pirq, which bind pirq
>>> to event channel. But now probing_irq always returns false, then all
>>> pirqs are not shareable. In my system, a PCI NIC, an USB controller
>>> and an IDE interface device share the same IRQ 18. Because above
>>> reason, pirq 18 is set not shareable. So when I hide the PCI NIC,
>>> and assign it to guest, it fails in guest_bind_pirq, therefore the
>>> PCI NIC in guest cannot work, even impact the devices who share the
>>> IRQ 18.
>>> If don't want to change __setup_irq code like my patch does, current
>>> probing_irq is useless (always return false). The problem is there
>>> is almost no information in desc can be used in probing_irq if
>>> desc->action is NULL. Keir, do you have any ideas?
>> I think the intent of probing_irq is to detect irqs which are being
>> used to probe for an interrupt during driver initialization.  This
>> should only be used for things like ISA which don't have any way to
>> explicitly find out what irq a device is attached to.
>> Given that ISA devices aren't very interesting and no driver should
>> need to do that kind of probing under Xen, I wonder if we can't just
>> remove the whole test?
>>     J
> Not only ISA devices, but also PCI devices will use probing_irq. ISA
> devices are indeed not interesting, VT-d only assigns PCI devices. In
> fact, Sharing interrupt between assigned devices and host devices is
> not happy situation. We put much effort to make it work long time
> ago. If there is really no good approach, one alternate is add a
> limit of device assignment: don't allow assign PCI devices which
> share interrupt with other devices.
> Regards,
> Weidong

Xen-devel mailing list

Xen-devel mailing list