Re: [RFC PATCH 26/42] drm/i915: error capture with no ggtt slot

Chris Wilson
2019-02-14T15:57:06Z

Quoting Matthew Auld (2019-02-14 14:57:24)
> + void *s;
> + struct page *page;
> +
> + for_each_sgt_page(page, iter, vma->pages) {
> + s = kmap_atomic(page);

These pages are not coherent, so missing the point of using UC/WC access
to get what the GPU saw and not what the CPU last speculated.

Typically, and historically, we would use clflush before after.

Just be careful not to use drm_clflush as that invokes wbinvd via
on_each_cpu and is therefore illegal.

Alternatively would be to kmap them as WC.
-Chris