| 1 |
.. SPDX-License-Identifier: GPL-2.0+ |
| 2 |
.. note: can be edited and viewed with /usr/bin/formiko-vim |
| 3 |
|
| 4 |
========================================================== |
| 5 |
PCI VFIO driver for the AMD/Pensando(R) DSC adapter family |
| 6 |
========================================================== |
| 7 |
|
| 8 |
AMD/Pensando Linux VFIO PCI Device Driver |
| 9 |
Copyright(c) 2023 Advanced Micro Devices, Inc. |
| 10 |
|
| 11 |
Overview |
| 12 |
======== |
| 13 |
|
| 14 |
The ``pds-vfio-pci`` module is a PCI driver that supports Live Migration |
| 15 |
capable Virtual Function (VF) devices in the DSC hardware. |
| 16 |
|
| 17 |
Using the device |
| 18 |
================ |
| 19 |
|
| 20 |
The pds-vfio-pci device is enabled via multiple configuration steps and |
| 21 |
depends on the ``pds_core`` driver to create and enable SR-IOV Virtual |
| 22 |
Function devices. |
| 23 |
|
| 24 |
Shown below are the steps to bind the driver to a VF and also to the |
| 25 |
associated auxiliary device created by the ``pds_core`` driver. This |
| 26 |
example assumes the pds_core and pds-vfio-pci modules are already |
| 27 |
loaded. |
| 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 |
|
| 50 |
After performing the steps above, a file in /dev/vfio/<iommu_group> |
| 51 |
should have been created. |
| 52 |
|
| 53 |
|
| 54 |
Enabling the driver |
| 55 |
=================== |
| 56 |
|
| 57 |
The driver is enabled via the standard kernel configuration system, |
| 58 |
using the make command:: |
| 59 |
|
| 60 |
make oldconfig/menuconfig/etc. |
| 61 |
|
| 62 |
The 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 |
|
| 68 |
Support |
| 69 |
======= |
| 70 |
|
| 71 |
For general Linux networking support, please use the netdev mailing |
| 72 |
list, which is monitored by Pensando personnel:: |
| 73 |
|
| 74 |
[email protected] |
| 75 |
|
| 76 |
For more specific support needs, please use the Pensando driver support |
| 77 |
email:: |
| 78 |
|
| 79 |
[email protected] |