]> Git Repo - linux.git/commitdiff
drm/i915: fix TLB invalidation for Gen12 video and compute engines
authorAndrzej Hajda <[email protected]>
Mon, 14 Nov 2022 10:38:24 +0000 (11:38 +0100)
committerLinus Torvalds <[email protected]>
Wed, 30 Nov 2022 16:44:00 +0000 (08:44 -0800)
In case of Gen12 video and compute engines, TLB_INV registers are masked -
to modify one bit, corresponding bit in upper half of the register must
be enabled, otherwise nothing happens.

CVE: CVE-2022-4139
Suggested-by: Chris Wilson <[email protected]>
Signed-off-by: Andrzej Hajda <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store")
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
drivers/gpu/drm/i915/gt/intel_gt.c

index d0b03a928b9acaaae274907fa73e4431186470e6..5c931b6696c3274c392f921eb7c4555d04b6851d 100644 (file)
@@ -1017,6 +1017,11 @@ static void mmio_invalidate_full(struct intel_gt *gt)
                if (!i915_mmio_reg_offset(rb.reg))
                        continue;
 
+               if (GRAPHICS_VER(i915) == 12 && (engine->class == VIDEO_DECODE_CLASS ||
+                   engine->class == VIDEO_ENHANCEMENT_CLASS ||
+                   engine->class == COMPUTE_CLASS))
+                       rb.bit = _MASKED_BIT_ENABLE(rb.bit);
+
                intel_uncore_write_fw(uncore, rb.reg, rb.bit);
                awake |= engine->mask;
        }
This page took 0.0592279999999999 seconds and 4 git commands to generate.