2. Release the port controlled by the PF using the
fpgaport
tool:
sudo fpgaport release /dev/intel-fpga-fme.* 0
3. Enable SR-IOV and VFs. Each VF has 1 AFU Port:
sudo sh -c "echo 1 > $pci_path/sriov_numvfs"
4. Find the additional Device number for the VF Device:
lspci -nn | grep :0b2[bc]
Sample output:
04:00.0 Processing accelerators [1200]: Intel Corporation Device [8086:0b2b]
04:00.1 Processing accelerators [1200]: Intel Corporation Device [8086:0b2c]
lspci
shows an additional Device number, 0b2c. This is the VF Device you assign
to a VM. The original Bus and Device numbers for the PF remain 0b2b.
Note that the Domain:Bus:Device.Function (BDF) notation for the VF device is:
000:04:00.1
5. Load the vfio-pci driver:
sudo modprobe vfio-pci
6. 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"
7. Find the Vendor ID and Device ID for the VF Device:
lspci -n -s 04:00.1
Sample output:
04:00.1 1200: 8086:0b2c
8. Bind the VF to the
vfio-pci
driver: Use the Vendor ID and Device ID from
previous step.
sudo sh -c "echo 8086 0b2c > \
/sys/bus/pci/drivers/vfio-pci/new_id"
7.3. Running the Hello FPGA Example on Virtual Machine
This section assumes that you have set up the Virtual Machine (VM) and connected to
the virtual function (VF) Device with ID 0b2c. On the virtual machine, install the Intel
FPGA Driver and OPAE Software. Refer to Installing the Release on the Host for
instructions.
Complete the following steps to test the operation of the NLB mode 0 AFU in a
virtualized environment:
1. Configure the system hugepage to allocate 20, 2 MB hugepages that this utility
requires. This command requires root privileges:
sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-\
2048kB/nr_hugepages"
7. Running the OPAE in a Virtualized Environment
UG-20202 | 2019.08.05
Intel Acceleration Stack Quick Start Guide: Intel FPGA Programmable
Acceleration Card D5005
22