an introduction to intel gvt-g (with new architecture) introduction to intel gvt-g (with new...
TRANSCRIPT
![Page 1: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/1.jpg)
Software & Services Group
An Introduction to Intel GVT-g
(with new architecture)
Zhi Wang [email protected]
WW24’17
1
![Page 2: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/2.jpg)
Software & Services Group
GPU Virtualization
2
VMVM
Hypervisor
Intel Processor Graphics
VM …
![Page 3: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/3.jpg)
Software & Services Group
Existing Arts vs Intel GVT-g
API Forwarding
Direct Pass-Through
FullGPU Virtualization
Hypervisor
FEBE
GPU
GFX APIs
Hypervisor
GPU
GFX
Hypervisor
GPU
GFX
vGPU GFX
Legacy VGAEmulation
Hypervisor
VGAQemu
GPU
- 2D only +3D+Sharing- Media/compute- Compatibility
+3D/media/compute+Performance- No sharing
+3D/media/compute+Performance+Sharing
3
![Page 4: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/4.jpg)
Software & Services Group
Intel GVT-g Capabilities
Intel Confidential 4
Hypervisor
Performance Feature Sharing
Near native performance with direct GPU execution
Run native graphics stack to sustain visual experience
OpenGL 4.2
OpenCL 1.2
DirectX11.1
Accelerate up to 8 VMs plus Dom0
Dom0 VM1 VM2 VM3
APPAPP APPAPP APPAPP APPAPP
![Page 5: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/5.jpg)
Software & Services Group
GVT_g (KVMGT) Architecture
5
GFXDriver
IOMMU GPU
Host LinuxGuest OS
KVMIOMMU Driver
VFIO
Mdev Framework
GFX Driver…
QemuLibvirt
Mdevmgmt
Device Model
VFIO
![Page 6: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/6.jpg)
Software & Services Group
Resource Management
6
I915 Resource Management
Aperture HiddenDOM0
PVINFO
VM …
Fence
vGPU Type 0 vGPU Type 1 …
VM
GVT Resource Management
Request resource from host i915
• vGPU resources
– Graphics memory
– Fence registers
• Request GPU resource
from host resource
allocator
• GVT manages vGPU
resource according to
vGPU types
![Page 7: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/7.jpg)
Software & Services Group
Interrupt
7
Host VMVM
VM
GPU Interrupts
Interrupt Emulating
MPT
GVT Interrupt Emulation Policy
Framework
Virtual Interrupt
Regs
Full GPU interrupt virtualization
• Display Interrupts
– VBlank
– GMBUS
– AUX Channel
• GPU command Interrupts
– MI_USER_INTERRUPT
– PIPE_CONTROL_NOTIFY
• Context Switch Interrupts
![Page 8: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/8.jpg)
Software & Services Group
Shadow GPU Page Table - GGTT
8
8
Host View VM1 VM2 VM3
Low gfx memory space
High gfx memory space
Ballooned graphics memory space
Available graphics memory space to VMs
• Global graphics memory space (GGTT) is partitioned
- Dedicated resource for each VM
![Page 9: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/9.jpg)
Software & Services Group
Shadow GPU Page Table - PPGTT
9
Features
• 2/3/4 level page
table
• True per-process
PPGTT
• Page table cache
• Reference
counting
• Out-of-Sync
shadow
![Page 10: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/10.jpg)
Software & Services Group
Scheduling
10
vGPU 3vGPU 2vGPU 1 …
Scheduling Policy Framework
Workload Scheduler
Host i915 Submission Interface
Virtual HW Submission InterfacevExeclist
vGuC
vGPUworkload Q
GVT-g Scheduling
i915 scheduling
![Page 11: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/11.jpg)
Software & Services Group
Scheduling
11
Host i915 Scheduling
I915 request
I915 request
vGPU context switch
…
Scheduling events
vGPUcontext
vGPUcontext
vGPU workload dispatcher
GVT-g workload scheduling
vGPUWorkload
vGPUWorkload
Dispatch i915 request
![Page 12: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/12.jpg)
Software & Services Group
Scheduling
12
Host i915 Submission System
Scheduling Policy Framework
MMIO Emulation
Virtual HW submission – vExeclist / vGuC
Workload Q
Workload scheduler
- Pick workload from Q- Notify virtual HW submission layer
- Shadow context & ring buffer- Submit shadow context & ring buffer to i915
- Wait workload finished- Complete workload
intel_vgpu_workloadSchedule
![Page 13: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/13.jpg)
Software & Services Group
i915
Display
13
13
GVT-g gets the guest frame buffer via virtual display
VFIO exposes guest frame buffer via dma-buf.
User application attaches dma-bufinto i915 GEM and gets i915 GEM handles
User application shows guest screen context via i915
Compositor
VM1VM2
plane pipe port
Display EngineGEM OBJ
GEM OBJ
texture
texturewindow
Host
Render Engine
DMA BUF
DMA BUF
GVT-gVirtual Display
GVT-gVFIO
![Page 14: An Introduction to Intel GVT-g (with new architecture) Introduction to Intel GVT-g (with new architecture) Zhi Wang zhi.a.wang@intel.com WW24’17 1 Software & Services Group GPU Virtualization](https://reader035.vdocuments.us/reader035/viewer/2022081323/5aeebba67f8b9a8b4c8b5cca/html5/thumbnails/14.jpg)
Software & Services Group
Thanks
14