]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/xe/pf: Clear all LMTT pages on alloc
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 1 Jul 2025 22:00:52 +0000 (00:00 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 3 Jul 2025 14:38:45 +0000 (16:38 +0200)
commit3fae6918a3e27cce20ded2551f863fb05d4bef8d
tree541bd0913298de588143c835fb5e6b2d73c87f0c
parentb9329f51677e5ca3288ab652f488e99d5db11693
drm/xe/pf: Clear all LMTT pages on alloc

Our LMEM buffer objects are not cleared by default on alloc
and during VF provisioning we only setup LMTT PTEs for the
actually provisioned LMEM range. But beyond that valid range
we might leave some stale data that could either point to some
other VFs allocations or even to the PF pages.

Explicitly clear all new LMTT page to avoid the risk that a
malicious VF would try to exploit that gap.

While around add asserts to catch any undesired PTE overwrites
and low-level debug traces to track LMTT PT life-cycle.

Fixes: b1d204058218 ("drm/xe/pf: Introduce Local Memory Translation Table")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20250701220052.1612-1-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_lmtt.c