[PATCH] drm/i915/gvt: clear ggtt entries when destroy vgpu
Gong, Zhipeng
zhipeng.gong at intel.com
Mon Sep 17 07:19:13 UTC 2018
> -----Original Message-----
> From: Zhenyu Wang [mailto:zhenyuw at linux.intel.com]
> Sent: Monday, September 17, 2018 2:37 PM
> To: Gong, Zhipeng <zhipeng.gong at intel.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Subject: Re: [PATCH] drm/i915/gvt: clear ggtt entries when destroy vgpu
>
> On 2018.09.17 13:18:53 +0800, Zhipeng Gong wrote:
> > When one vgpu is destroyed, its ggtt entries are not cleared.
> > This patch clears ggtt entries to avoid information leak.
> >
> > Signed-off-by: Zhipeng Gong <zhipeng.gong at intel.com>
> > ---
> > drivers/gpu/drm/i915/gvt/vgpu.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c
> b/drivers/gpu/drm/i915/gvt/vgpu.c
> > index a4e8e3cf74fd..c628be05fbfe 100644
> > --- a/drivers/gpu/drm/i915/gvt/vgpu.c
> > +++ b/drivers/gpu/drm/i915/gvt/vgpu.c
> > @@ -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);
>
> Or move to clean_gtt? Looks current call of clean_gtt may not
> need it but still prefer to be handled in clean_gtt as well.
>
clean_gtt is called in two places, one is in destroy_vgpu, the other is
in create_vgpu failure handling, which does not need reset_ggtt.
If move reset_ggtt in clean_gtt, one param is needed for clean_gtt, is it ok?
> Could you add Fixes tag too?
Will add it.
> > intel_gvt_hypervisor_detach_vgpu(vgpu);
> > intel_vgpu_free_resource(vgpu);
> > --
> > 2.18.0
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
>
> --
> Open Source Technology Center, Intel ltd.
>
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the intel-gvt-dev
mailing list