SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
GPU Virtualization:
What we should know today
Liang Yan (lyan)
Virtualization Team
2
Outline
Schedul
ed
Downti
me
1. Background
GPU
Virtualization
2. GPU virtualization
Definition and Classification
Use scenario
3. Critical techniques
SRIOV vs MDEV
4. Demo
5. Current status and Todo
SUSE
Outside Provider
6. Q&A
Background
4
GPU Graphic Process Unit
• 1980’s – No GPU. PC used VGA controller
• 1990’s – Add more function into VGA controller
• 1997 – 3D acceleration functions:
Hardware for triangle setup and rasterization
Texture mapping
Shading
• 2000 – A single chip graphics processor ( beginning of GPU term)
• 2005 – Massively parallel programmable processors
• 2007 – CUDA (Compute Unified Device Architecture)
5
GPU Purpose
3D hardware acceleration
•DirectX
•OpenCL
•Vulkan
Graphic RenderGraphic Render
Big Data, Machine Learning: Tensor-flow, Caffe2
•CUDA Compute Unified Device Architecture
•OpenCL Open Computing Language
General ComputeGeneral Compute
6
GPU Structure
Fermi
• First generation of Tesla
• Unified Architecture
• MIMD ==> but better
performance with SIMD
• VLIW
• Different Storage Unit
Register File
L1
L2
GPU Memory VRAM
7
GPU
Traditional Pipeline Structure
Vertex Shader
Fragment/Pixel Shader
Other Shader
====================
New Unified Architect:
Unified shader
GPU Pipeline Structure
8
GPU resource management
Source: NVIDIA, Inc.
1. Channel
a command submission system,which is used to launch GPU
programs, start DMA operations or synchronize CPU and GPU
2. Context
3. Memory
VRAM: frame buffer
GTT: ring buffer for channel here
9
Virtualization
What is virtualization?
Choices:
Operating System
App. A App. B App. C App. D
Hardware
Virtualization
Virtual
Machine
OS
App. A App. B
Hardware
Virtual
Machine
OS
App. C App. D
Why?
New infrastructure, fundamental of Cloud
Efficient, Security,
What is virtualization?
Choices:
KVM, XEN, Cirtrix XEN-Server, VMWare Vsphere, Hyper-V
10
Virtualization
Virtualization
Virtual
Machine
OS
Hardware
Virtual
Machine
OS
Basic idea:
Try to make VM access Physical Resource directly, decrease the overload by
Virtualization.
Different Stage:
Emulation (QEMU, Bachs)
Para virtualization (XEN pv, QEMU virtio)
Full (Hardware assistant) virtualization
CPU:
VT-x Root and None-Root Mode
Memory:
EPT/NPT
IO device
VT-d/ AMD-Vi /SMMU
SR-IOV/MR-IOV
GPU Virtualization
12
GPU Virtualization
Virtual GPU for Guest VM
Like a real GPU as much as possible
GPU virtualization, different stage like Virtualization
Software Virtualization
● Software Emulated
CPU “trap and emulate” GPU instruction
Slow, limited function
● API forwarding
Frontend intercept APIs and forward
Backend translate and send back
Simple idea, but painful for API compatible
IO virtualization, GPU as a PCIe device today.
● GPU Passthrough
● Full GPU Virtualization
13
GPU Passthrough
GPU as a PCIe device today.
Full API support in Guest VM
Stable, supported by all Vendors with hardware requirement
From SLES 12SP2
SOC 8
Native-close performance, 95~97%
PCI resources:
PCI configure space, ROM, BARs(PIO, MMIO)
Key Components:
IOMMU: Hardware
VFIO: DMA operation in userspace level
14
VFIO and IOMMU
PCI resources:
PCI configure space, ROM, BARs(PIO, MMIO)
IOMMU: Hardware
DMA remapping
Interrupt remapping
VFIO: userspace driver for PCI device
Configure space QEMU emulated with VFIO
PIO I/O bitmap of VMCS
MMIO EPT
Interrupt IOEVENTFD IRQFD IOMMU
DMA IOMMU GPA <==> HPA
15
Full GPU Virtualization
Run native graphics driver in VM
Achieve good performance and moderate multiplexing
capability
● Split
Time Slices
framebuffer memory
● Isolate
Give a neat access between VM and Host Physical Device
IOMMU/Mdev and VFIO
DMA
Interrupt
● Schedule
Efficient and Robust
Pretty fix for AMD,
More flexible for NVIDIA, RR, BOND
16
vGPU Investments Upstream
● NVIDIA (GRID)
● Intel (GVT-G)
● AMD(GIM)
Intel has no VRAM
AMD has IOMMU support
SRIOV 97%
MDEV 80~90%
Full GPU Virtualization
17
Nvidia
Tesla Series: Volta Pascal Maxwell M6 M10 M60 P4 P6 P40 P100 V100
GRID: Kepler K1 K2 (VDI and application virtualization)
http://www.nvidia.com/object/grid-certified-servers.html
AMD
FirePro S7150 S7150x2
Radeon Pro V320 V340
Radeon Instinct MI6 MI8 MI25(Machine learning interface, CUDA compatible with HIP)
https://lists.freedesktop.org/archives/amd-gfx/2016-December/004075.html
Intel
     Haswell(3VMs)  Broadwell(7VMs) Skylake, Kaby Lake
     https://github.com/intel/gvt-linux/wiki
Full GPU Virtualization
SRIOV vs Mdev
19
20
Mediated devices
non SR-IOV, require vendor-
specific drivers to mediate sharing
Leveraging existing VFIO
framework, UAPI Vendor driver -
Mediated Device – managing
device’s internal I/O resource
SR-IOV devices
supported by standard VFIO PCI
(Direct Assignment)
Established QEMU VFIO/PCI driver,
KVM agnostic and well-defined UAPI
Virtualized PCI config /MMIO space
access, interrupt delivery Modular
IOMMU, pin and map memory for
DMA
21
MEDIATED DEVICE FRAMEWORK
Mediated core module (new) Mediated bus driver, create mediated device
Physical device interface for vendor driver callbacks Generic mediate device
management user interface (sysfs)
Mediated device module (new) Manage created mediated device, fully
compatible with VFIO user API
VFIO IOMMU driver (enhancement) VFIO IOMMU API TYPE1 compatible, easy
to extend to non-TYPE1
22
Registers VFIO MDEV as driver
Vendor driver registers devices
Vendor driver registers Mediated CBs
User writes mdev sysfs to create mdev device
QEMU calls VFIO API to add VFIO dev to IOMMU container, group, get fd back
QEMU access device fd and present it into VM
A mediated pass-through solution for graphics virtualization •
Pass-through performance critical resources •
Trap-and-emulate privileged operations •
Maintain a device model per VM
Demo
24
Demo
3D hardware acceleration
•DirectX
•OpenCL
•Vulkan
Intel GVT-GIntel GVT-G
Big Data, Machine Learning: Tensor-flow, Caffe2
•CUDA Compute Unified Device Architecture
•OpenCL Open Computing Language
Nvidia GRIDNvidia GRID
25
Use Scenario
GPU as a service
IVI
Visual Cloud
Current Status and ToDo
27
Most of the work is done by Intel Nvidia IBM and RH
unfortunately
SUSE
- Intel KVMGT technical ready
- Nvidia GRID technical ready
- AMD MxGPU ongoing
- GPU passthrough stage for Cloud
- GPU virtualization for CAAS
Outside
- Remote display
- IOMMU compatible
- Live Migration
- Scalability
28
Thank you.
Question?
29
REFERENCE
VGPU ON KVM
An Introduction to PCI Device Assignment with VFIO - Alex Williamson,
Red Hat [Qemu-devel] [PATCH v7 0/4] Add Mediated device support
[libvirt] [RFC] libvirt vGPU QEMU integratio
https://yq.aliyun.com/articles/590909?spm=a2c4e.11153940.blogcont599189.23.f2016d7bXPo7TD
https://zhuanlan.zhihu.com/p/35489035
30
+49 911 740 53 0 (Worldwide)
www.suse.com
Corporate Headquarters
Maxfeldstrasse 5
90409 Nuremberg
Germany
Join us on:
www.opensuse.org
Unpublished Work of SUSE. All Rights Reserved.
This work is an unpublished work and contains confidential, proprietary, and trade secret information of SUSE.
Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of
their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated,
abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE.
Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability.
General Disclaimer
This document is not to be construed as a promise by any participating company to develop, deliver, or market a
product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making
purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document,
and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose.
The development, release, and timing of features or functionality described for SUSE products remains at the sole
discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at
any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in
this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All
third-party trademarks are the property of their respective owners.
257-000020-001

