From: "Jan Beulich" Subject: Re: xl/SR-IOV: disposition of VFs when PF disappears? Date: Mon, 27 Oct 2014 13:12:42 +0000 Message-ID: <544E52DA0200007800042712@mail.emea.novell.com> References: <544E4A4E020000780004267D@mail.emea.novell.com> <544E4297.1070209@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xik6J-0004OH-F5 for xen-devel@lists.xenproject.org; Mon, 27 Oct 2014 13:12:47 +0000 In-Reply-To: <544E4297.1070209@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: Andrew Cooper Cc: Wei Liu , Stefano Stabellini , Ian Jackson , IanCampbell , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 27.10.14 at 14:03, wrote: > On 27/10/14 12:36, 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? > > Which type of devices are these? Intel having reported that, it's Intel NICs (not sure which driver, but I also don't think this is relevant). > From my recollection using igb and ixgbe with Netscalar, the VFs are > created after the PF driver has bound and started up. Yes, they're being created as the PF driver loads. > Moving the binding from the real PF driver to pciback should remove the > VFs, although I would not be surprised if this has been overlooked, or > is expected to work but currently buggy. Right - as a side effect of the PF getting unbound from its driver. > As a logical consequence of the above, a PF with VFs must strictly not > be assignable, for safety reasons. I don't think this should be enforced, but rather left to the discretion of the host admin. > There are security considerations involved with passing a PF to a > domain, as that domU can still cause VFs to appear in dom0. A PF should > either stay in dom0, be given to a trusted device driver domain. How would a PF driver in a DomU cause VFs to appear in Dom0? These aren't being found by scanning the bus, but rather get created via software means afaik. Jan