From: Brett Creeley <brett.creeley@amd.com>
To: <kvm@vger.kernel.org>, <netdev@vger.kernel.org>,
<alex.williamson@redhat.com>, <jgg@nvidia.com>,
<yishaih@nvidia.com>, <shameerali.kolothum.thodi@huawei.com>,
<kevin.tian@intel.com>
Cc: <brett.creeley@amd.com>, <shannon.nelson@amd.com>,
<drivers@pensando.io>, <simon.horman@corigine.com>
Subject: [PATCH v8 vfio 7/7] vfio/pds: Add Kconfig and documentation
Date: Tue, 4 Apr 2023 12:01:41 -0700 [thread overview]
Message-ID: <20230404190141.57762-8-brett.creeley@amd.com> (raw)
In-Reply-To: <20230404190141.57762-1-brett.creeley@amd.com>
Add Kconfig entries and pds_vfio.rst. Also, add an entry in the
MAINTAINERS file for this new driver.
It's not clear where documentation for vendor specific VFIO
drivers should live, so just re-use the current amd
ethernet location.
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
---
.../device_drivers/ethernet/amd/pds_vfio.rst | 79 +++++++++++++++++++
.../device_drivers/ethernet/index.rst | 1 +
MAINTAINERS | 7 ++
drivers/vfio/pci/Kconfig | 2 +
drivers/vfio/pci/pds/Kconfig | 20 +++++
5 files changed, 109 insertions(+)
create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst
create mode 100644 drivers/vfio/pci/pds/Kconfig
diff --git a/Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst b/Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst
new file mode 100644
index 000000000000..7bddde0c7c9d
--- /dev/null
+++ b/Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst
@@ -0,0 +1,79 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. note: can be edited and viewed with /usr/bin/formiko-vim
+
+==========================================================
+PCI VFIO driver for the AMD/Pensando(R) DSC adapter family
+==========================================================
+
+AMD/Pensando Linux VFIO PCI Device Driver
+Copyright(c) 2023 Advanced Micro Devices, Inc.
+
+Overview
+========
+
+The ``pds_vfio`` module is a PCI driver that supports Live Migration
+capable Virtual Function (VF) devices in the DSC hardware.
+
+Using the device
+================
+
+The pds_vfio device is enabled via multiple configuration steps and
+depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
+Function devices.
+
+Shown below are the steps to bind the driver to a VF and also to the
+associated auxiliary device created by the ``pds_core`` driver. This
+example assumes the pds_core and pds_vfio modules are already
+loaded.
+
+.. code-block:: bash
+ :name: example-setup-script
+
+ #!/bin/bash
+
+ PF_BUS="0000:60"
+ PF_BDF="0000:60:00.0"
+ VF_BDF="0000:60:00.1"
+
+ # Prevent non-vfio VF driver from probing the VF device
+ echo 0 > /sys/class/pci_bus/$PF_BUS/device/$PF_BDF/sriov_drivers_autoprobe
+
+ # Create single VF for Live Migration via VFIO
+ echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
+
+ # Allow the VF to be bound to the pds_vfio driver
+ echo "pds_vfio" > /sys/class/pci_bus/$PF_BUS/device/$VF_BDF/driver_override
+
+ # Bind the VF to the pds_vfio driver
+ echo "$VF_BDF" > /sys/bus/pci/drivers/pds_vfio/bind
+
+After performing the steps above, a file in /dev/vfio/<iommu_group>
+should have been created.
+
+
+Enabling the driver
+===================
+
+The driver is enabled via the standard kernel configuration system,
+using the make command::
+
+ make oldconfig/menuconfig/etc.
+
+The driver is located in the menu structure at:
+
+ -> Device Drivers
+ -> VFIO Non-Privileged userspace driver framework
+ -> VFIO support for PDS PCI devices
+
+Support
+=======
+
+For general Linux networking support, please use the netdev mailing
+list, which is monitored by Pensando personnel::
+
+ netdev@vger.kernel.org
+
+For more specific support needs, please use the Pensando driver support
+email::
+
+ drivers@pensando.io
diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst
index eaaf284e69e6..3b456406ff85 100644
--- a/Documentation/networking/device_drivers/ethernet/index.rst
+++ b/Documentation/networking/device_drivers/ethernet/index.rst
@@ -14,6 +14,7 @@ Contents:
3com/vortex
amazon/ena
amd/pds_core
+ amd/pds_vfio
altera/altera_tse
aquantia/atlantic
chelsio/cxgb
diff --git a/MAINTAINERS b/MAINTAINERS
index 97e2919baf4b..73b2b8225acc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21959,6 +21959,13 @@ S: Maintained
P: Documentation/driver-api/vfio-pci-device-specific-driver-acceptance.rst
F: drivers/vfio/pci/*/
+VFIO PDS PCI DRIVER
+M: Brett Creeley <brett.creeley@amd.com>
+L: kvm@vger.kernel.org
+S: Maintained
+F: Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst
+F: drivers/vfio/pci/pds/
+
VFIO PLATFORM DRIVER
M: Eric Auger <eric.auger@redhat.com>
L: kvm@vger.kernel.org
diff --git a/drivers/vfio/pci/Kconfig b/drivers/vfio/pci/Kconfig
index f9d0c908e738..2c3831dd60ef 100644
--- a/drivers/vfio/pci/Kconfig
+++ b/drivers/vfio/pci/Kconfig
@@ -59,4 +59,6 @@ source "drivers/vfio/pci/mlx5/Kconfig"
source "drivers/vfio/pci/hisilicon/Kconfig"
+source "drivers/vfio/pci/pds/Kconfig"
+
endif
diff --git a/drivers/vfio/pci/pds/Kconfig b/drivers/vfio/pci/pds/Kconfig
new file mode 100644
index 000000000000..149d4986bf43
--- /dev/null
+++ b/drivers/vfio/pci/pds/Kconfig
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2023 Advanced Micro Devices, Inc.
+
+config PDS_VFIO_PCI
+ tristate "VFIO support for PDS PCI devices"
+ depends on PDS_CORE
+ depends on VFIO_PCI_CORE
+ help
+ This provides generic PCI support for PDS devices using the VFIO
+ framework.
+
+ More specific information on this driver can be
+ found in
+ <file:Documentation/networking/device_drivers/ethernet/amd/pds_vfio.rst>.
+
+ To compile this driver as a module, choose M here. The module
+ will be called pds_vfio.
+
+ If you don't know what to do here, say N.
+
--
2.17.1
next prev parent reply other threads:[~2023-04-04 19:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 19:01 [PATCH v8 vfio 0/7] pds_vfio driver Brett Creeley
2023-04-04 19:01 ` [PATCH v8 vfio 1/7] vfio: Commonize combine_ranges for use in other VFIO drivers Brett Creeley
2023-04-14 12:31 ` Jason Gunthorpe
2023-04-04 19:01 ` [PATCH v8 vfio 2/7] vfio/pds: Initial support for pds_vfio VFIO driver Brett Creeley
2023-04-04 19:01 ` [PATCH v8 vfio 3/7] vfio/pds: register with the pds_core PF Brett Creeley
2023-04-10 20:41 ` Alex Williamson
2023-04-11 17:09 ` Brett Creeley
2023-04-14 12:43 ` Jason Gunthorpe
2023-04-17 18:42 ` Shannon Nelson
2023-04-21 0:42 ` Brett Creeley
2023-04-04 19:01 ` [PATCH v8 vfio 4/7] vfio/pds: Add VFIO live migration support Brett Creeley
2023-04-10 22:05 ` Alex Williamson
2023-04-11 17:21 ` Brett Creeley
2023-04-14 12:52 ` Jason Gunthorpe
2023-04-04 19:01 ` [PATCH v8 vfio 5/7] vfio/pds: Add support for dirty page tracking Brett Creeley
2023-04-10 22:15 ` Alex Williamson
2023-04-04 19:01 ` [PATCH v8 vfio 6/7] vfio/pds: Add support for firmware recovery Brett Creeley
2023-04-14 12:56 ` Jason Gunthorpe
2023-04-04 19:01 ` Brett Creeley [this message]
2023-04-14 12:57 ` [PATCH v8 vfio 7/7] vfio/pds: Add Kconfig and documentation Jason Gunthorpe
2023-04-04 19:03 ` [PATCH v8 vfio 0/7] pds_vfio driver Jason Gunthorpe
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=20230404190141.57762-8-brett.creeley@amd.com \
--to=brett.creeley@amd.com \
--cc=alex.williamson@redhat.com \
--cc=drivers@pensando.io \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=shannon.nelson@amd.com \
--cc=simon.horman@corigine.com \
--cc=yishaih@nvidia.com \
/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).