[PATCH] drm/i915/gvt: Don't free opregion pages at vgpu destroy

Zhenyu Wang zhenyu.z.wang at intel.com
Tue Nov 7 03:53:16 UTC 2017


On 2017.11.07 03:25:06 +0800, Xiong Zhang wrote:
> As all gpu's opregion share  a common gvt physical memory, this
> memory couldn't be freed at vgpu destroy. It should be only
> destroyed at gvt destroy.
>

I think we should keep each vgpu's opregion seperately, although
we only provide vbt support in opregion now, but different VM's
opregion might still have different state.

> Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
> ---
>  drivers/gpu/drm/i915/gvt/opregion.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
> index c2d911e..1e8c16a 100644
> --- a/drivers/gpu/drm/i915/gvt/opregion.c
> +++ b/drivers/gpu/drm/i915/gvt/opregion.c
> @@ -273,8 +273,6 @@ void intel_vgpu_clean_opregion(struct intel_vgpu *vgpu)
>  
>  	if (intel_gvt_host.hypervisor_type == INTEL_GVT_HYPERVISOR_XEN) {
>  		map_vgpu_opregion(vgpu, false);
> -		free_pages((unsigned long)vgpu_opregion(vgpu)->va,
> -				get_order(INTEL_GVT_OPREGION_SIZE));
>  
>  		vgpu_opregion(vgpu)->va = NULL;
>  	}
> -- 
> 2.7.4
> 
> _______________________________________________
> 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/20171107/4115359b/attachment.sig>


More information about the intel-gvt-dev mailing list