[Intel-gfx] [RFC PATCH 2/3] drm/i915: IOMMU based SVM implementation v16

Mika Kuoppala mika.kuoppala at linux.intel.com
Thu Jan 12 15:48:49 UTC 2017


Chris Wilson <chris at chris-wilson.co.uk> writes:

> On Mon, Jan 09, 2017 at 06:52:53PM +0200, Mika Kuoppala wrote:
>> +static int i915_gem_context_enable_svm(struct i915_gem_context *ctx)
>> +{
>> +	int ret;
>> +
>> +	if (!HAS_SVM(ctx->i915))
>> +		return -ENODEV;
>
> How does legacy execbuf work with an svm context? It will write the
> ppgtt, but those are no longer read by the GPU. So it will generate
> faults at random addresses. Am I right in thinking we need to EINVAL if
> using execbuf + context_is_svm?

Yes without further experiments, it is best to block the legacy path
with -EINVAL. I will add this.

I guess with some tweaking the legacy interface could be made to work,
but it would need is_svm_context() checks in rather many places
in the execbuffer path to avoid relocations/pins.

-Mika

> -Chris
>
> -- 
> Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list