SlideShare a Scribd company logo
©2014 GlobalLogic Inc.
GPU Virtualization in Embedded
Automotive Solutions
Sergiy Kibrik
GlobalLogic Embedded TechTalk
July 22, 2015
2
Why One Wants to Virtualize?Why One Wants to Virtualize?
VSVS
3
ARM implemented virtualization support on some of ARM v7 processorsARM implemented virtualization support on some of ARM v7 processors
4
Key Virtualization TargetsKey Virtualization Targets
• isolationisolation
• parallelismparallelism
• safetysafety
• robustnessrobustness
• performanceperformance
5
Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches
OpenGL/DirectX/OpenCL etcOpenGL/DirectX/OpenCL etc
API RemotingAPI Remoting
match:match: isolation, parallelism, safetyisolation, parallelism, safety
no match:no match: robustness, performancerobustness, performance
on embedded systemson embedded systems
Vendors: Xen (VMGL), Chromium,Vendors: Xen (VMGL), Chromium,
Android Emluator,Android Emluator,
presumably MentorGraphics & RedBendpresumably MentorGraphics & RedBend
6
Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches
Driver SplitDriver Split
Vendors: VMWare SVGA2Vendors: VMWare SVGA2
match:match: isolation, parallelism, safetyisolation, parallelism, safety
no match:no match: robustness, performancerobustness, performance
on embedded systemson embedded systems + high cost+ high cost
7
Do It The Hard WayDo It The Hard WayTMTM
Full GPU Emulation!Full GPU Emulation!
Registers & VRAMRegisters & VRAM
virtualizedvirtualized
Every single oneEvery single one
access is trapped &access is trapped &
emulatedemulated
8
Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches
Direct pass-through:Direct pass-through:
match:match: safety, performance,safety, performance,
robustnessrobustness
no match:no match: isolation, parallelismisolation, parallelism
Vendors: NVIDIA GRID vGPUVendors: NVIDIA GRID vGPU
9
And the Right Approach :)And the Right Approach :)
match:match: isolation, parallelism,isolation, parallelism,
safety, robustnesssafety, robustness
not quite match:not quite match:
performanceperformance
Mediated pass-throughMediated pass-through
10
A bit of GPU Pipeline…A bit of GPU Pipeline…
11
……and what this stuff actually doesand what this stuff actually does
12
Real World Example: GeForce 8800Real World Example: GeForce 8800
(2006)(2006)
13
Embedded Case: PowerVR Graphics PipelineEmbedded Case: PowerVR Graphics Pipeline
• tile-based renderingtile-based rendering
• hidden surface removalhidden surface removal
14
PowerVR SGX5xx HardwarePowerVR SGX5xx Hardware
TI OMAP5770/DRA7/Jacinto6:TI OMAP5770/DRA7/Jacinto6:
•2 SGX544 cores2 SGX544 cores
•4 USSE processors each4 USSE processors each
•4 pipes & 16 threads each4 pipes & 16 threads each
•128 parallel threads128 parallel threads
•runs OS: uKernelruns OS: uKernel
15
Key Virtualization Techniques: MMU Pass-ThroughKey Virtualization Techniques: MMU Pass-Through
• trap all MMU accessestrap all MMU accesses
• introduce shadow PD/PTintroduce shadow PD/PT
• hypercall to Xen for translationhypercall to Xen for translation
16
Key Virtualization Techniques: control hijackingKey Virtualization Techniques: control hijacking
• un-map IO registers for allun-map IO registers for all
domainsdomains
• trap each register accesstrap each register access
• if domain is active repeat‒if domain is active repeat‒
actionaction
• remember action otherwiseremember action otherwise
17
Key Virtualization Techniques: Global (firmware) context switchKey Virtualization Techniques: Global (firmware) context switch
• we can inject commandwe can inject command
• uKernel has power commanduKernel has power command
• forward IRQ to active domain onlyforward IRQ to active domain only
18
Key Virtualization Techniques: VGPU SchedulingKey Virtualization Techniques: VGPU Scheduling
• GPU tasks non-preemptibleGPU tasks non-preemptible
• long context switch timelong context switch time
• GPU scheduled separatelyGPU scheduled separately
• simple FIFO scheduler for nowsimple FIFO scheduler for now
19
20
Similar Approach: XenGTSimilar Approach: XenGT
• our inspirationour inspiration
• has some kind of independent channelshas some kind of independent channels
• Intel onlyIntel only
• heavily abstractedheavily abstracted
21
Some Performance IllustrationSome Performance Illustration
TestTest RateRate
GL Benchmark EgyptGL Benchmark Egypt 22.5 fps22.5 fps
NenaMark2NenaMark2 27.3 fps27.3 fps
22
Further Improvements:Further Improvements:
• virtualization support in uKernel (VE)virtualization support in uKernel (VE)
• smart GPU schedulersmart GPU scheduler
Materials:Materials:
• Kun Tian , Yaozu Dong , David Cowperthwaite, A full GPU virtualization solution with mediated pass-Kun Tian , Yaozu Dong , David Cowperthwaite, A full GPU virtualization solution with mediated pass-
through, Proceedings of the 2014 USENIX conference on USENIX Annual Technical Conference, Junethrough, Proceedings of the 2014 USENIX conference on USENIX Annual Technical Conference, June
19-20, 2014, Philadelphia, PA19-20, 2014, Philadelphia, PA
• Yusuke Suzuki, Shinpei Kato, Hiroshi Yamada, and Kenji Kono. 2014.Yusuke Suzuki, Shinpei Kato, Hiroshi Yamada, and Kenji Kono. 2014. GPUvm: why not virtualizingGPUvm: why not virtualizing
GPUs at the hypervisor?.GPUs at the hypervisor?. InIn Proceedings of the 2014 USENIX conference on USENIX Annual TechnicalProceedings of the 2014 USENIX conference on USENIX Annual Technical
ConferenceConference (USENIX ATC'14), Garth Gibson and Nickolai Zeldovich (Eds.).(USENIX ATC'14), Garth Gibson and Nickolai Zeldovich (Eds.). USENIX Association,USENIX Association,
Berkeley, CA, USA, 109-120.Berkeley, CA, USA, 109-120.
• Micah Dowty and Jeremy Sugerman. 2008. GPU virtualization on VMware's hosted I/O architecture. InMicah Dowty and Jeremy Sugerman. 2008. GPU virtualization on VMware's hosted I/O architecture. In
Proceedings of the First conference on I/O virtualizationProceedings of the First conference on I/O virtualization (WIOV'08).(WIOV'08). USENIX Association, Berkeley,USENIX Association, Berkeley,
CA, USA, 7-7CA, USA, 7-7
• NVIDIA, “Fermi: The First Complete GPU Computing Architecture”, 2009NVIDIA, “Fermi: The First Complete GPU Computing Architecture”, 2009
• J. Nickolls and D. Kirk, ‘‘Graphics and Computing GPUs,’’ Computer Organization and Design: TheJ. Nickolls and D. Kirk, ‘‘Graphics and Computing GPUs,’’ Computer Organization and Design: The
Hardware/Software Interface, D.A. Patterson and J.L. Hennessy, 4th ed., Morgan Kaufmann, 2009,Hardware/Software Interface, D.A. Patterson and J.L. Hennessy, 4th ed., Morgan Kaufmann, 2009,
pp.pp. A2-A77.A2-A77.
• Imagination, “PowerVR Series5 Architecture Guide for Developers”, 2014Imagination, “PowerVR Series5 Architecture Guide for Developers”, 2014
• Imagination, “PowerVR Hardware Architecture Overview for Developers”, 2015Imagination, “PowerVR Hardware Architecture Overview for Developers”, 2015
• H.AndrésLagar-Cavilla, “VMGL: VMM-Independent Graphics Acceleration”, undatedH.AndrésLagar-Cavilla, “VMGL: VMM-Independent Graphics Acceleration”, undated
• OpenSynergy, “Shared GPU using Virtualization”, undatedOpenSynergy, “Shared GPU using Virtualization”, undated
©2014 GlobalLogic Inc.
Thank You

