Re: [igt-dev] [PATCH i-g-t v6] i915/gem_mocs_settings: Add mocs table for icelake

Chris Wilson
2019-03-15T21:11:22Z

Quoting Kumar Valsan, Prathap (2019-03-15 19:28:29)
> On Fri, Mar 15, 2019 at 08:46:31AM +0000, Chris Wilson wrote:
> > But other than that, I think the test is sound and exercises the uABI
> > correctly (i.e. clients depend on the MOCS values being static). Bonus
> > points for proving an invalid MOCS value without reading a register :)
> Proving an invalid MOCS value without reading a register wasn't
> successful. One thing i tried is using I915_PARAM_HAS_CONTEXT_ISOLATION:
> created a second context after writing to mocs using first context. Then
> check the value returned by I915_PARAM_HAS_CONTEXT_ISOLATION. If the
> second context inherited the mocs from the first context, then this
> ioctl should return false for the respective engine? Not very sure i am
> heading at the right direction. Will have to experiment further as TODO.
> :)

No, that param concerns a separate uABI bug whereby the initial state of
context saved registers were not scrubbed before new contexts. Global
mocs state does not fall under the umbrella of context regs, so the
HAS_CONTEXT_ISOLATION param doesn't apply universally.

But still, it is a uABI bug for one context to see the altered mocs
state of another context; irrespective of that param. :)

For proving mocs actually does something, we need to look towards the
coherency issues between different mocs settings; and detecting those
quickly and reliably is hard.
-Chris