OSDN Git Service

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)
commitcc753fbe1ac47560e1517e3e11fb0c8a3c95eef5
tree16a417dffdcd22fbe146285fda3a152b88957ac6
parent03fa9350c30b5db827e9b155715df09660ba28b1
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