Re: [PATCH 01/10] drm/i915: Release mmaps on partial ggtt vma unbind

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

 



On Mon, Dec 14, 2015 at 06:23:40PM +0200, ville.syrjala@xxxxxxxxxxxxxxx wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> When a partial ggtt vma gets evicted, we need to zap any CPU
> mapping to said vma as well. Currently we zap the mappings
> only when the normal gtt vma gets evicted, but for partial
> vmas we leave behind stale CPU mappins. And so, if something
> else gets bound into the same gtt address range, any
> userspace access into the relevant virtual addresses will
> go astray.
> 
> I didn't find anything really suitable in the mm code to zap
> just the needed mappings (we'd need to know the right CPU
> side mm and vma etc.), so let's just call i915_gem_release_mmap()
> for now.
> 
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Testcase: igt/gem_mmap_gtt
> Fixes: c5ad54c ("drm/i915: Use partial view in mmap fault handler")
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

I fixed this by tracking vma->map_and_fenceable instead. We still kill
the entire object though. Note this is not enough to completely fix the
test case, so perhaps we wait until we can merge the series to do the
full fix?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://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