]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt/kvmgt: read/write GPA via KVM API
authorJike Song <jike.song@intel.com>
Thu, 8 Dec 2016 03:00:35 +0000 (11:00 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 16 Dec 2016 08:55:26 +0000 (16:55 +0800)
commit04c7bddb0f9f5f4a6c94418f79ab0ed9d278bec1
tree9511b191afb97fab97f0fd0747b9c7cc214568ae
parent00a8760aea302878e41c5a918a63b05d519d6f73
drm/i915/gvt/kvmgt: read/write GPA via KVM API

Previously to read/write a GPA, we at first try to pin the GFN it belongs
to, then translate the pinned PFN to a kernel HVA, then read/write it.
This is however not necessary. A GFN should be pinned IFF it would be
accessed by peripheral devices (DMA), not by CPU. This patch changes
the read/write method to KVM API, which will leverage userspace HVA
and copy_{from|to}_usr instead.

Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/kvmgt.c