From: "Jan Beulich" Subject: Re: xl/SR-IOV: disposition of VFs when PF disappears? Date: Mon, 27 Oct 2014 13:07:24 +0000 Message-ID: <544E519C0200007800042702@mail.emea.novell.com> References: <544E4A4E020000780004267D@mail.emea.novell.com> <1414414666.23883.13.camel@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xik1B-00044L-9J for xen-devel@lists.xenproject.org; Mon, 27 Oct 2014 13:07:29 +0000 In-Reply-To: <1414414666.23883.13.camel@eu.citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Ian Jackson , Wei Liu , xen-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 27.10.14 at 13:57, wrote: > On Mon, 2014-10-27 at 12:36 +0000, Jan Beulich wrote: >> All, >> >> Intel reports that the sequence >> >> - xl pci-assignable-add >> - briefly run guest using that device [not sure whether that's really a >> necessary step] >> - xl pci-assignable-add >> >> results in both VF and PF being listed as assignable (the fact that as a >> result the PF handed to a guest doesn't work is secondary here, as I >> think this is a driver issue). Is that really how it should be? Shouldn't >> instead all VFs get removed when the PF device (e.g. due to the >> PF driver getting unloaded, which is a necessary part of making it >> assignable) goes away? Or is it required for the admin to manually >> remove the assignable VFs prior to making the PF go away? > > xl is just controlling/exposing the set of devices which are bound to > pciback here. (pci-assignable-list is literally a readdir loop over the > relevant sysfs dir). Ah, good to know. In that case yes, pciback ought to be honoring device removal. > I'm not sure if it should be up to (lib)xl, pciback or the core Linux > pci stuff to handle the creation/destruction of VF devices when the PF > driver is unbound/assigned. In fact I'm not even sure if VF lifetime is > in any way tied to the PF driver state. Yes, it is (at least in practice on the NICs I've seen, but iirc the spec also says so) - VFs won't work without a PF driver in place. Jan