More Related Content

What's hot (20)

PDF
KVM tools and enterprise usage
vincentvdk
 
PDF
Virtualization with KVM (Kernel-based Virtual Machine)
Novell
 
PDF
AMD EPYC™ Microprocessor Architecture
AMD
 
PDF
Red Hat OpenShift Container Platform Overview
James Falkner
 
PDF
Explore Android Internals
National Cheng Kung University
 
PDF
GPU Virtualization on VMware's Hosted I/O Architecture
guestb3fc97
 
PDF
Mixed-critical adaptive AUTOSAR stack based on VxWorks, Linux, and virtualiza...
Andrei Kholodnyi
 
PDF
Android's HIDL: Treble in the HAL
Opersys inc.
 
PPTX
OpenStack Quantum Intro (OS Meetup 3-26-12)
Dan Wendlandt
 
PDF
Embedded Android : System Development - Part IV
Emertxe Information Technologies Pvt Ltd
 
PDF
How to Survive an OpenStack Cloud Meltdown with Ceph
Sean Cohen
 
PDF
Developing Automotive Linux
Alison Chaiken
 
PDF
oVirt installation guide_v4.3
CheolHee Han
 
PPTX
Introduction to kubernetes
Rishabh Indoria
 
PDF
The kvm virtualization way
Francisco Gonçalves
 
