]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: fix crash in vgpu_reset_execlist
authorDu, Changbin <changbin.du@intel.com>
Fri, 11 Nov 2016 08:33:06 +0000 (16:33 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 14 Nov 2016 10:06:43 +0000 (18:06 +0800)
commitfafabe1df5fad176d54ae67917796b6d82f66984
tree405d86dd8f7a560192e1d43694fb663dec6c50e5
parent2bc9e45ee1247fa782017258453f2751f80e7217
drm/i915/gvt: fix crash in vgpu_reset_execlist

We initiate vgpu->workload_q_head via for_each_engine
macro which may skip unavailable engines. So we should
follow this rule anywhere. The function
intel_vgpu_reset_execlist is not aware of this. Kernel
crash when touch a uninitiated vgpu->workload_q_head[x].
Let's fix it by using for_each_engine_masked and skip
unavailable engine ID. Meanwhile rename ring_bitmap to
general name engine_mask.

v2: remove unnecessary engine activation check (zhenyu)

Signed-off-by: Du, Changbin <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/execlist.c
drivers/gpu/drm/i915/gvt/execlist.h