From: Alex Williamson <alex.williamson@redhat.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: bhelgaas@google.com, alexander.h.duyck@intel.com,
linux-pci@vger.kernel.org, virtio-dev@lists.oasis-open.org,
kvm@vger.kernel.org, netdev@vger.kernel.org, dan.daly@intel.com,
linux-kernel@vger.kernel.org, mheyne@amazon.de,
liang-min.wang@intel.com, mark.d.rustad@intel.com,
dwmw2@infradead.org, dwmw@amazon.co.uk
Subject: Re: [PATCH 1/3] pci-iov: Add support for unmanaged SR-IOV
Date: Fri, 2 Mar 2018 16:59:19 -0700 [thread overview]
Message-ID: <20180302165919.423cd45b@t450s.home> (raw)
In-Reply-To: <20180302234412.3337.71321.stgit@localhost.localdomain>
On Fri, 02 Mar 2018 15:44:25 -0800
Alexander Duyck <alexander.duyck@gmail.com> wrote:
> From: Alexander Duyck <alexander.h.duyck@intel.com>
>
> This patch is meant to add some basic functionality to support for SR-IOV
> on devices when the VFs are not managed by the kernel. The functions
> provided here can be used by drivers such as vfio-pci and virtio to enable
> SR-IOV on devices that are either managed by userspace, or by some sort of
> firmware entity respectively.
>
> A new sysfs value called sriov_unmanaged_autoprobe has been added. This
> value is used as the drivers_autoprobe setting of the VFs when they are
> being managed by an external entity such as userspace or device firmware
> instead of being managed by the kernel.
>
> One side effect of this change is that the sriov_drivers_autoprobe and
> sriov_unmanaged_autoprobe will only apply their updates when SR-IOV is
> disabled. Attempts to update them when SR-IOV is in use will only update
> the local value and will not update sriov->autoprobe.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
> ---
> Documentation/ABI/testing/sysfs-bus-pci | 17 ++++++++++++++
> drivers/pci/iov.c | 37 +++++++++++++++++++++++++++++++
> drivers/pci/pci-driver.c | 2 +-
> drivers/pci/pci-sysfs.c | 29 ++++++++++++++++++++++++
> drivers/pci/pci.h | 4 +++
> include/linux/pci.h | 1 +
> 6 files changed, 88 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci
> index 44d4b2be92fd..ff0b6c19cb1a 100644
> --- a/Documentation/ABI/testing/sysfs-bus-pci
> +++ b/Documentation/ABI/testing/sysfs-bus-pci
> @@ -323,3 +323,20 @@ Description:
>
> This is similar to /sys/bus/pci/drivers_autoprobe, but
> affects only the VFs associated with a specific PF.
> +
> +What: /sys/bus/pci/devices/.../sriov_unmanaged_autoprobe
> +Date: March 2018
> +Contact: Alexander Duyck <alexander.h.duyck@intel.com>
> +Description:
> + This file is associated with the PF of a device that
> + supports SR-IOV. It determines whether newly-enabled VFs
> + are immediately bound to a driver when the PF driver does
> + not manage the VFs itself. It initially contains 0, which
> + means the kernel will not automatically bind VFs to a driver.
> + If an application writes 1 to the file before enabling VFs,
> + the kernel will bind VFs to a compatible driver immediately
> + after they are enabled.
> +
> + This overrides /sys/bus/pci/devices/.../sriov_drivers_autoprobe
> + when a PF driver is not present to manage a device, or the PF
> + driver does not provide functionality to support SR-IOV.
Given a pf, how does a user determine whether it is managed or unmanaged
and therefore which autoprobe attributes are in effect? Thanks,
Alex
next prev parent reply other threads:[~2018-03-02 23:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 23:44 [PATCH 0/3] pci-iov: Add support for unmanaged SR-IOV Alexander Duyck
2018-03-02 23:44 ` [PATCH 1/3] " Alexander Duyck
2018-03-02 23:59 ` Alex Williamson [this message]
2018-03-03 0:20 ` Alexander Duyck
2018-03-02 23:44 ` [PATCH 2/3] vfio: Add support for unmanaged or userspace managed SR-IOV Alexander Duyck
2018-03-06 4:49 ` kbuild test robot
2018-03-02 23:45 ` [PATCH 3/3] virtio_pci: Add support for unmanaged SR-IOV on virtio_pci devices Alexander Duyck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180302165919.423cd45b@t450s.home \
--to=alex.williamson@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=alexander.h.duyck@intel.com \
--cc=bhelgaas@google.com \
--cc=dan.daly@intel.com \
--cc=dwmw2@infradead.org \
--cc=dwmw@amazon.co.uk \
--cc=kvm@vger.kernel.org \
--cc=liang-min.wang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=mheyne@amazon.de \
--cc=netdev@vger.kernel.org \
--cc=virtio-dev@lists.oasis-open.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).