GPU Virtualization on VMwares Hosted IO Architecture Micah






















- Slides: 22
GPU Virtualization on VMware’s Hosted I/O Architecture Micah Dowty Jeremy Sugerman USENIX WIOV 2008 1
Contents • • • GPUs are hard But GPU virtualization is worth the trouble How to virtualize a GPU? VMware’s virtual GPU Conclusions • In the paper: – Details on our implementation – Benchmarks, analysis 2
What is a GPU, anyway? • Video playback, 2 D graphics, drawing triangles and rectangles and lines. . . • Computation. 3
How much computation? NVIDIA Ge. Force GTX 280: 1. 4 billion transistors Intel Core 2 Duo: 291 million transistors Source: Anand. Tech review of NVidia GT 200 4
Programmable 3 D Pipeline Texture Data Vertex Pipeline • Position • Material • Texture coordinate Rasterization Pixel Pipeline Framebuffer • Plot triangles, lines • Interpolate vertices State Vertex Shader Pixel Shader (State of the art circa 2002. . . ) 5
Unique challenges • API – Not quite read(), write(), select(). . . – Multiple competing APIs – Hundreds of entry points • Programmable – Every GPU driver is also a compiler – Each API includes a language spec 6
Unique challenges • Hardware specs – Diverse, changes frequently – Closely guarded secret* – Speed vs. portability App Open. GL App Direct 3 D App Compute GPU Driver GPU • Hardware state – Up to gigabytes of data – Highly device-specific format – In-progress DMA and computation * With a few notable exceptions. 7
What are GPUs good for? • Desktop Apps – – Entertainment CAD Multimedia Productivity • Desktop GUIs – Quartz Extreme – Vista Aero – Compiz 8
GPUs in the Data Center • Server-hosted Desktops • GPGPU 9
API Remoting Guest App API App Open. GL / Direct 3 D Redirector Host RPC Endpoint Open. GL / Direct 3 D GPU Driver GPU User-level API Kernel Hardware
Device Emulation Guest Host GPU Emulator Resource Management User-level Shader / State Translator App App Rendering Backend API Open. GL / Direct 3 D Kernel Virtual GPU Driver Virtual GPU Virtual HW Shared System Memory API Kernel Hardware
Fixed pass-through Virtual Machine App App API Open. GL / Direct 3 D / Compute GPU Driver Pass-through GPU DMA MMIO IRQ VT-d Physical GPU PCI
Mediated pass-through Virtual Machine App App App API Open. GL / Direct 3 D / Compute GPU Driver Pass-through GPU Emulation GPU Resource Manager Physical GPU
GPU Virtualization Taxonomy API Remoting Front-end Back-end Device Emulation Hybrid (Driver VM) Fixed Pass-through 1: 1 Mediated Pass-through 1: N 14
VMware’s Virtual GPU • Compatibility – Any physical GPU – Any guest driver stack – Adjustable capability exposure – No direct access to GPU memory Device Emulation Resource Management Shader / State Translator App App Rendering Backend Open. GL / Direct 3 D Virtual GPU Driver VMware SVGA II GPU • Efficiency – Flexible guest memory management – Few copies – Asynchronous rendering 15
VMware SVGA II 16
Virtual Graphics Stack App VMware SVGA Driver Guest SVGA FIFO / Registers Host 2 D Compositing Guest Mem 2 D Video 3 D SVGA Device Guest VRAM MKS / Host. Ops Dispatch SVGA GMR Shader Program Translator State Translator 3 D Drawing Path Surface Abstraction 3 D Rendering DMA Engine GPU API / Driver GPU 17
Evaluation • Applications • Microbenchmarks • VMware Fusion 2. 0, VMware Workstation 6. 5, Parallels Desktop 3. 0, Swift. Shader • Mac Pro, 8 -core 2. 8 GHz • ATI Radeon HD 2600 18
Application Benchmarks 19
Summary • GPU Virtualization is an important problem • Room for improvement in implementation completeness and performance. . . • But we can already run interactive apps that could never be virtualized before • Virtual GPU preserves portability + isolation 20
Future Work • Pass-through techniques – Fixed and Mediated – Can be complementary to Virtual GPU • Continued improvements – Performance and functionality – At all layers of driver stack • Virtualization-aware GPU benchmarks 21
Questions? • micah@vmware. com 22