Skip to content

Commit

Permalink
drm/i915/gvt: Fix a bug of unexpectedly clear scratch page table
Browse files Browse the repository at this point in the history
During a vGPU reset, the scratch page table shouldn't be cleared, what
needs to be cleared should be the scratch page.

Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
  • Loading branch information
Zhi Wang authored and Zhenyu Wang committed Nov 16, 2017
1 parent 22115ce commit 7422064
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/gpu/drm/i915/gvt/gtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2395,8 +2395,6 @@ void intel_vgpu_reset_ggtt(struct intel_vgpu *vgpu)
*/
void intel_vgpu_reset_gtt(struct intel_vgpu *vgpu)
{
int i;

ppgtt_free_all_shadow_page(vgpu);

/* Shadow pages are only created when there is no page
Expand All @@ -2406,11 +2404,4 @@ void intel_vgpu_reset_gtt(struct intel_vgpu *vgpu)
intel_vgpu_free_mm(vgpu, INTEL_GVT_MM_PPGTT);

intel_vgpu_reset_ggtt(vgpu);

/* clear scratch page for security */
for (i = GTT_TYPE_PPGTT_PTE_PT; i < GTT_TYPE_MAX; i++) {
if (vgpu->gtt.scratch_pt[i].page != NULL)
memset(page_address(vgpu->gtt.scratch_pt[i].page),
0, PAGE_SIZE);
}
}

0 comments on commit 7422064

Please sign in to comment.