lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 28 Sep 2017 08:22:16 -0400 From: Don Dutile <ddutile@...hat.com> To: Alexander Duyck <alexander.duyck@...il.com>, David Woodhouse <dwmw2@...radead.org> Cc: Bjorn Helgaas <helgaas@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-pci <linux-pci@...r.kernel.org>, linux-kernel <linux-kernel@...r.kernel.org>, Alexander Duyck <alexander.h.duyck@...el.com>, "Bryant G. Ly" <bryantly@...ux.vnet.ibm.com>, Bodong Wang <bodong@...lanox.com>, Alex Williamson <alex.williamson@...hat.com>, "Michael S. Tsirkin" <mst@...hat.com>, kvm@...r.kernel.org Subject: Re: [PATCH] uio/uio_pci_generic: Add SR-IOV support On 09/27/2017 07:06 PM, Alexander Duyck wrote: > On Wed, Sep 27, 2017 at 3:20 PM, David Woodhouse <dwmw2@...radead.org> wrote: >> On Wed, 2017-09-27 at 17:00 -0500, Bjorn Helgaas wrote: >>> >>> >>> IIUC, this question is basically "why doesn't the PCI core enable IOV >>> automatically when it sees an IOV-capable device?" >>> >>> I think one reason is that an admin might want to control the number >>> of VFs we enable (e.g., via 1789382a72a5 ("PCI: SRIOV control and >>> status via sysfs" [1]). But I guess you already know about that, >>> since this patch uses that sysfs path, so maybe I don't understand >>> your question. >> >> >> I mean, why doesn't the PCI core *allow* SR-IOV to be enabled via >> sysfs, unless the driver does this? > > The general idea is that the driver usually has to free up resources > so they can be reassigned to the VF devices. > > For example in the case of the Intel NICs enabling SR-IOV reassigns > the queues to the VFs, and the PF has to be aware that this change is > happening so that it doesn't try to make use of queues that then > belong to the VFs. > > - Alex > After reading Alex's response, I now understand Dave's question better and why the patch won't work in general. In every SRIOV capable device I've run into to date, the PF has to know the VFs are being assigned due to some resource mgmt, if not internal (e.g., switch) configuration reasons. The reasons are often subtle. From the context of the patches (uio), why aren't VFs enabled via user-level sysfs interface? That was provided for user-mgmt apps to have a PCIe-generic/common, device-independent method of VF enablement (read: libvirt for device-assignment of VFs to VMs). This also enables one to manage it at a finer, not-all-or-nothing level, which is good due to bios strengths/weaknesses that various systems have for SRIOV/VF-enablement.
Powered by blists - more mailing lists