RFC Add host i915 support for vGPU
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 patches 14 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | drm/i915: introduce a new modparam: enable_vgtdrivers/ drivers/ | +5 | 0 replies | |
| 2/8 | drm/i915: introduce the skeleton of vgtdrivers/ drivers/ drivers/ +3 more | +73 | 0 replies | |
| 3/8 | drm/i915: add the vgt implementation of MMIO/GTT mediationsdrivers/ drivers/ | +126 | 2 replies | |
| 4/8 | drm/i915: redirect MMIO accesses to vgt if enableddrivers/ drivers/ | +138 | 0 replies | |
| 5/8 | drm/i915: GTT access abstractiondrivers/ drivers/ | +40 | 0 replies | |
| 6/8 | drm/i915: redirect GTT accesses to vgt if enableddrivers/ | +34 | 0 replies | |
| 7/8 | drm/i915: vgt irq mediation - via a tasklet based mechanismdrivers/ drivers/ drivers/ +1 more | +83 | 4 replies | |
| 8/8 | drm/i915: enable vgt if specified by module paramdrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/8] Add host i915 support for vGPU
Intel GVT-g (previously known as XenGT), is a complete GPU virtualization solution with mediated pass-through for 4th generation Intel Core processors - Haswell platform. This technology presents a virtual full-fledged GPU to each Virtual Machine (VM). VMs can directly access performance-critical resources, without intervention from the hypervisor in most cases, while privileged operations from VMs are trap-and-emulated at minimal cost. For details, please refer to:
https://01.org/xen/blogs/wangbo85/2014/intel-gvt-gxengt-pubic-release
The patches of adding vGPU guest support for i915, is already posted at:
http://lists.freedesktop.org/archives/intel-gfx/2014-September/052571.html
This patch set is about to add vGPU host support.
When running as vGPU host, the i915 driver can't simply occupy the whole GPU resources, it needs to proactively meidate the accesses to most hardware resources: MMIO, GTT, and interrupt. Only by handling the hardware resources, the vgt can have centralized management about sharing between VMs(including host and guest).
This patch set adds:
- an i915 extension, named vgt. vgt is the major part of Intel GVT-g implementation, it manages and shares GPU among VMs and host;
- interfaces between i915 and vgt, including:
Mediated MMIO access
Mediated GTT access
Mediated IRQ handling
NOTE of RFC:
- the vgt in-kernel GPU device-model is not yet integrated, though the interfaces between i915 and vgt are provided;
- the host i915 driver has some logic same with the guest i915, e.g. the ballooning. When the guest patches(see above) are finalized, we need to rebase upon them;
- vgt_suspend/vgt_resume are still under cleanup;
- GPU reset is still under cleanup
We send out the framework changes in this patch set for review
at first, and meanwhile, vgt integration and cleanup are ongoing.
Jike Song (8):
drm/i915: introduce a new modparam: enable_vgt drm/i915: introduce the skeleton of vgt
drm/i915: add the vgt implementation of MMIO/GTT mediations drm/i915: redirect MMIO accesses to vgt if enabled drm/i915: GTT access abstraction
drm/i915: redirect GTT accesses to vgt if enabled drm/i915: vgt irq mediation - via a tasklet based mechanism drm/i915: enable vgt if specified by module param
drivers/gpu/drm/i915/Kconfig | 18 ++++ drivers/gpu/drm/i915/Makefile | 4 + drivers/gpu/drm/i915/i915_drv.c | 10 ++ drivers/gpu/drm/i915/i915_drv.h | 204 +++++++++++++++++++++++++++++++++--- drivers/gpu/drm/i915/i915_gem_gtt.c | 33 +++--- drivers/gpu/drm/i915/i915_irq.c | 35 +++++++ drivers/gpu/drm/i915/i915_params.c | 4 + drivers/gpu/drm/i915/i915_vgt.h | 58 ++++++++++ drivers/gpu/drm/i915/intel_uncore.c | 3 + drivers/gpu/drm/i915/vgt/vgt.c | 145 +++++++++++++++++++++++++ drivers/gpu/drm/i915/vgt/vgt.h | 6 ++ 11 files changed, 492 insertions(+), 28 deletions(-) create mode 100644 drivers/gpu/drm/i915/i915_vgt.h create mode 100644 drivers/gpu/drm/i915/vgt/vgt.c create mode 100644 drivers/gpu/drm/i915/vgt/vgt.h
Signature · 1 line
1.9.1