[PATCH] drm/i915/gvt: clear ggtt entries when destroy vgpu

Zhenyu Wang zhenyuw at linux.intel.com
Mon Sep 17 06:36:36 UTC 2018


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.

Could you add Fixes tag too?

>  	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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20180917/3619ffa3/attachment.sig>


More information about the intel-gvt-dev mailing list