]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/i915: Mark the context state as dirty/written
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 10 Nov 2017 14:26:32 +0000 (14:26 +0000)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:42:20 +0000 (01:42 -0500)
commitde9ce53b85061bf585659fa6739751d4f75baf9d
tree7b934720ad4e2465cd97a04fb4a06a5ebbbeb981
parent4d4149a8b28f5e5739043a55852b343babc0927c
drm/i915: Mark the context state as dirty/written

BugLink: https://bugs.launchpad.net/bugs/1862840
In the next few patches, we will want to both copy out of the context
image and write a valid image into a new context. To be completely safe,
we should then couple in our domain tracking to ensure that we don't
have any issues with stale data remaining in unwanted cachelines.

Historically, we omitted the .write=true from the call to set-gtt-domain
in i915_switch_context() in order to avoid a stall between every request
as we would want to wait for the previous context write from the gpu.
Since then, we limit the set-gtt-domain to only occur when we first bind
the vma, so once in use we will never stall, and we are sure to flush
the context following a load from swap.

Equally we never applied the lessons learnt from ringbuffer submission
to execlists; so time to apply the flush of the lrc after load as well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171110142634.10551-6-chris@chris-wilson.co.uk
CVE-2020-8832

(cherry picked from commit f4e15af7e21861445821d5f09922ef7e695269a1)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c