Files
linux/drivers/gpu/drm/xe
Jia Yao 662f9ddc80 drm/xe/uapi: Reject coh_none PAT index for CPU_ADDR_MIRROR
Add validation in xe_vm_bind_ioctl() to reject PAT indices
with XE_COH_NONE coherency mode when used with
DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR.

CPU address mirror mappings use system memory that is CPU
cached, which makes them incompatible with COH_NONE PAT
indices. Allowing COH_NONE with CPU cached buffers is a
security risk, as the GPU may bypass CPU caches and read
stale sensitive data from DRAM.

Although CPU_ADDR_MIRROR does not create an immediate
mapping, the backing system memory is still CPU cached.
Apply the same PAT coherency restrictions as
DRM_XE_VM_BIND_OP_MAP_USERPTR.

v2:
- Correct fix tag

v6:
- No change

v7:
- Correct fix tag

v8:
- Rebase

v9:
- Limit the restrictions to iGPU

v10:
- Just add the iGPU logic but keep dGPU logic

Fixes: b43e864af0 ("drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR")
Cc: <stable@vger.kernel.org> # v6.15+
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Cc: Mathew Alwin <alwin.mathew@intel.com>
Cc: Michal Mrozek <michal.mrozek@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Jia Yao <jia.yao@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Michal Mrozek <michal.mrozek@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260417055917.2027459-3-jia.yao@intel.com
(cherry picked from commit 4d58d7535e826a3175527b6174502f0db319d7f6)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2026-04-29 12:51:21 -04:00
..
2026-03-12 07:23:23 -07:00
2025-10-15 22:48:54 -07:00
2026-04-07 12:36:31 +02:00
2025-07-01 13:58:50 -07:00
2025-12-22 10:22:00 -08:00
2024-05-22 12:03:55 +02:00
2026-03-16 07:36:41 -07:00
2026-02-20 15:49:58 +01:00
2026-04-29 12:51:21 -04:00
2026-03-23 15:23:24 +05:30
2026-03-23 15:23:24 +05:30
2025-01-27 08:54:06 -08:00
2025-02-03 11:51:26 -08:00
2026-04-07 12:36:31 +02:00
2026-04-07 12:36:31 +02:00
2025-06-27 14:52:31 -07:00
2025-12-24 07:59:35 -08:00