Intel Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
ID
683633
Date
12/04/2020
Public
1. About This Document
2. Introduction
3. Getting Started
4. Installing the OPAE Software Package
5. Identifying the Flash Image and BMC Firmware
6. Running FPGA Diagnostics
7. Running the OPAE in a Non-Virtualized Environment
8. Running the OPAE in a Virtualized Environment
9. Intel® Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA Archives
10. Document Revision History for Intel® Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
A. Updating the FIM and BMC Firmware
B. Handling Graceful Thermal Shutdown
C. FPGA Device Access Permission
D. Memlock Limit
E. Hugepage Settings
F. Troubleshooting Frequently Asked Questions (FAQ)
G. Documentation Available for the Intel® Acceleration Stack for Intel® Xeon® CPU with FPGAs 1.2.1 Release
F.1. Why do I see a 'No Suitable slots found' message when running fpgaconf on my AFU image?
F.2. How do I flash the FIM or program the AFU in a multicard system?
F.3. Which environment variables are required?
F.4. What actions do I take if I see the error message 'Error enumerating resources: no driver available'?
F.5. Troubleshooting OPAE Installation on RHEL
8.2. Configuring the VF Port on the Host
By default, the PF controls the AFU port. The following procedure transfers AFU control to the VF. After the transfer to VF control, applications running on the VM can access the AFU.
In a multicard system, if you want to configure the VF on only a single PCIe device, run the below command to find a device mapping for the specific PCIe device:
ls -l /sys/class/fpga/intel-fpga-dev.*Sample output:
/sys/class/fpga/intel-fpga-dev.0 -> ../../devices/pci0000:36/0000:36:00.0/0000:37:00.0/fpga/intel-fpga-dev.0 /sys/class/fpga/intel-fpga-dev.1 -> ../../devices/pci0000:ae/0000:ae:00.0/0000:af:00.0/fpga/intel-fpga-dev.1
To target PCIe B:D.F (AF:00.0) and B:D.F (37:00.0) in the following commands, use instance id 1 and 0 instead of * respectively.
- Run the following three commands, individually, to export the required paths:
export port_path=$(find /sys/class/fpga/intel-fpga-dev.* \ -maxdepth 1 -follow -iname intel-fpga-port.*)
export link_path=$(readlink -m /$port_path/../)
export pci_path=$link_path/../../
- Release the port controlled by the PF using the fpgaport tool:
sudo fpgaport release /dev/intel-fpga-fme.* 0
- Enable SR-IOV and VFs. Each VF has 1 AFU Port:
sudo sh -c "echo 1 > $pci_path/sriov_numvfs"
- Find the additional device number for the VF device:
lspci -nn | grep :09c[45]
Sample output:04:00.0 Processing accelerators [1200]: Intel Corporation Device [8086:09c4] 04:00.1 Processing accelerators [1200]: Intel Corporation Device [8086:09c5]
lspci shows an additional device number, 09c5. This is the VF device you assign to a VM. The original bus and device numbers for the PF remains 09c4.
Note that the Domain:Bus:Device.Function (BDF) notation for the VF device in this example is: 000:04:00.1. Replace this BDF with the appropriate BDF for your system.
- Load the vfio-pci driver:
sudo modprobe vfio-pci
- Unbind the VF device from its driver:
sudo sh -c "echo 0000:04:00.1 > \ /sys/bus/pci/devices/0000:04:00.1/driver/unbind"
- Find the vendor and device ID for the VF device:
lspci -n -s 04:00.1
Sample output:
04:00.1 1200: 8086:09c5
- Bind the VF to the vfio-pci driver:
sudo sh -c "echo 8086 09c5 > \ /sys/bus/pci/drivers/vfio-pci/new_id"