1.. SPDX-License-Identifier: GPL-2.0+
2.. note: can be edited and viewed with /usr/bin/formiko-vim
3
4==========================================================
5PCI VFIO driver for the AMD/Pensando(R) DSC adapter family
6==========================================================
7
8AMD/Pensando Linux VFIO PCI Device Driver
9Copyright(c) 2023 Advanced Micro Devices, Inc.
10
11Overview
12========
13
14The ``pds-vfio-pci`` module is a PCI driver that supports Live Migration
15capable Virtual Function (VF) devices in the DSC hardware.
16
17Using the device
18================
19
20The pds-vfio-pci device is enabled via multiple configuration steps and
21depends on the ``pds_core`` driver to create and enable SR-IOV Virtual
22Function devices.
23
24Shown below are the steps to bind the driver to a VF and also to the
25associated auxiliary device created by the ``pds_core`` driver. This
26example assumes the pds_core and pds-vfio-pci modules are already
27loaded.
28
29.. code-block:: bash
30  :name: example-setup-script
31
32  #!/bin/bash
33
34  PF_BUS="0000:60"
35  PF_BDF="0000:60:00.0"
36  VF_BDF="0000:60:00.1"
37
38  # Prevent non-vfio VF driver from probing the VF device
39  echo 0 > /sys/class/pci_bus/$PF_BUS/device/$PF_BDF/sriov_drivers_autoprobe
40
41  # Create single VF for Live Migration via pds_core
42  echo 1 > /sys/bus/pci/drivers/pds_core/$PF_BDF/sriov_numvfs
43
44  # Allow the VF to be bound to the pds-vfio-pci driver
45  echo "pds-vfio-pci" > /sys/class/pci_bus/$PF_BUS/device/$VF_BDF/driver_override
46
47  # Bind the VF to the pds-vfio-pci driver
48  echo "$VF_BDF" > /sys/bus/pci/drivers/pds-vfio-pci/bind
49
50After performing the steps above, a file in /dev/vfio/<iommu_group>
51should have been created.
52
53
54Enabling the driver
55===================
56
57The driver is enabled via the standard kernel configuration system,
58using the make command::
59
60  make oldconfig/menuconfig/etc.
61
62The driver is located in the menu structure at:
63
64  -> Device Drivers
65    -> VFIO Non-Privileged userspace driver framework
66      -> VFIO support for PDS PCI devices
67
68Support
69=======
70
71For general Linux networking support, please use the netdev mailing
72list, which is monitored by Pensando personnel::
73
74  netdev@vger.kernel.org
75
76For more specific support needs, please use the Pensando driver support
77email::
78
79  drivers@pensando.io
80