[Intel-gfx] [PATCH] drm/i915: Don't deballoon unused ggtt drm_mm_node in linux guest
Zhang, Xiong Y
xiong.y.zhang at intel.com
Thu Mar 29 08:55:45 UTC 2018
> Quoting Xiong Zhang (2018-03-29 11: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
>
> may be skipped and not initialised due to space constraints,
[Zhang, Xiong Y] OK, I will apply it. thanks
>
> > drm_mm_node couldn't be removed through drm_mm_remove_node().
> >
> > Fixes: ff8f797557c7("drm/i915: return the correct usable aperture size
> > under gvt environment")
> > Signed-off-by: Xiong Zhang <xiong.y.zhang at intel.com>
>
> Had to read through and work out what the problem was; whether it was a
> bug elsewhere in vgpu or deliberate, so amending the commit msg to be
> clear would be helpful.
[Zhang, Xiong Y] bl_info.space[i] is initialized only on specific condition in intel_vgt_balloon(). When guest i915 driver is unloaded, intel_vgt_deballon() go through all four bl_info.space[3:0] and call drm_mm_remove_node() for each. If one isn't initialized, warning and reference null pointer occur in drm_mm_remove_node().
I will update commit message. Thanks.
>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> Who actually consumes bl_info? It just looks like being a balloon being set
> adrift.
[Zhang, Xiong Y] bl_info is internal static variable, only intel_vgt_deballoon() consume it at driver unload, it deballoon reserved ggtt space.
> -Chris
More information about the Intel-gfx
mailing list