Contenu connexe

Tendances

エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
Takeshi HASEGAWA
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
boyw165
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity
Takuya ASADA
 

Tendances (20)

Understanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panicUnderstanding a kernel oops and a kernel panic
Understanding a kernel oops and a kernel panic
 
Ceph - A distributed storage system
Ceph - A distributed storage systemCeph - A distributed storage system
Ceph - A distributed storage system
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
エンジニアなら知っておきたい「仮想マシン」のしくみ v1.1 (hbstudy 17)
 
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
 
The ideal and reality of NVDIMM RAS
The ideal and reality of NVDIMM RASThe ideal and reality of NVDIMM RAS
The ideal and reality of NVDIMM RAS
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for Embedded
 
ACPI Debugging from Linux Kernel
ACPI Debugging from Linux KernelACPI Debugging from Linux Kernel
ACPI Debugging from Linux Kernel
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
 
Get the most out of your storage with the Dell EMC Unity XT 880F All-Flash ar...
Get the most out of your storage with the Dell EMC Unity XT 880F All-Flash ar...Get the most out of your storage with the Dell EMC Unity XT 880F All-Flash ar...
Get the most out of your storage with the Dell EMC Unity XT 880F All-Flash ar...
 
不揮発メモリ(NVDIMM)とLinuxの対応動向について
不揮発メモリ(NVDIMM)とLinuxの対応動向について不揮発メモリ(NVDIMM)とLinuxの対応動向について
不揮発メモリ(NVDIMM)とLinuxの対応動向について
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
Hardware-assisted Isolated Execution Environment to run trusted OS and applic...
 
/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity/proc/irq/&lt;irq>/smp_affinity
/proc/irq/&lt;irq>/smp_affinity
 
What you need to know about ceph
What you need to know about cephWhat you need to know about ceph
What you need to know about ceph
 
Trip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine LearningTrip down the GPU lane with Machine Learning
Trip down the GPU lane with Machine Learning
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 

Similaire à GPU Virtualization in SUSE

Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
Stefano Di Carlo
 
Security best practices for hyper v and server virtualisation [svr307]
Security best practices for hyper v and server virtualisation [svr307]Security best practices for hyper v and server virtualisation [svr307]
Security best practices for hyper v and server virtualisation [svr307]
Louis Göhl
 

Similaire à GPU Virtualization in SUSE (20)

A-Journney-to-support-vgpu-in-firecracker.pdf
A-Journney-to-support-vgpu-in-firecracker.pdfA-Journney-to-support-vgpu-in-firecracker.pdf
A-Journney-to-support-vgpu-in-firecracker.pdf
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
 
Computer Vision Powered by Heterogeneous System Architecture (HSA) by Dr. Ha...
Computer Vision Powered by Heterogeneous System Architecture (HSA) by  Dr. Ha...Computer Vision Powered by Heterogeneous System Architecture (HSA) by  Dr. Ha...
Computer Vision Powered by Heterogeneous System Architecture (HSA) by Dr. Ha...
 
Simplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS ImplementationsSimplifying Multi-User SOLIDWORKS Implementations
Simplifying Multi-User SOLIDWORKS Implementations
 
Agnostic Device Drivers
Agnostic Device DriversAgnostic Device Drivers
Agnostic Device Drivers
 
NVDIMM block drivers with NFIT
NVDIMM block drivers with NFITNVDIMM block drivers with NFIT
NVDIMM block drivers with NFIT
 
