Add enlightenments for vGPU
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest8 patches 5 repliesIn review
- v38 patches 49 repliesSuperseded
- v2 posting 2/28 patches 5 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 1/2 | 8 patches | 4 replies | Superseded |
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | drm/i915: Introduce a PV INFO page structure for Intel GVT-g.Documentation/ drivers/ drivers/ +3 more | +192 | 1 reply | |
| 2/8 | drm/i915: Adds graphic address space ballooning logicdrivers/ drivers/ drivers/ | +194 | 0 replies | |
| 3/8 | drm/i915: Partition the fence registers for vGPU in i915 driverdrivers/ | +5 | 0 replies | |
| 4/8 | drm/i915: Disable framebuffer compression for i915 driver in VMdrivers/ | +4 | 0 replies | |
| 5/8 | drm/i915: Add the display switch logic for vGPU in i915 driverdrivers/ drivers/ | +12 | 0 replies | |
| 6/8 | drm/i915: Disable power management for i915 driver in VMdrivers/ | +4 | 0 replies | |
| 7/8 | drm/i915: Create vGPU specific MMIO operations to reduce trapsdrivers/ | +31 | 0 replies | |
| 8/8 | drm/i915: Support alias ppgtt in VM if ppgtt is enableddrivers/ | +16 | 0 replies |
Reviews trailers per patch
3 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Tvrtko Ursulin |
|---|---|
| Series | R-b |
| 1/8 | |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | |
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/8] Add enlightenments for vGPU
This patch set includes necessary code changes when i915 driver runs inside a VM. Though ideally we can run an unmodified i915 driver in VM, adding such enlightenments can greatly reduce the virtualization complexity in orders of magnitude. Code changes for the host side, which includes the actual Intel GVT-g implementation, will be sent out in other patches.
The primary change introduced here is to implement so-called "address space ballooning" technique. XenGT partitions global graphics memory among multiple VMs, so each VM can directly access a portion of the memory without hypervisor's intervention, e.g. filling textures or queuing commands. However with the partitioning an unmodified i915 driver would assume a smaller graphics memory starting from address ZERO, so requires XenGT core module (vgt) to translate the graphics address between 'guest view' and 'host view', for all registers and command opcodes which contain a graphics memory address. To reduce the complexity, XenGT introduces "address space ballooning", by telling the exact partitioning knowledge to each guest i915 driver, which then reserves and prevents non-allocated portions from allocation. Then vgt module only needs to scan and validate graphics addresses without complexity of translation.
Note: The partitioning of global graphics memory may break some applications, with large objects in the aperture, because current userspace assumes half of the aperture usable. That would need separate fix either in user space (e.g. remove assumption in mesa) or in kernel (with some faulting mechanism).
The partitioning knowledge is conveyed through a reserved MMIO range, called PVINFO, which will be architecturally reserved in future hardware generations. Another information carried through PVINFO is about the number of fence registers. As a global resource, XenGT also partitions them among VMs.
Other changes are trivial as optimizations, to either reduce the trap overhead or disable power management features which don't make sense in a virtualized environment.
Yu Zhang (8):
drm/i915: Introduce a PV INFO page structure for Intel GVT-g. drm/i915: Adds graphic address space ballooning logic drm/i915: Partition the fence registers for vGPU in i915 driver drm/i915: Disable framebuffer compression for i915 driver in VM drm/i915: Add the display switch logic for vGPU in i915 driver drm/i915: Disable power management for i915 driver in VM drm/i915: Create vGPU specific MMIO operations to reduce traps drm/i915: Support alias ppgtt in VM if ppgtt is enabled
Documentation/DocBook/drm.tmpl | 5 + drivers/gpu/drm/i915/Makefile | 3 + drivers/gpu/drm/i915/i915_dma.c | 8 ++ drivers/gpu/drm/i915/i915_drv.h | 10 ++ drivers/gpu/drm/i915/i915_gem.c | 5 + drivers/gpu/drm/i915/i915_gem_gtt.c | 33 ++++- drivers/gpu/drm/i915/i915_vgpu.c | 264 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/i915_vgpu.h | 91 +++++++++++++ drivers/gpu/drm/i915/intel_fbc.c | 4 + drivers/gpu/drm/i915/intel_pm.c | 4 + drivers/gpu/drm/i915/intel_uncore.c | 34 +++++ 11 files changed, 458 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_vgpu.c create mode 100644 drivers/gpu/drm/i915/i915_vgpu.h
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx