i915 regression in kernel 4.10

Chris Wilson chris at chris-wilson.co.uk
Mon Dec 19 12:29:34 UTC 2016

On Mon, Dec 19, 2016 at 12:39:16PM +0100, Juergen Gross wrote:
> With recent 4.10 kernel the graphics isn't coming up under Xen. First
> failure message is:
> [   46.656649] i915 0000:00:02.0: swiotlb buffer is full (sz: 1630208 bytes)

Do we get a silent failure? i915_gem_gtt_prepare_pages() is where we
call dma_map_sg() and pass the sg to swiotlb (in this case) for
remapping, and we do check for an error value of 0. After that error,
SWIOTLB_MAP_ERROR is propagated back and converted to 0 for
dma_map_sg(). That looks valid, and we should report ENOMEM back to the

> Later I see splats like:
> [   49.393583] general protection fault: 0000 [#1] SMP

What was the faulting address? RAX is particularly non-pointer-like so I
wonder if we walked onto an uninitialised portion of the sgtable. We may
have tripped over a bug in our sg_page iterator.

The attached patch should prevent an early ENOMEM following the swiotlb
allocation failure. But I suspect that we will still be tripping up the
failure in the sg walker when binding to the GPU.

Chris Wilson, Intel Open Source Technology Centre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-i915-Fallback-to-single-PAGE_SIZE-segments-for-D.patch
Type: text/x-diff
Size: 2486 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161219/68ef548d/attachment.patch>

More information about the dri-devel mailing list