CVE-2026-97620: drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches
In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Flush LSC untyped L1 dataport cache after rcs/ccs batches
emitrendercacheflush() sets PIPECONTROL0HDCPIPELINEFLUSH to flush the L2/HDC data cache before fence signalling, but it never requests a flush of the LSC untyped L1 data cache via the 'Untyped Data-Port Cache Flush Enable' bit in PIPECONTROL DWord0[11].
Per the Bspec, in 3D pipeline mode HDC Pipeline Flush is documented to also flush/invalidate the untyped L1 cache, but only depending on how HDCCHICKEN0[13:11] is programmed. Starting with MTL, this coupling between HDC Pipeline Flush and the untyped L1 cache flush no longer holds in practice, regardless of how HDCCHICKEN0 is programmed, so relying on it is not safe on newer platforms such as BMG. Mesa's Vulkan driver (anv) has been assuming the kernel flushes both caches between submissions, and hit user-visible corruption in apps such as Llama.cpp because of this gap; it now works around it by flushing both caches again from userspace at the end of every command buffer.
Correctness between submissions on the same queue is userspace's responsibility and belongs in Mesa, not the kernel. However, for security we must ensure stale data can't leak through the untyped L1 dataport cache once memory is reclaimed or evicted, which requires the KMD to flush it before releasing memory for reuse.
Prior to MTL, HDCCHICKEN0 could be programmed (as already done for DG2 via Wa22010960976/Wa14013347512) to reliably keep HDC Pipeline Flush coupled to the untyped L1 cache flush, so those platforms are unaffected. Mesa's own anv driver found that on MTL the HW disconnected the two independently of how HDCCHICKEN0 is programmed, and could not bring the old behavior back even by writing the register by hand; see Mesa commit 7c2ff46a4fc3 ("anv: don't prevent L1 untyped cache flush in 3D mode"). The kernel can't reliably request the flush from the CS on MTL either, so restrict the new PIPECONTROL bit to GRAPHICSVERx100 >= 2000 (Xe2 and later), where it can be relied on.
Explicitly set PIPECONTROL0UNTYPEDDATAPORTCACHEFLUSH together with PIPECONTROL0HDCPIPELINEFLUSH in emitrendercacheflush() on Xe2 and later, so the L1 data cache is known clean before memory is released for reuse, without depending on undocumented platform-specific HDCCHICKEN0 behavior.
Bspec: 56551 (cherry picked from commit 434514b6fe731e873808297c268fc52cdf4a1ce6)
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch 434514b6fe731e873808297c268fc52cdf4a1ce6
Event History
Frequently Asked Questions
Which systems are most likely to see the issue?
The issue is relevant to newer Intel graphics platforms starting with MTL, including BMG, where an HDC pipeline flush no longer reliably flushes the LSC untyped L1 dataport cache. It has been observed as user-visible corruption in applications such as Llama.cpp when using Mesa's Vulkan driver.
What conditions are needed for the corruption to occur?
The problem concerns cache correctness between render or compute submissions on the same queue. Mesa's anv Vulkan driver assumed that the kernel flushed both relevant caches between submissions, but the kernel flush was incomplete on affected newer platforms.
Is there a mitigation if the kernel fix is not available?
Mesa's anv driver can work around the issue by flushing both caches from userspace at the end of every command buffer. The description states that correctness between submissions on the same queue is userspace's responsibility and belongs in Mesa.