Quoting Tvrtko Ursulin (2018-07-13 15:51:50)
> 
> On 13/07/2018 11:59, Chris Wilson wrote:
> > +     /* Now enforce read-only henceforth */
> > +     igt_assert(mprotect(space, total, PROT_READ) == 0);
> 
> If rhandle was still alive, would this trigger the mmu notifier 
> invalidation? Something to check maybe, if there is such hook.

But from rhandle's point of view, not much happens. It's just a regular
invalidation and recovery, I think covered by the mmap-invalidate tests.

> > +
> > +     /* Check that we disallow removing the readonly protection */
> 
> What does it mean that we are disallowing it? Is it more that we are 
> oblivious to it (form the userptr bo point of view)?

No, that mprotect(PROT_WRITE) reports an error if you try to change the
protection from PROT_READ, so you are not allowed to create
mmap_gtt(PROT_WRITE) into a read-only userptr, nor are you allowed to
get around that restriction by changing the CPU PTE protection later.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to