PDF
Android IPC Mechanism
National Cheng Kung University
 
PPTX
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
The Linux Foundation
 
PDF
Xen Hypervisor
Susheel Thakur
 
PDF
Virtualization Architecture & KVM
Pradeep Kumar
 
PDF
05.2 virtio introduction
zenixls2
 
KVM tools and enterprise usage
vincentvdk
 
Virtualization with KVM (Kernel-based Virtual Machine)
Novell
 
AMD EPYC™ Microprocessor Architecture
AMD
 
Red Hat OpenShift Container Platform Overview
James Falkner
 
Explore Android Internals
National Cheng Kung University
 
GPU Virtualization on VMware's Hosted I/O Architecture
guestb3fc97
 
Mixed-critical adaptive AUTOSAR stack based on VxWorks, Linux, and virtualiza...
Andrei Kholodnyi
 
Android's HIDL: Treble in the HAL
Opersys inc.
 
OpenStack Quantum Intro (OS Meetup 3-26-12)
Dan Wendlandt
 
Embedded Android : System Development - Part IV
Emertxe Information Technologies Pvt Ltd
 
How to Survive an OpenStack Cloud Meltdown with Ceph
Sean Cohen
 
Developing Automotive Linux
Alison Chaiken
 
oVirt installation guide_v4.3
CheolHee Han
 
Introduction to kubernetes
Rishabh Indoria
 
The kvm virtualization way
Francisco Gonçalves
 
Android IPC Mechanism
National Cheng Kung University
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
The Linux Foundation
 
Xen Hypervisor
Susheel Thakur
 
Virtualization Architecture & KVM
Pradeep Kumar
 
05.2 virtio introduction
zenixls2
 

Viewers also liked (10)

PDF
[MirrorLink Hackathon] Intro to the MirrorLink API, requirements & tools by E...
BeMyApp
 
PDF
How to Upgrade a Coffee Machine Using Arduino
GlobalLogic Ukraine
 
PPTX
VDI and Application Virtualization
James W. De Rienzo
 
PPTX
CPU Scheduling for Virtual Desktop Infrastructure
Hwanju Kim
 
PDF
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
The Linux Foundation
 
PPTX
Internet of Things - GlobalLogic Projects
GlobalLogic Ukraine
 
PDF
Xen Project: Windows PV Drivers
The Linux Foundation
 
PPTX
3. CPU virtualization and scheduling
Hwanju Kim
 
PDF
Virtualization Technology Overview
OpenCity Community
 
PDF
Introduction to virtualization
Sasikumar Thirumoorthy
 
[MirrorLink Hackathon] Intro to the MirrorLink API, requirements & tools by E...
BeMyApp
 
How to Upgrade a Coffee Machine Using Arduino
GlobalLogic Ukraine
 
VDI and Application Virtualization
James W. De Rienzo
 
CPU Scheduling for Virtual Desktop Infrastructure
Hwanju Kim
 
XPDS13: Xen in OSS based In–Vehicle Infotainment Systems - Artem Mygaiev, Glo...
The Linux Foundation
 
Internet of Things - GlobalLogic Projects
GlobalLogic Ukraine
 
Xen Project: Windows PV Drivers
The Linux Foundation
 
3. CPU virtualization and scheduling
Hwanju Kim
 
Virtualization Technology Overview
OpenCity Community
 
Introduction to virtualization
Sasikumar Thirumoorthy
 
Ad

Similar to GPU Virtualization in Embedded Automotive Solutions (20)

PDF
GPU Virtualization in SUSE
Liang Yan
 
PPT
Unit II.ppt
HARISHK762704
 
PDF
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Vietnam Open Infrastructure User Group
 
PPTX
Virtualization of computing and servers
pooranionline
 
PDF
LFCollab14: Xen vs Xen Automotive
The Linux Foundation
 
PDF
GPU-Virtualization-in-openSUSE.pdf
Liang Yan
 
PPTX
Operating system Virtualization_NEW.pptx
Senthil Vit
 
