Multi Channel DMA for PCI Express* Intel® FPGA IP Design Example User Guide

ID 683517
Date 9/15/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Follow the steps needed to create a guest environment and assign VF device to VM by using QEMU.

  1. Unbind the device from UIO driver:
    $./dpdk-devbind.py -u <bdf>
  2. Install vfio-pci module.
    $modprobe vfio-pci
  3. Bind the device to vfio-pci.
    1. In case the device is binded to ifc_uio, unbind with the following command:
      $ echo "<bdf>" > /sys/bus/pci/devices/\
      <bdf>/driver/unbind
      For example:
      echo "0000:01:00.0" > /sys/bus/pci/devices/\
      0000\:01\:00.0/driver/unbind
    2. Bind the device to vfio-pci.
      $ echo <bdf>  > /sys/bus/pci/drivers/vfio-pci/bind
      For example:
      echo "0000:01:00.1"  > /sys/bus/pci/drivers/vfio-pci/bind
  4. Use the following parameters to start the Guest VM (on Intel® machines, use qemu version 3.0.0-rc0). The minimum 8 GB memory needs to be allocated to VM.
    $ qemu-3.0.0-rc0/x86_64-softmmu/qemu-system-x86_64\
     -smp 2 -m 8192M -boot c -machine q35,kernel-irqchip=split -cpu host\
     -enable-kvm -nographic -L /root/qemu-3.0.0-rc0/pc-bios -name offload1\ 
    -hda <path_to_qcow2_file> -device vfio-pci,host=<bdf> -netdev\
     type=tap,id=net6551,script=no,downscript=no,vhost=on,ifname=net6551\
     -device virtio-net-pci,netdev=net6551 -device intel-iommu,intremap=on,\
    caching-mode=on -serial telnet::5551,server,nowait -object memory-backend-file,\
    id=mem,size=8192M,mem-path=/dev/hugepages,share=on -numa node,memdev=mem\
     -mem-prealloc -monitor telnet::3331,server,nowait&
    Note:
    • On AMD machines, the parameter -device intel-iommu,intremap=on,caching-mode=on is not required.
    • If multiple devices are in the same group, check for ACS enablement in root port and bridge.
    • Below are the Host and Guest VM configurations used for verification:
      Table 9.  Host System Configuration
      Host System Configuration Details
      Operating System CentOS Linux release 7.8
      Linux Kernel 3.10.0-1127.10.1.el7.28.x86_64
      CPU Cores 96
      RAM 128 GB (64 GB on single NUMA)
      Hypervisor KVM
      Qemu Version QEMU version 3.0.0-rc0
      Table 10.  Guest System Configuration
      Guest System Configuration Details
      Operating System CentOS Linux release 7.8
      Linux Kernel 3.10.0-1127.10.1.el7.28.x86_64
      CPU Cores 2
      RAM 8 GB

Did you find the information on this page useful?

Characters remaining:

Feedback Message