SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Xen SR-IOV Feature 
(I/O Virtualization) 
Lingfei Kong 
lkong@redhat.com 
Sep. 2013
Agenda 
● Background 
● SR-IOV Overview 
● How it works with Xen 
● Reference link 
● Q & A
Background 
I/O is an important part of any computing platform, including virtual machines running 
on top of a virtual machine monitor. 
● I/O Virtualization Goals 
● Provide the same device 
● Provide scalability to support the number of virtual machines(VMs) 
They should also provide near native performance for I/O operations. 
● Isolation 
● Memory 
● I/O streams 
● Interrupts 
● Control operations 
● I/O operations and errors
● I/O Virtualization Approaches 
● Software-Based Sharing 
● Device emulation 
● The split-driver model 
● Drawbacks 
● Only provide a subset of the total 
functionality provided by physical 
hardware. 
● Significant CPU overhead and this 
can reduce the maximum throughput 
on an I/O device 
Figure 1. Software-Based Sharing 
.
● Direct Assignment 
Intel virtualization technology enables a device to directly DMA to/from host 
memory 
● Drawbacks 
● Limited scalability, a physical device can only be assigned to one VM 
Figure 2. Direct Assignment
SR-IOV Overview 
● SR-IOV is a specification that allows a PCIe device to appear to be multiple separate 
PCIe devices. The SR-IOV specification was created and is maintained by the PCI SIG, with 
the idea that a standard specification will help promote inter interoperability. 
● SR-IOV works by introducing the idea of physical functions(PFs) and virtual functions(VFs) 
● Physical Functions(PFs): These are full PCIe functions that include the SR-IOV Extended 
Capability. The capability is used to configure and manage the SR-IOV functionality. 
● Virtual Functions(VFs): These are 'lightweight' PCIe functions that contain the resources 
necessary for data movement but have a carefully minimized set of configuration resources. 
● The Direct Assignment method of virtualization provides very fast I/O. However, it 
prevents the sharing of I/O devices. SR-IOV provides a mechanism by which a Single Root 
Function(For example a single Ethernet Port) can appear to be multiple separate physical 
Devices.
● The SR-IOV capable device provides a configurable number of independent Virtual 
Functions, each with its own PCI Configuration space. The Hypervisor assigns one or 
more Virtual Functions to a virtual machine by mapping the actual configuration space the 
VFs to the configuration space presented to the virtual machine by the VMM. 
Figure 3. Mapping Virtual Function Configuration
Figure 4. Intel SR-IOV Overview
How it works with Xen ● Setup 
● Enabled VT-d(for Intel machine) or AMD-V(for AMD machine) in BIOS 
● SR-IOV supported hardware. (for example: Intel 82576 and Intel 82599 NIC) 
● Check PF 
[host]#lspci | grep Etherne 
86:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection 
(rev 01) 
86:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection 
(rev 01) 
● Enable VF in grub.conf 
Add "iommu=no-intremap" in kernel line 
Add "pci_pt_e820_access=on" in module line 
Reboot the host. 
After reboot, please check if these lines exist in `xm dmesg` output(mainly the first 
line): 
(XEN) [VT-D]iommu.c:1720: Interrupt Remapping hardware not found 
(XEN) [VT-D]iommu.c:1722: Device assignment will be disabled for security reasons 
(CVE-2011-1898). 
(XEN) [VT-D]iommu.c:1724: Use iommu=no-intremap to override.
If exist, change `iommu=1` to `iommu=no-intremap` and reboot again. 
Enable VF in driver 
[host]#echo 'options igb max_vfs=7' >> /etc/modprobe.conf 
Then, restart system. VFs will be enabled automatically when host start. 
Another way to enable VF(after reboot): 
[host]# modprobe -r igb 
[host]# modprobe igb max_vfs=7
● Check VF 
[root@unused ~]# lspci|grep Ethernet 
04:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit 
Ethernet (rev 20) 
04:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit 
Ethernet (rev 20) 
86:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 
86:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 
86:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.6 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:10.7 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
86:11.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
● Load pciback driver 
[host]#modprobe pciback 
[host]#lsmod |grep pciback 
pciback 65617 0 
● Get device ID of Vfs 
[host]# lspci -D | grep "82576 Virtual Function" 
0000:86:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
0000:86:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 
…. 
● Unbind device from host kernel driver 
[host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/igbvf/unbind 
● Bind PCI device to pciback driver 
[host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/pciback/new_slot 
[host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/pciback/bind 
Make sure the vifs get ip addresss?
● Make sure the VFs has been hidden from Dom0 already 
[host]#xm pci-list-assignable-devices 
0000:86:10.0 
● Create the guest with VF devices' ID as parameter 
xm create pv-6.4-64.cfg pci='0000:86:10.0'
Reference link 
● Xen Technical Papers -> SR-IOV 
https://docspace.corp.redhat.com/docs/DOC-133989 
● PCI-SIG SR-IOV Primer 
https://docspace.corp.redhat.com/servlet/JiveServlet/downloadBody/155072-102-1- 
755489/PCI-SIGSR-IOVPrimer.pdf 
● SR-IOV support in Xen 
https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR%2DIOV/ 
Xen%2DSR%2DIOV.pdf 
● Overview of SR-IOV Driver Implementation 
https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR 
%2DIOV/Intel82576SRIOV.pdf
● Xen PCI Passthrough 
http://wiki.xensource.com/wiki/XenPCIpassthrough 
● Technical Paper (from KVM section) 
https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR%2DIOV/SR 
%2DIOVTechPaper.pdf
Q&A

Weitere ähnliche Inhalte

Was ist angesagt?

KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usagevincentvdk
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugginglibfetion
 
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsXen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsStefano Stabellini
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in LinuxAdrian Huang
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelSUSE Labs Taipei
 
05.2 virtio introduction
05.2 virtio introduction05.2 virtio introduction
05.2 virtio introductionzenixls2
 
Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Wan Leung Wong
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionGene Chang
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVMPradeep Kumar
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control InterfaceLinaro
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabTaeung Song
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Linaro
 
JVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesJVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesKris Mok
 
Managing ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesManaging ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesChristopher Janoch
 
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...VMworld
 

Was ist angesagt? (20)

KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
Linux kernel debugging
Linux kernel debuggingLinux kernel debugging
Linux kernel debugging
 
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsXen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
 
malloc & vmalloc in Linux
malloc & vmalloc in Linuxmalloc & vmalloc in Linux
malloc & vmalloc in Linux
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
05.2 virtio introduction
05.2 virtio introduction05.2 virtio introduction
05.2 virtio introduction
 
Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)Virtualization - Kernel Virtual Machine (KVM)
Virtualization - Kernel Virtual Machine (KVM)
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Ixgbe internals
Ixgbe internalsIxgbe internals
Ixgbe internals
 
Virtualization Architecture & KVM
Virtualization Architecture & KVMVirtualization Architecture & KVM
Virtualization Architecture & KVM
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control Interface
 
Embedded Hypervisor for ARM
Embedded Hypervisor for ARMEmbedded Hypervisor for ARM
Embedded Hypervisor for ARM
 
Ceph
CephCeph
Ceph
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLab
 
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
Reliability, Availability, and Serviceability (RAS) on ARM64 status - SFO17-203
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
 
JVM: A Platform for Multiple Languages
JVM: A Platform for Multiple LanguagesJVM: A Platform for Multiple Languages
JVM: A Platform for Multiple Languages
 
Managing ESXi - Tools and Techniques
Managing ESXi - Tools and TechniquesManaging ESXi - Tools and Techniques
Managing ESXi - Tools and Techniques
 
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
VMworld 2013: ESXi Native Networking Driver Model - Delivering on Simplicity ...
 

Ähnlich wie SR-IOV Introduce

Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Known basic of NFV Features
Known basic of NFV FeaturesKnown basic of NFV Features
Known basic of NFV FeaturesRaul Leite
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stablejuet-y
 
Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...
 Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap... Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...
Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...kkaralek
 
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyHow to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyIntel IT Center
 
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyHow to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyIT@Intel
 
Device virtualization and management in xen
Device virtualization and management in xenDevice virtualization and management in xen
Device virtualization and management in xenLingfei Kong
 
XS Boston 2008 Networking Direct Assignment
XS Boston 2008 Networking Direct AssignmentXS Boston 2008 Networking Direct Assignment
XS Boston 2008 Networking Direct AssignmentThe Linux Foundation
 
OSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner FischerOSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner FischerNETWAYS
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/StableSR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stablejuet-y
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍jeffz
 
SR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and ImprovementSR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and ImprovementLF Events
 
SESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptxSESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptxFirmanAFauzi1
 
A Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt DeliveryA Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt DeliveryCheng-Chun William Tu
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Aananth C N
 
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Intel® Software
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Michelle Holley
 

Ähnlich wie SR-IOV Introduce (20)

Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Known basic of NFV Features
Known basic of NFV FeaturesKnown basic of NFV Features
Known basic of NFV Features
 
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/StableSR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
SR-IOV, KVM and Emulex OneConnect 10Gbps cards on Debian/Stable
 
UNIT-III ES.ppt
UNIT-III ES.pptUNIT-III ES.ppt
UNIT-III ES.ppt
 
Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...
 Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap... Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...
Intermediate Intel® Distribution of OpenVINO™ toolkit for Computer Vision Ap...
 
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyHow to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
 
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) TechnologyHow to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
How to Self-Provision over WLAN with Intel(R) vPro(TM) Technology
 
Device virtualization and management in xen
Device virtualization and management in xenDevice virtualization and management in xen
Device virtualization and management in xen
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 
XS Boston 2008 Networking Direct Assignment
XS Boston 2008 Networking Direct AssignmentXS Boston 2008 Networking Direct Assignment
XS Boston 2008 Networking Direct Assignment
 
OSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner FischerOSMC 2014: Server Hardware Monitoring done right | Werner Fischer
OSMC 2014: Server Hardware Monitoring done right | Werner Fischer
 
the NML project
the NML projectthe NML project
the NML project
 
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/StableSR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
SR-IOV, KVM and Intel X520 10Gbps cards on Debian/Stable
 
Windows内核技术介绍
Windows内核技术介绍Windows内核技术介绍
Windows内核技术介绍
 
SR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and ImprovementSR-IOV ixgbe Driver Limitations and Improvement
SR-IOV ixgbe Driver Limitations and Improvement
 
SESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptxSESI 7 RouterTroubleshooting.pptx
SESI 7 RouterTroubleshooting.pptx
 
A Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt DeliveryA Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
A Comprehensive Implementation and Evaluation of Direct Interrupt Delivery
 
Virtualization Support in ARMv8+
Virtualization Support in ARMv8+Virtualization Support in ARMv8+
Virtualization Support in ARMv8+
 
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
Embree Ray Tracing Kernels | Overview and New Features | SIGGRAPH 2018 Tech S...
 
Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...Accelerating Virtual Machine Access with the Storage Performance Development ...
Accelerating Virtual Machine Access with the Storage Performance Development ...
 

Mehr von Lingfei Kong

Emacs presentation
Emacs presentationEmacs presentation
Emacs presentationLingfei Kong
 
It经典图书(附免费下载地址)
It经典图书(附免费下载地址)It经典图书(附免费下载地址)
It经典图书(附免费下载地址)Lingfei Kong
 
Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Lingfei Kong
 
Python学习笔记
Python学习笔记Python学习笔记
Python学习笔记Lingfei Kong
 
Congfigure python as_ide
Congfigure python as_ideCongfigure python as_ide
Congfigure python as_ideLingfei Kong
 

Mehr von Lingfei Kong (7)

Emacs presentation
Emacs presentationEmacs presentation
Emacs presentation
 
It经典图书(附免费下载地址)
It经典图书(附免费下载地址)It经典图书(附免费下载地址)
It经典图书(附免费下载地址)
 
Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本
 
Python学习笔记
Python学习笔记Python学习笔记
Python学习笔记
 
Kdump
KdumpKdump
Kdump
 
Congfigure python as_ide
Congfigure python as_ideCongfigure python as_ide
Congfigure python as_ide
 
Emacs tutorial
Emacs tutorialEmacs tutorial
Emacs tutorial
 

Kürzlich hochgeladen

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

SR-IOV Introduce

  • 1. Xen SR-IOV Feature (I/O Virtualization) Lingfei Kong lkong@redhat.com Sep. 2013
  • 2. Agenda ● Background ● SR-IOV Overview ● How it works with Xen ● Reference link ● Q & A
  • 3. Background I/O is an important part of any computing platform, including virtual machines running on top of a virtual machine monitor. ● I/O Virtualization Goals ● Provide the same device ● Provide scalability to support the number of virtual machines(VMs) They should also provide near native performance for I/O operations. ● Isolation ● Memory ● I/O streams ● Interrupts ● Control operations ● I/O operations and errors
  • 4. ● I/O Virtualization Approaches ● Software-Based Sharing ● Device emulation ● The split-driver model ● Drawbacks ● Only provide a subset of the total functionality provided by physical hardware. ● Significant CPU overhead and this can reduce the maximum throughput on an I/O device Figure 1. Software-Based Sharing .
  • 5. ● Direct Assignment Intel virtualization technology enables a device to directly DMA to/from host memory ● Drawbacks ● Limited scalability, a physical device can only be assigned to one VM Figure 2. Direct Assignment
  • 6. SR-IOV Overview ● SR-IOV is a specification that allows a PCIe device to appear to be multiple separate PCIe devices. The SR-IOV specification was created and is maintained by the PCI SIG, with the idea that a standard specification will help promote inter interoperability. ● SR-IOV works by introducing the idea of physical functions(PFs) and virtual functions(VFs) ● Physical Functions(PFs): These are full PCIe functions that include the SR-IOV Extended Capability. The capability is used to configure and manage the SR-IOV functionality. ● Virtual Functions(VFs): These are 'lightweight' PCIe functions that contain the resources necessary for data movement but have a carefully minimized set of configuration resources. ● The Direct Assignment method of virtualization provides very fast I/O. However, it prevents the sharing of I/O devices. SR-IOV provides a mechanism by which a Single Root Function(For example a single Ethernet Port) can appear to be multiple separate physical Devices.
  • 7. ● The SR-IOV capable device provides a configurable number of independent Virtual Functions, each with its own PCI Configuration space. The Hypervisor assigns one or more Virtual Functions to a virtual machine by mapping the actual configuration space the VFs to the configuration space presented to the virtual machine by the VMM. Figure 3. Mapping Virtual Function Configuration
  • 8. Figure 4. Intel SR-IOV Overview
  • 9. How it works with Xen ● Setup ● Enabled VT-d(for Intel machine) or AMD-V(for AMD machine) in BIOS ● SR-IOV supported hardware. (for example: Intel 82576 and Intel 82599 NIC) ● Check PF [host]#lspci | grep Etherne 86:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 86:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) ● Enable VF in grub.conf Add "iommu=no-intremap" in kernel line Add "pci_pt_e820_access=on" in module line Reboot the host. After reboot, please check if these lines exist in `xm dmesg` output(mainly the first line): (XEN) [VT-D]iommu.c:1720: Interrupt Remapping hardware not found (XEN) [VT-D]iommu.c:1722: Device assignment will be disabled for security reasons (CVE-2011-1898). (XEN) [VT-D]iommu.c:1724: Use iommu=no-intremap to override.
  • 10. If exist, change `iommu=1` to `iommu=no-intremap` and reboot again. Enable VF in driver [host]#echo 'options igb max_vfs=7' >> /etc/modprobe.conf Then, restart system. VFs will be enabled automatically when host start. Another way to enable VF(after reboot): [host]# modprobe -r igb [host]# modprobe igb max_vfs=7
  • 11. ● Check VF [root@unused ~]# lspci|grep Ethernet 04:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 04:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20) 86:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 86:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 86:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.6 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:10.7 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.2 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.3 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.4 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 86:11.5 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01)
  • 12. ● Load pciback driver [host]#modprobe pciback [host]#lsmod |grep pciback pciback 65617 0 ● Get device ID of Vfs [host]# lspci -D | grep "82576 Virtual Function" 0000:86:10.0 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) 0000:86:10.1 Ethernet controller: Intel Corporation 82576 Virtual Function (rev 01) …. ● Unbind device from host kernel driver [host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/igbvf/unbind ● Bind PCI device to pciback driver [host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/pciback/new_slot [host]#echo 0000:86:10.0 > /sys/bus/pci/drivers/pciback/bind Make sure the vifs get ip addresss?
  • 13. ● Make sure the VFs has been hidden from Dom0 already [host]#xm pci-list-assignable-devices 0000:86:10.0 ● Create the guest with VF devices' ID as parameter xm create pv-6.4-64.cfg pci='0000:86:10.0'
  • 14. Reference link ● Xen Technical Papers -> SR-IOV https://docspace.corp.redhat.com/docs/DOC-133989 ● PCI-SIG SR-IOV Primer https://docspace.corp.redhat.com/servlet/JiveServlet/downloadBody/155072-102-1- 755489/PCI-SIGSR-IOVPrimer.pdf ● SR-IOV support in Xen https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR%2DIOV/ Xen%2DSR%2DIOV.pdf ● Overview of SR-IOV Driver Implementation https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR %2DIOV/Intel82576SRIOV.pdf
  • 15. ● Xen PCI Passthrough http://wiki.xensource.com/wiki/XenPCIpassthrough ● Technical Paper (from KVM section) https://mirrorglass.englab.nay.redhat.com/XWiki/bin/download/Main/SR%2DIOV/SR %2DIOVTechPaper.pdf
  • 16. Q&A