Skip to content

Commit 04aa643

Browse files
ahajdatorvalds
authored andcommitted
drm/i915: fix TLB invalidation for Gen12 video and compute engines
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: 7938d61 ("drm/i915: Flush TLBs before releasing backing store") Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 01f856a commit 04aa643

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,11 @@ static void mmio_invalidate_full(struct intel_gt *gt)
10171017
if (!i915_mmio_reg_offset(rb.reg))
10181018
continue;
10191019

1020+
if (GRAPHICS_VER(i915) == 12 && (engine->class == VIDEO_DECODE_CLASS ||
1021+
engine->class == VIDEO_ENHANCEMENT_CLASS ||
1022+
engine->class == COMPUTE_CLASS))
1023+
rb.bit = _MASKED_BIT_ENABLE(rb.bit);
1024+
10201025
intel_uncore_write_fw(uncore, rb.reg, rb.bit);
10211026
awake |= engine->mask;
10221027
}

0 commit comments

Comments
 (0)