]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: validate gfn before set shadow page entry
authorHang Yuan <hang.yuan@intel.com>
Fri, 22 Dec 2017 10:06:31 +0000 (18:06 +0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 1 Feb 2018 15:30:45 +0000 (07:30 -0800)
commit29698eb1dcb5675c0c8ca5b14cffb009a5f2cf54
tree16a417dffdcd22fbe146285fda3a152b88957ac6
parentb1765a220d58f271ccd88c9df2240cdad1538e33
drm/i915/gvt: validate gfn before set shadow page entry

GVT may receive partial write on one guest PTE update. Validate gfn
not to translate incomplete gfn. This avoids some unnecessary error
messages incurred by the incomplete gfn translating. Also fix the
bug that the whole PPGTT shadow page update is aborted on any invalid
gfn entry.

gfn validation relys on hypervisor's help. Add one MPT module function
to provide the function.

Signed-off-by: Hang Yuan <hang.yuan@intel.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gvt/gtt.c
drivers/gpu/drm/i915/gvt/hypercall.h
drivers/gpu/drm/i915/gvt/kvmgt.c
drivers/gpu/drm/i915/gvt/mpt.h