OPAE Intel FPGA Linux Device Driver Architecture Guide

ID 683857
Date 10/02/2017
Public
Document Table of Contents

1.1.5. FPGA Virtualization

To enable accessing an accelerator from applications running in a VM, the respective AFU’s port needs to be assigned to a VF using the following steps:

  1. The PF owns all AFU ports by default. Any port that needs to be reassigned to a VF must first be released from the PF through the FPGA_FME_PORT_RELEASE ioctl on the FME device.
  2. Once N ports are released from the PF, the command below can be used to enable SRIOV and VFs. Each VF owns only one port with AFU.
    echo N > $PCI_DEVICE_PATH/sriov_numvfs
  3. Pass through the VFs to VMs.
  4. The AFU under VF is accessible from applications in VM (using the same driver inside the VF).
    Note: An FME cannot be assigned to a VF, thus PR and other management functions are only available through the PF.