SR MR Iov
SR MR Iov
SR MR Iov
Hardware Support
Virtualization
SR-IOV
Agenda
Overview
Introduction SR-IOV
Memory Virtualization Architecture Supporting SR-IOV
Storage Virtualization Capability
Servers Virtualization ARI Alternative Routing ID Inte
I/O Virtualization rpretation
ACS Access Control Services
PCIe Virtualization ATS - Address Translation Servic
Motivation e
Directed I/O Theory of Operations
PCIe Architecture
Memory Virtualization
Storage Virtualization
Servers Virtualization
I/O Virtualization
OVERVIEW
Overview
Memory Virtualization
Uses memory more effectively
Was revolutionary, but now is assumed
Storage Virtualization
Presents storage resources in ways not bound to the und
erlying hardware characteristics
Fairly common now
Servers Virtualization
Increases typically under-utilized CPU resources
Becoming more common
Overview
I/O Virtualization
Virtualizing the I/O path between a server and an ext
ernal device
Can apply to anything that uses an adapter in a serve
r, such as:
Ethernet Network Interface Cards (NICs)
Disk Controllers (including RAID controllers)
Fibre Channel Host Bus Adapters (HBAs)
Graphics/Video cards or co-processors
SSDs mounted on internal cards
Motivation
Directed I/O
PCIe Architecuture
Virtual Virtual
Virtual Machine
Machine Machine
Monitor
Monitor Monitor
Virtual
Function
Physical
Function
Virtualization
Intermediary
Processor
Memory
System Image(SI)
SI, e.g., a guest OS, to
which virtual and physi
Root Complex (RC) cal devices can be assig
Roo
t
Root
Port
ned
Port
(RP)
(RP)
PCIe Switc
Devic h
e
PCIe PCIe PCIe
Devic Devic Devic
e e e
PCIe components
Root Complex
A root complex connects the processor and memory subsys
tem to the PCIe switch fabric composed of one or more swi
tch devices
Similar to a host bridge in a PCI system
Generate transaction requests on
behalf of the processor, which is
interconnected through a local bus.
May contain more than one PCIe port
and multiple switch devices.
PCIe components
Root Port (RP)
The portion of the motherboard that contains the host brid
ge. The host bridge allows the PCIe ports to talk to the rest
of the computer
PCIe Device
PCIe Device
Unique PCI Function Address
Bus / Dev / Function
Command, lspci -v, can get PCI device information on linux
Devic
e
Function
Function 2
1
Example: Multi-Function Devi
ce
The link and PCIe functionality shared by all fun
ctions is managed through Function 0
All functions use a single Bus Number captured
through the PCI enumeration process
Each function can be assigned to an SI
Physical
Configuration
Resources
Function 0 ATC1 Resourc
es1
PCIe Intern
Physical
Port al
Routin Function 1 ATC2 Resourc
g es2
PCIe
Port Physical
Function 2 ATC3 Resourc
PCIe es3
Configuration Space
Devices will allocate re
source such as memo
ry and record the addre
ss into this configuratio
n space
Reference:
PCI Local Bus Specificatio
n ver.2.3 Chap 6
Components in PCIe Device
ARI Alternative Routing Id Interpretation
Alternative Routing ID Interpretation as per the PCIe Base Sp
ecification
Physical Resources
Memory which allocated from physical memory
the CPU
Physical V.S. Virtual
Physical
Configuration
Resources
Function 0 ATC1 Resourc
es1
PCIe Intern
al Physical
Port Routin Function 1 ATC2 Resourc
g es2
PCIe
Port Physical
Function 2 ATC3 Resourc
PCIe es3
Port PCIe Device Physical
Configuration Resources
PF 0 Physical
ATC1 Resourc
Intern es
PCIe al
Routin
Port g
Physical
VF 0,1 Resourc
es
SI rces
Directly and Software Shared
SR-IOV
Syste Syste Syste Syste
m m m m
Virtualization
Intermediary
SR-PCIM
Processor
SR-PCIM SR-PCIM
Translatio
Address Translation and
n Agent
Protection Table (ATPT)
(TA)
Components of SR-IOV
ATPT Address Translation and Protection Tabl
e
Contain the set of address translations accessed by a
TA to Process PCEe requests
DMA Read/Write
Interrupt requests
DMA Read/Write requests are translated through a c
ombination of the Routing ID and the address cont
ained within a PCIe transaction
In PCIe, interrupts are treated as memory write oper
ations.
Though the combination of the Routing ID and the address
contained within a PCIe transaction
Translatioas well
Address Translation and
n Agent
Protection Table (ATPT)
(TA)
Architecture Supporting SR-IOV Capability
ARI Alternative Routing ID Interpretation
ACS Access Control Services
ATS Address Translation Service
Data Path for Incoming Packets
SR-IOV
ARI Alternative Routing ID Interpretation
Routing ID is used to forward requests to the corresp
onding PFs and VFs
All VFs and PFs must have distinct Routing IDs
ARI provides a mechanism to allow single PCIe comp
onent to support up to 256 functions.
Originally there are 8 functions at most in a PCIe.
SR-IOV
ACS Access Control Service
The PCIe specification allows for P2P transactions.
s
This means that it is possible and even desirable in some cases for one PCIe end
point to send data directly to another endpoint without having to go through th
e Root Complex.
SR-IOV
ATS Address Translation Ser
vices
ATS provides a mechanism allowing a virtual m
achine to perform DMA transaction directly to a
nd from a PCIe endpoint.
ATS Address Translation Ser
vices
ATS uses a request-completion protocol betwe
en a Device and a Root Complex (RC)
ATS Address Translation Services
Upon receipt of an ATS Translation Request, the TA perfo
rms the following Requests
1. Validates that the Function has been configured to issue ATS T
ranslation Requests.
2. Determines whether the Function may access the memory in
dicated by the ATS Translation Request and has the associate
d access rights.
3. Determines whether a translation can be provided to the Fun
ction. If yes, the TA issues a translation to the Function.
4. The TA communicates the success or failure of the request to
the RC which generates an ATS Translation Completion and tr
ansmits via a Response TLP through a RP to the Function.
Path
. Function(Request)=>TA=>RC(Completion)=>Function
ATS Address Translation Ser
vices
When the Function receives the ATS Translation Comple
tion
Either updates its ATC to reflect the translation
Or notes that a translation does not exist.
SR-IOV
Data Path for incoming packe
ts
1. The Ethernet packet arrives a
t the Ethernet NIC
MRA MRA
Switc Switc
h h
PCIe PCI/PCI-X
Device Device
Topology Overview and Term
s
SR Multi-Root Terms
Topology Topology
Single Root (SR) IOV
Overview,
Only has one Root.
Switches only need to
support
PCIe base functionality.
To make full use of IOV, EP
must support SR-IOV
capabilities.
SR-PCIM configures the EP.
PF
VF
Non-IOV Function
MRA Components
A BF is a function compliant with this specificati
on that includes the MR-IOV Capability. A BF sha
ll not contain an SR-IOV Capability.