From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] drm/i915: Prevent context obj from being corrupted Date: Wed, 26 Mar 2014 08:06:00 -0700 Message-ID: <20140326150600.GA4519@bwidawsk.net> References: <1395799310-21412-1-git-send-email-benjamin.widawsky@linux.intel.com> <20140326062416.GP26878@phenom.ffwll.local> <20140326070438.GQ26878@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 144AD6E1F6 for ; Wed, 26 Mar 2014 08:06:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140326070438.GQ26878@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: Ben Widawsky , Intel GFX List-Id: intel-gfx@lists.freedesktop.org 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 > > > > 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@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ben Widawsky, Intel Open Source Technology Center