Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-28 Thread Stefano Stabellini
On Fri, 28 Jun 2013, Zhenzhong Duan wrote: > On 2013-06-27 19:52, Stefano Stabellini wrote: > > On Thu, 27 Jun 2013, Zhenzhong Duan wrote: > > > On 2013-06-27 02:08, Stefano Stabellini wrote: > > > > On Wed, 26 Jun 2013, Zhenzhong Duan wrote: > > > > > On 2013-06-26 01:51, Stefano Stabellini wrote:

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-27 Thread Zhenzhong Duan
On 2013-06-27 19:52, Stefano Stabellini wrote: On Thu, 27 Jun 2013, Zhenzhong Duan wrote: On 2013-06-27 02:08, Stefano Stabellini wrote: On Wed, 26 Jun 2013, Zhenzhong Duan wrote: On 2013-06-26 01:51, Stefano Stabellini wrote: On Tue, 25 Jun 2013, DuanZhenzhong wrote: Stefano Stabellini wro

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-27 Thread Stefano Stabellini
On Thu, 27 Jun 2013, Zhenzhong Duan wrote: > On 2013-06-27 02:08, Stefano Stabellini wrote: > > On Wed, 26 Jun 2013, Zhenzhong Duan wrote: > > > On 2013-06-26 01:51, Stefano Stabellini wrote: > > > > On Tue, 25 Jun 2013, DuanZhenzhong wrote: > > > > > Stefano Stabellini wrote: > > > > > > Trimming

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-26 Thread Zhenzhong Duan
On 2013-06-27 02:08, Stefano Stabellini wrote: On Wed, 26 Jun 2013, Zhenzhong Duan wrote: On 2013-06-26 01:51, Stefano Stabellini wrote: On Tue, 25 Jun 2013, DuanZhenzhong wrote: Stefano Stabellini wrote: Trimming some of the people in CC On Mon, 24 Jun 2013, Zhenzhong Duan wrote: On

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-26 Thread Stefano Stabellini
On Wed, 26 Jun 2013, Zhenzhong Duan wrote: > On 2013-06-26 01:51, Stefano Stabellini wrote: > > On Tue, 25 Jun 2013, DuanZhenzhong wrote: > > > Stefano Stabellini wrote: > > > > Trimming some of the people in CC > > > > > > > > On Mon, 24 Jun 2013, Zhenzhong Duan wrote: > > > > > > > > > On 20

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-25 Thread Zhenzhong Duan
On 2013-06-26 01:51, Stefano Stabellini wrote: On Tue, 25 Jun 2013, DuanZhenzhong wrote: Stefano Stabellini wrote: Trimming some of the people in CC On Mon, 24 Jun 2013, Zhenzhong Duan wrote: On 2013-06-20 22:21, Stefano Stabellini wrote: On Thu, 20 Jun 2013, Zhenzhong Duan wrote:

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-25 Thread Stefano Stabellini
On Tue, 25 Jun 2013, DuanZhenzhong wrote: > Stefano Stabellini wrote: > > Trimming some of the people in CC > > > > On Mon, 24 Jun 2013, Zhenzhong Duan wrote: > > > > > On 2013-06-20 22:21, Stefano Stabellini wrote: > > > > > > > On Thu, 20 Jun 2013, Zhenzhong Duan wrote: > > > > >

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-24 Thread DuanZhenzhong
Stefano Stabellini wrote: Trimming some of the people in CC On Mon, 24 Jun 2013, Zhenzhong Duan wrote: On 2013-06-20 22:21, Stefano Stabellini wrote: On Thu, 20 Jun 2013, Zhenzhong Duan wrote: On 2013-06-05 20:50, Stefano Stabellini wrote: On Wed, 5 Jun 2013, Zhenzhon

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-24 Thread Stefano Stabellini
Trimming some of the people in CC On Mon, 24 Jun 2013, Zhenzhong Duan wrote: > On 2013-06-20 22:21, Stefano Stabellini wrote: > > On Thu, 20 Jun 2013, Zhenzhong Duan wrote: > > > On 2013-06-05 20:50, Stefano Stabellini wrote: > > > > On Wed, 5 Jun 2013, Zhenzhong Duan wrote: > > > > > Stefano Stab

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-24 Thread Zhenzhong Duan
On 2013-06-20 22:21, Stefano Stabellini wrote: On Thu, 20 Jun 2013, Zhenzhong Duan wrote: On 2013-06-05 20:50, Stefano Stabellini wrote: On Wed, 5 Jun 2013, Zhenzhong Duan wrote: Stefano Stabellini wrote: On Tue, 21 May 2013, Stefano Stabellini wrote: On Tue, 21 May 2013, Konrad Rzeszut

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-20 Thread Stefano Stabellini
On Thu, 20 Jun 2013, Zhenzhong Duan wrote: > On 2013-06-05 20:50, Stefano Stabellini wrote: > > On Wed, 5 Jun 2013, Zhenzhong Duan wrote: > > > Stefano Stabellini wrote: > > > > > > On Tue, 21 May 2013, Stefano Stabellini wrote: > > > > > > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > >

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-19 Thread Zhenzhong Duan
On 2013-06-05 20:50, Stefano Stabellini wrote: On Wed, 5 Jun 2013, Zhenzhong Duan wrote: Stefano Stabellini wrote: On Tue, 21 May 2013, Stefano Stabellini wrote: On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: Looking at the hypervisor code I couldn't see anything obviously wro

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-06-05 Thread Stefano Stabellini
On Wed, 5 Jun 2013, Zhenzhong Duan wrote: > Stefano Stabellini wrote: > > On Tue, 21 May 2013, Stefano Stabellini wrote: > > > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > > I think the culpr

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-30 Thread Konrad Rzeszutek Wilk
On Wed, May 29, 2013 at 06:50:41PM +0100, Stefano Stabellini wrote: > On Tue, 21 May 2013, Stefano Stabellini wrote: > > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > > > > > I think the culprit is "physdev_unm

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-29 Thread Stefano Stabellini
On Tue, 21 May 2013, Stefano Stabellini wrote: > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > > > I think the culprit is "physdev_unmap_pirq": > > > >if ( is_hvm_domain(d) )

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Jan Beulich
>>> On 22.05.13 at 18:41, Konrad Rzeszutek Wilk wrote: > On Wed, May 22, 2013 at 04:25:10PM +0100, Jan Beulich wrote: >> Okay, that clarifies it quite a bit. For one, I'll leave any of the >> emuirq stuff to Stefano, who wrote this originally. And then, from >> the beginning of this thread, I'm no

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 04:25:10PM +0100, Jan Beulich wrote: > >>> On 22.05.13 at 17:14, Konrad Rzeszutek Wilk > >>> wrote: > > The physdev_unmap_pirq (from PHYSDEVOP_unmap_pirq), only has this > > check: > > if (domain_pirq_to_emuirq(d, pirq) != IRQ_UNBOUND) > > > > and since the arch.hvm.emui

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Jan Beulich
>>> On 22.05.13 at 17:14, Konrad Rzeszutek Wilk wrote: > The physdev_unmap_pirq (from PHYSDEVOP_unmap_pirq), only has this > check: > if (domain_pirq_to_emuirq(d, pirq) != IRQ_UNBOUND) > > and since the arch.hvm.emuirq is IRQ_UNBOUND (-1), it does not > call unmap_domain_pirq_emuirq. It probably

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Konrad Rzeszutek Wilk
On Wed, May 22, 2013 at 10:37:39AM +0100, Jan Beulich wrote: > >>> On 22.05.13 at 00:41, Konrad Rzeszutek Wilk > >>> wrote: > > On Tue, May 21, 2013 at 10:50:09PM +0100, Stefano Stabellini wrote: > >> We have to be careful about this: the point of PHYSDEVOP_get_free_pirq is > >> that Linux can kn

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-22 Thread Jan Beulich
>>> On 22.05.13 at 00:41, Konrad Rzeszutek Wilk wrote: > On Tue, May 21, 2013 at 10:50:09PM +0100, Stefano Stabellini wrote: >> We have to be careful about this: the point of PHYSDEVOP_get_free_pirq is >> that Linux can know for sure the pirq that is going to be used to map the >> MSI by QEMU. If

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
On Tue, May 21, 2013 at 10:50:09PM +0100, Stefano Stabellini wrote: > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > On Tue, May 21, 2013 at 05:51:02PM +0100, Stefano Stabellini wrote: > > > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > > > Looking at the hypervisor code I couldn't

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Stefano Stabellini
On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > On Tue, May 21, 2013 at 05:51:02PM +0100, Stefano Stabellini wrote: > > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > > > > > I think the culprit is "physdev_

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
On Tue, May 21, 2013 at 05:51:02PM +0100, Stefano Stabellini wrote: > On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > > > I think the culprit is "physdev_unmap_pirq": > > > >if ( is_hvm_domain(d) )

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Stefano Stabellini
On Tue, 21 May 2013, Konrad Rzeszutek Wilk wrote: > > Looking at the hypervisor code I couldn't see anything obviously wrong. > > I think the culprit is "physdev_unmap_pirq": > >if ( is_hvm_domain(d) ) > > {

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread Konrad Rzeszutek Wilk
> Looking at the hypervisor code I couldn't see anything obviously wrong. I think the culprit is "physdev_unmap_pirq": if ( is_hvm_domain(d) ) { spin_lock

Re: [Xen-devel] [PATCH] xen: reuse the same pirq allocated when driver load first time

2013-05-21 Thread David Vrabel
On 20/05/13 21:38, Konrad Rzeszutek Wilk wrote: >> At this point I think that upstream option is to save the PIRQ value and >> re-use it. >> Will post a patch for it. > > Here is the patch. It works for me when passing in a NIC driver. > >>From 509499568d1cdf1f2a3fb53773c991f4b063eb56 Mon Sep 17