ROCm and Distributed Deep Learning on Spark and TensorFlow
ROCm and Distributed Deep Learning on Spark and TensorFlowROCm and Distributed Deep Learning on Spark and TensorFlow
ROCm and Distributed Deep Learning on Spark and TensorFlow
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
 
Fuzzing_with_Xen.pdf
Fuzzing_with_Xen.pdfFuzzing_with_Xen.pdf
Fuzzing_with_Xen.pdf
 
Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
Multi-faceted Microarchitecture Level Reliability Characterization for NVIDIA...
 
Device virtualization and management in xen
Device virtualization and management in xenDevice virtualization and management in xen
Device virtualization and management in xen
 
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworldCisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
 
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworldCisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
Cisco at v mworld 2015 gpu-solution-c240_m4-082715-vmworld
 
V mware view™ poc jumpstart service
V mware view™ poc jumpstart serviceV mware view™ poc jumpstart service
V mware view™ poc jumpstart service
 
Virtualization, The future of computing (archived)
Virtualization, The future of computing (archived)Virtualization, The future of computing (archived)
Virtualization, The future of computing (archived)
 
Virtualization 101
Virtualization 101Virtualization 101
Virtualization 101
 
LCA13: Common Display Framework (CDF)
LCA13: Common Display Framework (CDF)LCA13: Common Display Framework (CDF)
LCA13: Common Display Framework (CDF)
 
XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...
XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...
XPDDS17: Keynote: Shared Coprocessor Framework on ARM - Oleksandr Andrushchen...
 
車載組み込み用ディープラーニング・エンジン NVIDIA DRIVE PX
車載組み込み用ディープラーニング・エンジン NVIDIA DRIVE PX車載組み込み用ディープラーニング・エンジン NVIDIA DRIVE PX
車載組み込み用ディープラーニング・エンジン NVIDIA DRIVE PX
 
Security best practices for hyper v and server virtualisation [svr307]
Security best practices for hyper v and server virtualisation [svr307]Security best practices for hyper v and server virtualisation [svr307]
Security best practices for hyper v and server virtualisation [svr307]
 

Plus de Liang Yan

Plus de Liang Yan (12)

Stable-Diffusion-v2.pdf
Stable-Diffusion-v2.pdfStable-Diffusion-v2.pdf
Stable-Diffusion-v2.pdf
 
ChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdf
 
Bring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdfBring-your-ML-Project-into-Production-v2.pdf
Bring-your-ML-Project-into-Production-v2.pdf
 
utf.pdf
utf.pdfutf.pdf
utf.pdf
 
GPU-Virtualization-in-openSUSE.pdf
GPU-Virtualization-in-openSUSE.pdfGPU-Virtualization-in-openSUSE.pdf
GPU-Virtualization-in-openSUSE.pdf
 
i-just-want-to-use-one-giant-vm.pdf
i-just-want-to-use-one-giant-vm.pdfi-just-want-to-use-one-giant-vm.pdf
i-just-want-to-use-one-giant-vm.pdf
 
a-new-playground-for-spdk-dpdk-on-arm64.pdf
a-new-playground-for-spdk-dpdk-on-arm64.pdfa-new-playground-for-spdk-dpdk-on-arm64.pdf
a-new-playground-for-spdk-dpdk-on-arm64.pdf
 
Accelerate-your-AI-Cloud-infrastructure.pdf
Accelerate-your-AI-Cloud-infrastructure.pdfAccelerate-your-AI-Cloud-infrastructure.pdf
Accelerate-your-AI-Cloud-infrastructure.pdf
 
A journay to do AI research in the cloud.pdf
A journay to do AI research in the cloud.pdfA journay to do AI research in the cloud.pdf
A journay to do AI research in the cloud.pdf
 
Linux and SUSE
Linux and SUSELinux and SUSE
Linux and SUSE
 
The abcs of gpu
The abcs of gpuThe abcs of gpu
The abcs of gpu
 
