All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Mark xe_vma_ops_alloc() noinline for error injection
@ 2026-10-07 22:24 Shuicheng Lin
  2026-10-07 23:14 ` ✓ CI.KUnit: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shuicheng Lin @ 2026-10-07 22:24 UTC (permalink / raw)
  To: intel-xe; +Cc: Shuicheng Lin, Matthew Brost

Since xe_vma_ops_alloc() was reduced to a loop around
xe_pt_job_ops_alloc(), the compiler inlines it into all of its
callers, including xe_vm_bind_ioctl(). ALLOW_ERROR_INJECTION() only
keeps an out-of-line copy of the function alive for the kprobe, so
fail_function injection on xe_vma_ops_alloc is armed on a copy that is
never called and the bind IOCTL succeeds.

This is seen with the nodebug kernel config used in CI, where
igt@xe_fault_injection@vm-bind-fail-xe_vma_ops_alloc fails with:

  Failed assertion: simple_vm_bind(fd, vm) != 0

Mark xe_vma_ops_alloc() noinline so callers go through the injectable
function.

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/9432
Fixes: 0e33330f1238 ("drm/xe: Add struct xe_pt_job_ops")
Cc: Matthew Brost <matthew.brost@intel.com>
Assisted-by: LLM
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
---
 drivers/gpu/drm/xe/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 761bc136145f..8e2110e11368 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -676,7 +676,7 @@ static void xe_vm_clear_fault_entries(struct xe_vm *vm)
 	vm->faults.len = 0;
 }
 
-static int xe_vma_ops_alloc(struct xe_vma_ops *vops, bool array_of_binds)
+static noinline int xe_vma_ops_alloc(struct xe_vma_ops *vops, bool array_of_binds)
 {
 	int i;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-08  5:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 22:24 [PATCH] drm/xe: Mark xe_vma_ops_alloc() noinline for error injection Shuicheng Lin
2026-10-07 23:14 ` ✓ CI.KUnit: success for " Patchwork
2026-10-08  0:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-08  5:05 ` ✓ Xe.CI.FULL: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.