PPTX
Server virtualization
Kingston Smiler
 
PPTX
Virtualization technolegys for amdocs
Samuel Dratwa
 
ODP
UDS 2012 Xen
George Dunlap
 
PPTX
5. IO virtualization
Hwanju Kim
 
PDF
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
The Linux Foundation
 
PPTX
VIRTUALIZATION AND ITS TYPES IMPLEMENTATION.pptx
soundharya59
 
PDF
Mobile Virtualization using the Xen Technologies
The Linux Foundation
 
PPTX
CC-5 - MOD.pptx Cloud Vertulization nand
AdeelAsghar36
 
PDF
Unit 3 Virtualization.pdf
PrachiKurhade3
 
PDF
Cloud computing Lec 02 - virtualization.pdf
asokawennawatte
 
PPTX
Hardware support for efficient virtualization
Lennox Wu
 
PPT
Virtualization Technology for Test Automation
extentconf Tsoy
 
PPT
Virtualization Technology for Test Automation
Iosif Itkin
 
GPU Virtualization in SUSE
Liang Yan
 
Unit II.ppt
HARISHK762704
 
2virtualizationtechnologyoverview 13540659831745-phpapp02-121127193019-phpapp01
Vietnam Open Infrastructure User Group
 
Virtualization of computing and servers
pooranionline
 
LFCollab14: Xen vs Xen Automotive
The Linux Foundation
 
GPU-Virtualization-in-openSUSE.pdf
Liang Yan
 
Operating system Virtualization_NEW.pptx
Senthil Vit
 
Server virtualization
Kingston Smiler
 
Virtualization technolegys for amdocs
Samuel Dratwa
 
UDS 2012 Xen
George Dunlap
 
5. IO virtualization
Hwanju Kim
 
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
The Linux Foundation
 
VIRTUALIZATION AND ITS TYPES IMPLEMENTATION.pptx
soundharya59
 
Mobile Virtualization using the Xen Technologies
The Linux Foundation
 
CC-5 - MOD.pptx Cloud Vertulization nand
AdeelAsghar36
 
Unit 3 Virtualization.pdf
PrachiKurhade3
 
Cloud computing Lec 02 - virtualization.pdf
asokawennawatte
 
Hardware support for efficient virtualization
Lennox Wu
 
Virtualization Technology for Test Automation
extentconf Tsoy
 
Virtualization Technology for Test Automation
Iosif Itkin
 
Ad

More from GlobalLogic Ukraine (20)

PDF
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
PPTX
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
PDF
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
PDF
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
PPTX
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
PPTX
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
PPTX
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
PDF
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
PDF
JavaScript Community Webinar #14 "Why Is Git Rebase?"
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
PPTX
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
PDF
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
PDF
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
PDF
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
PDF
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
PPTX
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
PDF
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
PDF
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #21 “Інтерв’ю без заспокійливих”
GlobalLogic Ukraine
 
Deadlocks in SQL - Turning Fear Into Understanding (by Sergii Stets)
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
GlobalLogic Embedded Community x ROS Ukraine Webinar "Surgical Robots"
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #17 “SpringJDBC vs JDBC. Is Spring a Hero?”
GlobalLogic Ukraine
 
GlobalLogic JavaScript Community Webinar #18 “Long Story Short: OSI Model”
GlobalLogic Ukraine
 
Штучний інтелект як допомога в навчанні, а не замінник.pptx
GlobalLogic Ukraine
 
Задачі AI-розробника як застосовується штучний інтелект.pptx
GlobalLogic Ukraine
 
Що треба вивчати, щоб стати розробником штучного інтелекту та нейромереж.pptx
GlobalLogic Ukraine
 
GlobalLogic Java Community Webinar #16 “Zaloni’s Architecture for Data-Driven...
GlobalLogic Ukraine
 
JavaScript Community Webinar #14 "Why Is Git Rebase?"
GlobalLogic Ukraine
 
GlobalLogic .NET Community Webinar #3 "Exploring Serverless with Azure Functi...
GlobalLogic Ukraine
 
Страх і сила помилок - IT Inside від GlobalLogic Education
GlobalLogic Ukraine
 
GlobalLogic .NET Webinar #2 “Azure RBAC and Managed Identity”
GlobalLogic Ukraine
 
GlobalLogic QA Webinar “What does it take to become a Test Engineer”
GlobalLogic Ukraine
 
“How to Secure Your Applications With a Keycloak?
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
GlobalLogic Machine Learning Webinar “Statistical learning of linear regressi...
GlobalLogic Ukraine
 
