From 6ff99f4335f7ff5c210a2130438535c625f61f06 Mon Sep 17 00:00:00 2001 From: Tejas Upadhyay Date: Thu, 3 Sep 2026 21:46:05 +0530 Subject: [PATCH] drm/xe/vram: Check disable_vram_page_offline policy in fault handler Before reserving a page at a faulting address, check the cached disable_vram_page_offline policy from xe->ras. If the policy is enabled (logging only), log the corrupted address and return -EOPNOTSUPP so that RAS can report to firmware to drop the address from the SRAM queue without attempting to offline the page. Reviewed-by: Himal Prasad Ghimiray Cc: Michal Wajdeczko Signed-off-by: Tejas Upadhyay Signed-off-by: Matthew Brost Link: https://patch.msgid.link/20260903161553.528932-29-tejas.upadhyay@intel.com --- drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c index aea4cb0b66fd..f4810cb961df 100644 --- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c +++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c @@ -21,6 +21,7 @@ #include "xe_lrc.h" #include "xe_mmio.h" #include "xe_pm.h" +#include "xe_printk.h" #include "xe_res_cursor.h" #include "xe_ttm_stolen_mgr.h" #include "xe_ttm_vram_mgr.h" @@ -904,6 +905,12 @@ int xe_ttm_vram_handle_addr_fault(struct xe_device *xe, u64 addr) vram_mgr = &vr->ttm; mm = &vram_mgr->mm; + if (xe->ras.disable_vram_page_offline) { + xe_err(xe, "0x%llx is reported as corrupted address by HW\n", + addr); + return -EOPNOTSUPP; + } + /* Reserve page at address */ return xe_ttm_vram_reserve_page_at_addr(xe, addr - vr->dpa_base, vram_mgr, mm); }