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]: xl: pci multi-function passthrough v2

To: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]: xl: pci multi-function passthrough v2
From: Simon Horman <horms@xxxxxxxxxxxx>
Date: Tue, 10 Aug 2010 11:25:19 -0400
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 10 Aug 2010 08:26:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1281439546.18490.277.camel@xxxxxxxxxxxxxxxxxxxxxx>
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: <1281355239.18490.259.camel@xxxxxxxxxxxxxxxxxxxxxx> <20100809202703.GL17141@xxxxxxxxxxxx> <1281439546.18490.277.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
On Tue, Aug 10, 2010 at 12:25:46PM +0100, Gianni Tedesco wrote:
> On Mon, 2010-08-09 at 21:27 +0100, Simon Horman wrote:
> > On Mon, Aug 09, 2010 at 01:00:39PM +0100, Gianni Tedesco wrote:
> > > Changes since last time:
> > >  1. Incorporate Stefanos feedback wrt. coding style, commenting
> > >     non-obvious code and making single-function a special-case of
> > >     multi-function
> > >  2. Also fix the case for passing through a single sub-function and
> > >     re-mapping it as a single-function virtual device. (ie: pfunc =
> > >     non-zero, vfunc = zero). Apparently needed for SR-IOV.
> > >  3. One-liner format change in xl pci-list-assignable to make it
> > >    print a copy-and-pasteable BDF.
> > > 8<----------------------------------------
> > > 
> > > Implement PCI pass-through for multi-function devices. The supported BDF
> > > notation is: BB:DD.* - therefore passing-through a subset of functions or
> > > remapping the function numbers is not supported except for when passing
> > > through a single function which will be a virtual function 0.
> > 
> > Is there any plan to extend this to allow for re-mapping and the like.
> > When I worked on the original multi-function support (last year)
> > this seemed to be a requirement of some people.
> I am glad you asked
> I initially planned to support this but it seemed like a nightmare:
> 1. The BDF notation practically becomes a regex language ;)

I don't think its reasonable to say it becomes a regex language.
But I do agree that it becomes more complex.

> 2. For HVM, if a function 0 is not passed through then you don't
>    generate an SCI interrupt for PCI hotplug.

Isn't it sufficient to make sure that the guest sees a function 0,
regardless of what the physical function number is? Or am I missing

> 3. I couldn't imagine a scenario where this wasn't erroneous thing to do

I'm not sure that I understand this point.
I agree that your system should always produce a valid result.
But I think that there are other configurations that are
both valid and useful.

> But if someone can convince me that this is a worth-while thing to do
> (3) then (1) and (2) are just technical problems which can be
> overcome...

People convinced me that it was worthwhile, but I'm not those people.

Xen-devel mailing list