]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: refine ggtt range validation
authorXiong Zhang <xiong.y.zhang@intel.com>
Mon, 27 May 2019 05:45:50 +0000 (13:45 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 30 May 2019 03:31:43 +0000 (11:31 +0800)
commit68a6eedf9ff25db8931fde26b89143725d2994dd
tree393b1520dfb99cd38870ba5440682355034496c7
parent6483f4354e101a5811d7a30362c4f4d10c9d2dc9
drm/i915/gvt: refine ggtt range validation

The vgpu ggtt range should be in vgpu aperture or hidden range. This
patch enforce begin and end address check and guarantee both of them are
in the valid range.

For size=0, it will regress to vgpu_gmadr_is_valid(), will refine
this usage in a later fix.

Fixes: 417e47df0f06 ("drm/i915/gvt: vGPU graphics memory virtualization")
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gtt.c