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

Zhang, Xiong Y xiong.y.zhang at intel.com
Tue Nov 7 06:00:51 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.
[Zhang, Xiong Y] Yes, I agree with you. Actually, when guest write opregion base address register, guest has allocated guest memory for it. We should use it to store opregion. 

thanks 
> 
> > 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


More information about the intel-gvt-dev mailing list