]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gvt: clear ggtt entries when destroy vgpu
authorZhipeng Gong <zhipeng.gong@intel.com>
Mon, 17 Sep 2018 07:45:08 +0000 (15:45 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 18 Sep 2018 02:39:44 +0000 (10:39 +0800)
When one vgpu is destroyed, its ggtt entries are not cleared.
This patch clears ggtt entries to avoid information leak.

v2: add 'Fixes' tag (Zhenyu)

Fixes: 417e47df0f06 ("drm/i915/gvt: vGPU graphics memory virtualization")
Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Reviewed-by: Hang Yuan <hang.yuan@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/vgpu.c

index a4e8e3cf74fd58b400331bc608516e9414e458d3..c628be05fbfe907a1bce89fd4727df79906fe63f 100644 (file)
@@ -281,6 +281,7 @@ void intel_gvt_destroy_vgpu(struct intel_vgpu *vgpu)
        intel_vgpu_clean_submission(vgpu);
        intel_vgpu_clean_display(vgpu);
        intel_vgpu_clean_opregion(vgpu);
+       intel_vgpu_reset_ggtt(vgpu, true);
        intel_vgpu_clean_gtt(vgpu);
        intel_gvt_hypervisor_detach_vgpu(vgpu);
        intel_vgpu_free_resource(vgpu);