How to-boot-linuxl-on-your-soc-boards
How to-boot-linuxl-on-your-soc-boardsHow to-boot-linuxl-on-your-soc-boards
How to-boot-linuxl-on-your-soc-boards
 

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Dernier (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 

GPU Virtualization in SUSE

  • 1. GPU Virtualization: What we should know today Liang Yan (lyan) Virtualization Team
  • 2. 2 Outline Schedul ed Downti me 1. Background GPU Virtualization 2. GPU virtualization Definition and Classification Use scenario 3. Critical techniques SRIOV vs MDEV 4. Demo 5. Current status and Todo SUSE Outside Provider 6. Q&A
  • 4. 4 GPU Graphic Process Unit • 1980’s – No GPU. PC used VGA controller • 1990’s – Add more function into VGA controller • 1997 – 3D acceleration functions: Hardware for triangle setup and rasterization Texture mapping Shading • 2000 – A single chip graphics processor ( beginning of GPU term) • 2005 – Massively parallel programmable processors • 2007 – CUDA (Compute Unified Device Architecture)
  • 5. 5 GPU Purpose 3D hardware acceleration •DirectX •OpenCL •Vulkan Graphic RenderGraphic Render Big Data, Machine Learning: Tensor-flow, Caffe2 •CUDA Compute Unified Device Architecture •OpenCL Open Computing Language General ComputeGeneral Compute
  • 6. 6 GPU Structure Fermi • First generation of Tesla • Unified Architecture • MIMD ==> but better performance with SIMD • VLIW • Different Storage Unit Register File L1 L2 GPU Memory VRAM
  • 7. 7 GPU Traditional Pipeline Structure Vertex Shader Fragment/Pixel Shader Other Shader ==================== New Unified Architect: Unified shader GPU Pipeline Structure
  • 8. 8 GPU resource management Source: NVIDIA, Inc. 1. Channel a command submission system,which is used to launch GPU programs, start DMA operations or synchronize CPU and GPU 2. Context 3. Memory VRAM: frame buffer GTT: ring buffer for channel here
  • 9. 9 Virtualization What is virtualization? Choices: Operating System App. A App. B App. C App. D Hardware Virtualization Virtual Machine OS App. A App. B Hardware Virtual Machine OS App. C App. D Why? New infrastructure, fundamental of Cloud Efficient, Security, What is virtualization? Choices: KVM, XEN, Cirtrix XEN-Server, VMWare Vsphere, Hyper-V
  • 10. 10 Virtualization Virtualization Virtual Machine OS Hardware Virtual Machine OS Basic idea: Try to make VM access Physical Resource directly, decrease the overload by Virtualization. Different Stage: Emulation (QEMU, Bachs) Para virtualization (XEN pv, QEMU virtio) Full (Hardware assistant) virtualization CPU: VT-x Root and None-Root Mode Memory: EPT/NPT IO device VT-d/ AMD-Vi /SMMU SR-IOV/MR-IOV
  • 12. 12 GPU Virtualization Virtual GPU for Guest VM Like a real GPU as much as possible GPU virtualization, different stage like Virtualization Software Virtualization ● Software Emulated CPU “trap and emulate” GPU instruction Slow, limited function ● API forwarding Frontend intercept APIs and forward Backend translate and send back Simple idea, but painful for API compatible IO virtualization, GPU as a PCIe device today. ● GPU Passthrough ● Full GPU Virtualization
  • 13. 13 GPU Passthrough GPU as a PCIe device today. Full API support in Guest VM Stable, supported by all Vendors with hardware requirement From SLES 12SP2 SOC 8 Native-close performance, 95~97% PCI resources: PCI configure space, ROM, BARs(PIO, MMIO) Key Components: IOMMU: Hardware VFIO: DMA operation in userspace level
  • 14. 14 VFIO and IOMMU PCI resources: PCI configure space, ROM, BARs(PIO, MMIO) IOMMU: Hardware DMA remapping Interrupt remapping VFIO: userspace driver for PCI device Configure space QEMU emulated with VFIO PIO I/O bitmap of VMCS MMIO EPT Interrupt IOEVENTFD IRQFD IOMMU DMA IOMMU GPA <==> HPA
  • 15. 15 Full GPU Virtualization Run native graphics driver in VM Achieve good performance and moderate multiplexing capability ● Split Time Slices framebuffer memory ● Isolate Give a neat access between VM and Host Physical Device IOMMU/Mdev and VFIO DMA Interrupt ● Schedule Efficient and Robust Pretty fix for AMD, More flexible for NVIDIA, RR, BOND
  • 16. 16 vGPU Investments Upstream ● NVIDIA (GRID) ● Intel (GVT-G) ● AMD(GIM) Intel has no VRAM AMD has IOMMU support SRIOV 97% MDEV 80~90% Full GPU Virtualization
  • 17. 17 Nvidia Tesla Series: Volta Pascal Maxwell M6 M10 M60 P4 P6 P40 P100 V100 GRID: Kepler K1 K2 (VDI and application virtualization) http://www.nvidia.com/object/grid-certified-servers.html AMD FirePro S7150 S7150x2 Radeon Pro V320 V340 Radeon Instinct MI6 MI8 MI25(Machine learning interface, CUDA compatible with HIP) https://lists.freedesktop.org/archives/amd-gfx/2016-December/004075.html Intel      Haswell(3VMs)  Broadwell(7VMs) Skylake, Kaby Lake      https://github.com/intel/gvt-linux/wiki Full GPU Virtualization
  • 19. 19
  • 20. 20 Mediated devices non SR-IOV, require vendor- specific drivers to mediate sharing Leveraging existing VFIO framework, UAPI Vendor driver - Mediated Device – managing device’s internal I/O resource SR-IOV devices supported by standard VFIO PCI (Direct Assignment) Established QEMU VFIO/PCI driver, KVM agnostic and well-defined UAPI Virtualized PCI config /MMIO space access, interrupt delivery Modular IOMMU, pin and map memory for DMA
  • 21. 21 MEDIATED DEVICE FRAMEWORK Mediated core module (new) Mediated bus driver, create mediated device Physical device interface for vendor driver callbacks Generic mediate device management user interface (sysfs) Mediated device module (new) Manage created mediated device, fully compatible with VFIO user API VFIO IOMMU driver (enhancement) VFIO IOMMU API TYPE1 compatible, easy to extend to non-TYPE1
  • 22. 22 Registers VFIO MDEV as driver Vendor driver registers devices Vendor driver registers Mediated CBs User writes mdev sysfs to create mdev device QEMU calls VFIO API to add VFIO dev to IOMMU container, group, get fd back QEMU access device fd and present it into VM A mediated pass-through solution for graphics virtualization • Pass-through performance critical resources • Trap-and-emulate privileged operations • Maintain a device model per VM
  • 23. Demo
  • 24. 24 Demo 3D hardware acceleration •DirectX •OpenCL •Vulkan Intel GVT-GIntel GVT-G Big Data, Machine Learning: Tensor-flow, Caffe2 •CUDA Compute Unified Device Architecture •OpenCL Open Computing Language Nvidia GRIDNvidia GRID
  • 25. 25 Use Scenario GPU as a service IVI Visual Cloud
  • 27. 27 Most of the work is done by Intel Nvidia IBM and RH unfortunately SUSE - Intel KVMGT technical ready - Nvidia GRID technical ready - AMD MxGPU ongoing - GPU passthrough stage for Cloud - GPU virtualization for CAAS Outside - Remote display - IOMMU compatible - Live Migration - Scalability
  • 29. 29 REFERENCE VGPU ON KVM An Introduction to PCI Device Assignment with VFIO - Alex Williamson, Red Hat [Qemu-devel] [PATCH v7 0/4] Add Mediated device support [libvirt] [RFC] libvirt vGPU QEMU integratio https://yq.aliyun.com/articles/590909?spm=a2c4e.11153940.blogcont599189.23.f2016d7bXPo7TD https://zhuanlan.zhihu.com/p/35489035
  • 30. 30 +49 911 740 53 0 (Worldwide) www.suse.com Corporate Headquarters Maxfeldstrasse 5 90409 Nuremberg Germany Join us on: www.opensuse.org
  • 31. Unpublished Work of SUSE. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary, and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners. 257-000020-001