Skip to content

Commit a90c367

Browse files
sean-jcbonzini
authored andcommitted
drm/i915/gvt: Drop unused helper intel_vgpu_reset_gtt()
Drop intel_vgpu_reset_gtt() as it no longer has any callers. In addition to eliminating dead code, this eliminates the last possible scenario where __kvmgt_protect_table_find() can be reached without holding vgpu_lock. Requiring vgpu_lock to be held when calling __kvmgt_protect_table_find() will allow a protecting the gfn hash with vgpu_lock without too much fuss. No functional change intended. Fixes: ba25d97 ("drm/i915/gvt: Do not destroy ppgtt_mm during vGPU D3->D0.") Reviewed-by: Yan Zhao <yan.y.zhao@intel.com> Tested-by: Yongwei Ma <yongwei.ma@intel.com> Reviewed-by: Zhi Wang <zhi.a.wang@intel.com> Link: https://lore.kernel.org/r/20230729013535.1070024-11-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 1673529 commit a90c367

2 files changed

Lines changed: 0 additions & 19 deletions

File tree

drivers/gpu/drm/i915/gvt/gtt.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,24 +2817,6 @@ void intel_vgpu_reset_ggtt(struct intel_vgpu *vgpu, bool invalidate_old)
28172817
ggtt_invalidate(gvt->gt);
28182818
}
28192819

2820-
/**
2821-
* intel_vgpu_reset_gtt - reset the all GTT related status
2822-
* @vgpu: a vGPU
2823-
*
2824-
* This function is called from vfio core to reset reset all
2825-
* GTT related status, including GGTT, PPGTT, scratch page.
2826-
*
2827-
*/
2828-
void intel_vgpu_reset_gtt(struct intel_vgpu *vgpu)
2829-
{
2830-
/* Shadow pages are only created when there is no page
2831-
* table tracking data, so remove page tracking data after
2832-
* removing the shadow pages.
2833-
*/
2834-
intel_vgpu_destroy_all_ppgtt_mm(vgpu);
2835-
intel_vgpu_reset_ggtt(vgpu, true);
2836-
}
2837-
28382820
/**
28392821
* intel_gvt_restore_ggtt - restore all vGPU's ggtt entries
28402822
* @gvt: intel gvt device

drivers/gpu/drm/i915/gvt/gtt.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ void intel_vgpu_reset_ggtt(struct intel_vgpu *vgpu, bool invalidate_old);
224224
void intel_vgpu_invalidate_ppgtt(struct intel_vgpu *vgpu);
225225

226226
int intel_gvt_init_gtt(struct intel_gvt *gvt);
227-
void intel_vgpu_reset_gtt(struct intel_vgpu *vgpu);
228227
void intel_gvt_clean_gtt(struct intel_gvt *gvt);
229228

230229
struct intel_vgpu_mm *intel_gvt_find_ppgtt_mm(struct intel_vgpu *vgpu,

0 commit comments

Comments
 (0)