GlobalLogic C++ Webinar “The Minimum Knowledge to Become a C++ Developer”
GlobalLogic Ukraine
 
Embedded Webinar #17 "Low-level Network Testing in Embedded Devices Development"
GlobalLogic Ukraine
 

Recently uploaded (20)

PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PPTX
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
PPTX
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PDF
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPTX
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Solar Thermal Energy System Seminar.pptx
Gpc Purapuza
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
UNIT DAA PPT cover all topics 2021 regulation
archu26
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Hashing Introduction , hash functions and techniques
sailajam21
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 

GPU Virtualization in Embedded Automotive Solutions

  • 1. ©2014 GlobalLogic Inc. GPU Virtualization in Embedded Automotive Solutions Sergiy Kibrik GlobalLogic Embedded TechTalk July 22, 2015
  • 2. 2 Why One Wants to Virtualize?Why One Wants to Virtualize? VSVS
  • 3. 3 ARM implemented virtualization support on some of ARM v7 processorsARM implemented virtualization support on some of ARM v7 processors
  • 4. 4 Key Virtualization TargetsKey Virtualization Targets • isolationisolation • parallelismparallelism • safetysafety • robustnessrobustness • performanceperformance
  • 5. 5 Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches OpenGL/DirectX/OpenCL etcOpenGL/DirectX/OpenCL etc API RemotingAPI Remoting match:match: isolation, parallelism, safetyisolation, parallelism, safety no match:no match: robustness, performancerobustness, performance on embedded systemson embedded systems Vendors: Xen (VMGL), Chromium,Vendors: Xen (VMGL), Chromium, Android Emluator,Android Emluator, presumably MentorGraphics & RedBendpresumably MentorGraphics & RedBend
  • 6. 6 Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches Driver SplitDriver Split Vendors: VMWare SVGA2Vendors: VMWare SVGA2 match:match: isolation, parallelism, safetyisolation, parallelism, safety no match:no match: robustness, performancerobustness, performance on embedded systemson embedded systems + high cost+ high cost
  • 7. 7 Do It The Hard WayDo It The Hard WayTMTM Full GPU Emulation!Full GPU Emulation! Registers & VRAMRegisters & VRAM virtualizedvirtualized Every single oneEvery single one access is trapped &access is trapped & emulatedemulated
  • 8. 8 Common GPU Virtualization ApproachesCommon GPU Virtualization Approaches Direct pass-through:Direct pass-through: match:match: safety, performance,safety, performance, robustnessrobustness no match:no match: isolation, parallelismisolation, parallelism Vendors: NVIDIA GRID vGPUVendors: NVIDIA GRID vGPU
  • 9. 9 And the Right Approach :)And the Right Approach :) match:match: isolation, parallelism,isolation, parallelism, safety, robustnesssafety, robustness not quite match:not quite match: performanceperformance Mediated pass-throughMediated pass-through
  • 10. 10 A bit of GPU Pipeline…A bit of GPU Pipeline…
  • 11. 11 ……and what this stuff actually doesand what this stuff actually does
  • 12. 12 Real World Example: GeForce 8800Real World Example: GeForce 8800 (2006)(2006)
  • 13. 13 Embedded Case: PowerVR Graphics PipelineEmbedded Case: PowerVR Graphics Pipeline • tile-based renderingtile-based rendering • hidden surface removalhidden surface removal
  • 14. 14 PowerVR SGX5xx HardwarePowerVR SGX5xx Hardware TI OMAP5770/DRA7/Jacinto6:TI OMAP5770/DRA7/Jacinto6: •2 SGX544 cores2 SGX544 cores •4 USSE processors each4 USSE processors each •4 pipes & 16 threads each4 pipes & 16 threads each •128 parallel threads128 parallel threads •runs OS: uKernelruns OS: uKernel
  • 15. 15 Key Virtualization Techniques: MMU Pass-ThroughKey Virtualization Techniques: MMU Pass-Through • trap all MMU accessestrap all MMU accesses • introduce shadow PD/PTintroduce shadow PD/PT • hypercall to Xen for translationhypercall to Xen for translation
  • 16. 16 Key Virtualization Techniques: control hijackingKey Virtualization Techniques: control hijacking • un-map IO registers for allun-map IO registers for all domainsdomains • trap each register accesstrap each register access • if domain is active repeat‒if domain is active repeat‒ actionaction • remember action otherwiseremember action otherwise
  • 17. 17 Key Virtualization Techniques: Global (firmware) context switchKey Virtualization Techniques: Global (firmware) context switch • we can inject commandwe can inject command • uKernel has power commanduKernel has power command • forward IRQ to active domain onlyforward IRQ to active domain only
  • 18. 18 Key Virtualization Techniques: VGPU SchedulingKey Virtualization Techniques: VGPU Scheduling • GPU tasks non-preemptibleGPU tasks non-preemptible • long context switch timelong context switch time • GPU scheduled separatelyGPU scheduled separately • simple FIFO scheduler for nowsimple FIFO scheduler for now
  • 19. 19
  • 20. 20 Similar Approach: XenGTSimilar Approach: XenGT • our inspirationour inspiration • has some kind of independent channelshas some kind of independent channels • Intel onlyIntel only • heavily abstractedheavily abstracted
  • 21. 21 Some Performance IllustrationSome Performance Illustration TestTest RateRate GL Benchmark EgyptGL Benchmark Egypt 22.5 fps22.5 fps NenaMark2NenaMark2 27.3 fps27.3 fps
  • 22. 22 Further Improvements:Further Improvements: • virtualization support in uKernel (VE)virtualization support in uKernel (VE) • smart GPU schedulersmart GPU scheduler Materials:Materials: • Kun Tian , Yaozu Dong , David Cowperthwaite, A full GPU virtualization solution with mediated pass-Kun Tian , Yaozu Dong , David Cowperthwaite, A full GPU virtualization solution with mediated pass- through, Proceedings of the 2014 USENIX conference on USENIX Annual Technical Conference, Junethrough, Proceedings of the 2014 USENIX conference on USENIX Annual Technical Conference, June 19-20, 2014, Philadelphia, PA19-20, 2014, Philadelphia, PA • Yusuke Suzuki, Shinpei Kato, Hiroshi Yamada, and Kenji Kono. 2014.Yusuke Suzuki, Shinpei Kato, Hiroshi Yamada, and Kenji Kono. 2014. GPUvm: why not virtualizingGPUvm: why not virtualizing GPUs at the hypervisor?.GPUs at the hypervisor?. InIn Proceedings of the 2014 USENIX conference on USENIX Annual TechnicalProceedings of the 2014 USENIX conference on USENIX Annual Technical ConferenceConference (USENIX ATC'14), Garth Gibson and Nickolai Zeldovich (Eds.).(USENIX ATC'14), Garth Gibson and Nickolai Zeldovich (Eds.). USENIX Association,USENIX Association, Berkeley, CA, USA, 109-120.Berkeley, CA, USA, 109-120. • Micah Dowty and Jeremy Sugerman. 2008. GPU virtualization on VMware's hosted I/O architecture. InMicah Dowty and Jeremy Sugerman. 2008. GPU virtualization on VMware's hosted I/O architecture. In Proceedings of the First conference on I/O virtualizationProceedings of the First conference on I/O virtualization (WIOV'08).(WIOV'08). USENIX Association, Berkeley,USENIX Association, Berkeley, CA, USA, 7-7CA, USA, 7-7 • NVIDIA, “Fermi: The First Complete GPU Computing Architecture”, 2009NVIDIA, “Fermi: The First Complete GPU Computing Architecture”, 2009 • J. Nickolls and D. Kirk, ‘‘Graphics and Computing GPUs,’’ Computer Organization and Design: TheJ. Nickolls and D. Kirk, ‘‘Graphics and Computing GPUs,’’ Computer Organization and Design: The Hardware/Software Interface, D.A. Patterson and J.L. Hennessy, 4th ed., Morgan Kaufmann, 2009,Hardware/Software Interface, D.A. Patterson and J.L. Hennessy, 4th ed., Morgan Kaufmann, 2009, pp.pp. A2-A77.A2-A77. • Imagination, “PowerVR Series5 Architecture Guide for Developers”, 2014Imagination, “PowerVR Series5 Architecture Guide for Developers”, 2014 • Imagination, “PowerVR Hardware Architecture Overview for Developers”, 2015Imagination, “PowerVR Hardware Architecture Overview for Developers”, 2015 • H.AndrésLagar-Cavilla, “VMGL: VMM-Independent Graphics Acceleration”, undatedH.AndrésLagar-Cavilla, “VMGL: VMM-Independent Graphics Acceleration”, undated • OpenSynergy, “Shared GPU using Virtualization”, undatedOpenSynergy, “Shared GPU using Virtualization”, undated