[Intel-gfx] [PATCH] drm/i915: Prevent context obj from being corrupted
Ben Widawsky
ben at bwidawsk.net
Wed Mar 26 16:06:00 CET 2014
On Wed, Mar 26, 2014 at 08:04:38AM +0100, Daniel Vetter wrote:
> On Wed, Mar 26, 2014 at 07:24:16AM +0100, Daniel Vetter wrote:
> > On Tue, Mar 25, 2014 at 07:01:50PM -0700, Ben Widawsky wrote:
> > > While the context is not being used, we can make the PTEs invalid, so
> > > nothing can accidentally corrupt it. Systems tend to have a lot of
> > > trouble when the context gets corrupted.
> > >
> > > NOTE: This is a slightly different patch than what I posted to Bugzilla.
> > >
> > > References: https://bugs.freedesktop.org/show_bug.cgi?id=75724
> > > Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> >
> > We could stop the aliasing ppgtt binder from always binding into the
> > ppgtt. Which is the bug I'm signed up to fix, and which probably curbs 99%
> > of all potential corruption. The last 1% is the kernel getting his
> > kmapping wrong ...
>
> Actually your patch doesn't accomplish much, since MI_UPDATE_GTT only
> updates the global gtt, not the aliasing ppgtt. Which means that userspace
> batches can still happily stomp all over your precious context objects.
> See comment #5 in that bug report:
>
> https://bugs.freedesktop.org/show_bug.cgi?id=75724#c5
>
> Cheers, Daniel
Quoting you from comment #5:
"ctx objects should only be bound in the global gtt with aliasing
ppgtt."
The bug was not present with full PPGTT.
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ben Widawsky, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list