[Intel-gfx] [PATCH 6/9] drm/i915: driver based PASID handling

Jesse Barnes jbarnes at virtuousgeek.org
Wed Oct 7 08:16:42 PDT 2015


On 10/07/2015 06:00 AM, David Woodhouse wrote:
> On Fri, 2015-09-04 at 09:59 -0700, Jesse Barnes wrote:
>> +
>> +       ret = handle_mm_fault(mm, vma, address,
>> +                             desc.wr_req ? FAULT_FLAG_WRITE : 0);
>> +       if (ret & VM_FAULT_ERROR) {
>> +               gpu_mm_segv(tsk, address, SEGV_ACCERR); /* ? */
>> +               goto out_unlock;
>> +       }
>> +
> 
> Hm, do you need to force the SEGV there, in what ought to be generic
> IOMMU code?
> 
> Can you instead just let the fault handler return an appropriate
> failure code to the IOMMU request queue and then deal with the
> resulting error on the i915 device side?

I'm not sure if we get enough info on the i915 side to handle it
reasonably, we'll have to test that out.

> That way, you should hopefully get to gracefully cope with reporting
> errors for a specific *context*, rather than killing the whole process.

It would be best to get per-context error info, but killing the process
may be unavoidable (just as if a single thread clobbers memory in your
process).

Jesse


More information about the Intel-gfx mailing list