Commit 3ea1b64e authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: drm/xe/pf: Clear all LMTT pages on alloc



[ Upstream commit 705a412a ]

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: b1d20405 ("drm/xe/pf: Introduce Local Memory Translation Table")
Change-Id: I994bd44af7a91a1c16f136c39cf805cf5f2ecf5e
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
Reviewed-by: default avatarPiotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20250701220052.1612-1-michal.wajdeczko@intel.com


(cherry picked from commit 3fae6918)
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit ff4b8c9a)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 4c72effa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment