OSDN Git Service

drm/i915/gvt: add KVMGT support
authorJike Song <jike.song@intel.com>
Wed, 9 Nov 2016 12:30:59 +0000 (20:30 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 10 Nov 2016 07:45:39 +0000 (15:45 +0800)
commitf30437c5e7bfa9d8acc18058040efb4f474907c3
treedf834136de4e5d4565e732f122a68e3cfb495d89
parent9ec1e66b8084f24d41046bd9711fbd7ec6e3850f
drm/i915/gvt: add KVMGT support

KVMGT is the MPT implementation based on VFIO/KVM. It provides
a kvmgt_mpt ops to gvt for vGPU access mediation, e.g. to
mediate and emulate the MMIO accesses, to inject interrupts
to vGPU user, to intercept the GTT writing and replace it with
DMA-able address, to write-protect guest PPGTT table for
shadowing synchronization, etc. This patch provides the MPT
implementation for GVT, not yet functional due to theabsence
of mdev.

It's built as kvmgt.ko, depends on vfio.ko, kvm.ko and mdev.ko,
and being required by i915.ko. To not introduce hard dependency
in i915.ko, we used indirect symbol reference. But that means
users have to include kvmgt.ko into init ramdisk if their
i915.ko is included.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Xiaoguang Chen <xiaoguang.chen@intel.com>
Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/Kconfig
drivers/gpu/drm/i915/gvt/Makefile
drivers/gpu/drm/i915/gvt/gvt.c
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c [new file with mode: 0644]