diff options
author | Hang Yuan <hang.yuan@intel.com> | 2017-12-22 18:06:31 +0800 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2018-02-01 07:30:45 -0800 |
commit | cc753fbe1ac47560e1517e3e11fb0c8a3c95eef5 (patch) | |
tree | 16a417dffdcd22fbe146285fda3a152b88957ac6 /drivers/gpu/drm/i915/gvt/hypercall.h | |
parent | 03fa9350c30b5db827e9b155715df09660ba28b1 (diff) | |
download | linux-cc753fbe1ac47560e1517e3e11fb0c8a3c95eef5.tar.gz linux-cc753fbe1ac47560e1517e3e11fb0c8a3c95eef5.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/hypercall.h')
-rw-r--r-- | drivers/gpu/drm/i915/gvt/hypercall.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/hypercall.h b/drivers/gpu/drm/i915/gvt/hypercall.h index a1bd82feb827..f8e77e166246 100644 --- a/drivers/gpu/drm/i915/gvt/hypercall.h +++ b/drivers/gpu/drm/i915/gvt/hypercall.h @@ -58,6 +58,7 @@ struct intel_gvt_mpt { int (*set_opregion)(void *vgpu); int (*get_vfio_device)(void *vgpu); void (*put_vfio_device)(void *vgpu); + bool (*is_valid_gfn)(unsigned long handle, unsigned long gfn); }; extern struct intel_gvt_mpt xengt_mpt; |