<div dir="auto"><div><br><div class="gmail_extra"><div class="gmail_quote">On Jan 12, 2017 8:04 AM, "Chris Wilson" <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="elided-text">On Thu, Jan 12, 2017 at 05:48:49PM +0200, Mika Kuoppala wrote:<br>
> Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>> writes:<br>
><br>
> > On Mon, Jan 09, 2017 at 06:52:53PM +0200, Mika Kuoppala wrote:<br>
> >> +static int i915_gem_context_enable_svm(<wbr>struct i915_gem_context *ctx)<br>
> >> +{<br>
> >> + int ret;<br>
> >> +<br>
> >> + if (!HAS_SVM(ctx->i915))<br>
> >> + return -ENODEV;<br>
> ><br>
> > How does legacy execbuf work with an svm context? It will write the<br>
> > ppgtt, but those are no longer read by the GPU. So it will generate<br>
> > faults at random addresses. Am I right in thinking we need to EINVAL if<br>
> > using execbuf + context_is_svm?<br>
><br>
> Yes without further experiments, it is best to block the legacy path<br>
> with -EINVAL. I will add this.<br>
><br>
> I guess with some tweaking the legacy interface could be made to work,<br>
> but it would need is_svm_context() checks in rather many places<br>
> in the execbuffer path to avoid relocations/pins.<br>
<br>
</div>Hmm. right. Basically we have to ignore all objects if svm. Basically we<br>
strip off everything (having to EINVAL if passed in relocs etc) and more<br>
or less call exec_svm. The advantage is that it keeps the request tracking<br>
of the objects correct, but it can only work with softpinning of the<br>
objects at their cpu addresses. (I don't propose we map the object in<br>
the cpu table at the ppgtt offset!)<br>
<br>
Anyway the decision has to be made upfront whether we want to support<br>
the frankenapi.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">FWIW I think the Beignet team wanted this functionality to make their implementation easier. It's a bit more invasive but might be worth it for userspace to make their transition easier. </div><div dir="auto"><br></div><div dir="auto">Jesse</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="elided-text">-Chris<br>
<br>
--<br>
Chris Wilson, Intel Open Source Technology Centre<br>
</div></blockquote></div><br></div></div></div>