All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuicheng Lin <shuicheng.lin@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>,
	Matthew Brost <matthew.brost@intel.com>
Subject: [PATCH] drm/xe: Mark xe_vma_ops_alloc() noinline for error injection
Date: Wed,  7 Oct 2026 22:24:26 +0000	[thread overview]
Message-ID: <20261007222426.1350374-1-shuicheng.lin@intel.com> (raw)

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


             reply	other threads:[~2026-10-07 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 22:24 Shuicheng Lin [this message]
2026-10-07 23:14 ` ✓ CI.KUnit: success for drm/xe: Mark xe_vma_ops_alloc() noinline for error injection Patchwork
2026-10-08  0:42 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-08  5:05 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261007222426.1350374-1-shuicheng.lin@intel.com \
    --to=shuicheng.lin@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.