Re: [PATCH] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> + Zhi and Zhenyu
> 
> Quoting Xiong Zhang (2018-03-29 13:58:41)
> > Four drm_mm_node are used to reserve guest ggtt space, but some of
> > them may aren't initialized and used in intel_vgt_balloon(), so these
> > unused drm_mm_node couldn't be removed through
> drm_mm_remove_node().
> 
> I'm not sure how this slipped by in previous review, but is there an
> explanation why we have;
> 
> static struct _balloon_info_ bl_info;
> 
> ... and are not even initializing it?
> 
> This should definitely find it's way into dev_priv and be properly initialized.
[Zhang, Xiong Y] how about move bl_info into struct i915_virtual_gpu ? so that we could get it through dev_priv->vgpu.bl_info

thanks
> 
> Regards, Joonas
> 
> >
> > Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size
> > under gvt environment")
> > Signed-off-by: Xiong Zhang <xiong.y.zhang@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/i915_vgpu.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_vgpu.c
> > b/drivers/gpu/drm/i915/i915_vgpu.c
> > index 5fe9f3f..7545686 100644
> > --- a/drivers/gpu/drm/i915/i915_vgpu.c
> > +++ b/drivers/gpu/drm/i915/i915_vgpu.c
> > @@ -100,6 +100,9 @@ static struct _balloon_info_ bl_info;  static void
> > vgt_deballoon_space(struct i915_ggtt *ggtt,
> >                                 struct drm_mm_node *node)  {
> > +       if (!node->allocated)
> > +               return;
> > +
> >         DRM_DEBUG_DRIVER("deballoon space: range [0x%llx -
> 0x%llx] %llu KiB.\n",
> >                          node->start,
> >                          node->start + node->size,
> > --
> > 2.7.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux