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 -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx