Installation guide

Chapter 13. SR-IOV
13.1. Int roduct ion
Developed by the PCI-SIG (PCI Special Interest Group), the Single Root I/O Virtualization (SR-IOV)
specification is a standard for a type of PCI device assignment that can share a single device to
multiple virtual machines. SR-IOV improves device performance for virtual machines.
Fig u re 13.1. Ho w SR- IO V wo rks
SR-IOV enables a Single Root Function (for example, a single Ethernet port), to appear as multiple,
separate, physical devices. A physical device with SR-IOV capabilities can be configured to appear
in the PCI configuration space as multiple functions. Each device has its own configuration space
complete with Base Address Registers (BARs).
SR-IOV uses two PCI functions:
Physical Functions (PFs) are full PCIe devices that include the SR-IOV capabilities. Physical
Functions are discovered, managed, and configured as normal PCI devices. Physical Functions
configure and manage the SR-IOV functionality by assigning Virtual Functions.
Virtual Functions (VFs) are simple PCIe functions that only process I/O. Each Virtual Function is
derived from a Physical Function. The number of Virtual Functions a device may have is limited
by the device hardware. A single Ethernet port, the Physical D evice, may map to many Virtual
Functions that can be shared to virtual machines.
The hypervisor can map one or more Virtual Functions to a virtual machine. The Virtual Function's
configuration space is then mapped to the configuration space presented to the guest.
Each Virtual Function can only be mapped to a single guest at a time, as Virtual Functions require
real hardware resources. A virtual machine can have multiple Virtual Functions. A Virtual Function
appears as a network card in the same way as a normal network card would appear to an operating
system.
The SR-IOV drivers are implemented in the kernel. The core implementation is contained in the PCI
subsystem, but there must also be driver support for both the Physical Function (PF) and Virtual
Function (VF) devices. An SR-IOV capable device can allocate VFs from a PF. The VFs appear as
Chapt er 1 3. SR- IO V
105