From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: saurabhg.gupta@intel.com, alex.zuo@intel.com,
jonathan.cavitt@intel.com, john.c.harrison@intel.com,
matthew.brost@intel.com, michal.wajdeczko@intel.com
Subject: [PATCH v5 2/3] Revert "drm/xe: Add VM bind IOCTL error injection"
Date: Wed, 27 Aug 2025 20:14:08 +0000 [thread overview]
Message-ID: <20250827201405.116855-7-jonathan.cavitt@intel.com> (raw)
In-Reply-To: <20250827201405.116855-5-jonathan.cavitt@intel.com>
This reverts commit 04e9c0ce19ac68afd8be7fd54772db3b0356cf75.
Error injection should use the error injection interface, and should be
decoupled from CONFIG_DRM_XE_DEBUG.
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
drivers/gpu/drm/xe/xe_device_types.h | 12 ------------
drivers/gpu/drm/xe/xe_pt.c | 12 ------------
drivers/gpu/drm/xe/xe_vm.c | 23 +----------------------
drivers/gpu/drm/xe/xe_vm_types.h | 14 --------------
4 files changed, 1 insertion(+), 60 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index 092004d14db2..ef4b843dbd7d 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -27,10 +27,6 @@
#include "xe_step_types.h"
#include "xe_survivability_mode_types.h"
-#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
-#define TEST_VM_OPS_ERROR
-#endif
-
struct dram_info;
struct intel_display;
struct intel_dg_nvm_dev;
@@ -565,14 +561,6 @@ struct xe_device {
/** @atomic_svm_timeslice_ms: Atomic SVM fault timeslice MS */
u32 atomic_svm_timeslice_ms;
-#ifdef TEST_VM_OPS_ERROR
- /**
- * @vm_inject_error_position: inject errors at different places in VM
- * bind IOCTL based on this value
- */
- u8 vm_inject_error_position;
-#endif
-
#if IS_ENABLED(CONFIG_TRACE_GPU_MEM)
/**
* @global_total_pages: global GPU page usage tracked for gpu_mem
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index e1b2da20b881..d15f5dac88b7 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -2163,12 +2163,6 @@ int xe_pt_update_ops_prepare(struct xe_tile *tile, struct xe_vma_ops *vops)
xe_tile_assert(tile, pt_update_ops->current_op <=
pt_update_ops->num_ops);
-#ifdef TEST_VM_OPS_ERROR
- if (vops->inject_error &&
- vops->vm->xe->vm_inject_error_position == FORCE_OP_ERROR_PREPARE)
- return -ENOSPC;
-#endif
-
return 0;
}
ALLOW_ERROR_INJECTION(xe_pt_update_ops_prepare, ERRNO);
@@ -2409,12 +2403,6 @@ xe_pt_update_ops_run(struct xe_tile *tile, struct xe_vma_ops *vops)
return dma_fence_get_stub();
}
-#ifdef TEST_VM_OPS_ERROR
- if (vops->inject_error &&
- vm->xe->vm_inject_error_position == FORCE_OP_ERROR_RUN)
- return ERR_PTR(-ENOSPC);
-#endif
-
if (pt_update_ops->needs_invalidation) {
struct xe_exec_queue *q = pt_update_ops->q;
struct xe_dep_scheduler *dep_scheduler =
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 04e98c7e8935..5602e6cb4a72 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3222,12 +3222,6 @@ static int vm_bind_ioctl_ops_lock_and_prep(struct drm_exec *exec,
return err;
}
-#ifdef TEST_VM_OPS_ERROR
- if (vops->inject_error &&
- vm->xe->vm_inject_error_position == FORCE_OP_ERROR_LOCK)
- return -ENOSPC;
-#endif
-
return 0;
}
@@ -3472,7 +3466,7 @@ static struct dma_fence *vm_bind_ioctl_ops_execute(struct xe_vm *vm,
}
ALLOW_ERROR_INJECTION(vm_bind_ioctl_ops_execute, ERRNO);
-#define SUPPORTED_FLAGS_STUB \
+#define SUPPORTED_FLAGS \
(DRM_XE_VM_BIND_FLAG_READONLY | \
DRM_XE_VM_BIND_FLAG_IMMEDIATE | \
DRM_XE_VM_BIND_FLAG_NULL | \
@@ -3480,12 +3474,6 @@ ALLOW_ERROR_INJECTION(vm_bind_ioctl_ops_execute, ERRNO);
DRM_XE_VM_BIND_FLAG_CHECK_PXP | \
DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR)
-#ifdef TEST_VM_OPS_ERROR
-#define SUPPORTED_FLAGS (SUPPORTED_FLAGS_STUB | FORCE_OP_ERROR)
-#else
-#define SUPPORTED_FLAGS SUPPORTED_FLAGS_STUB
-#endif
-
#define XE_64K_PAGE_MASK 0xffffull
#define ALL_DRM_XE_SYNCS_FLAGS (DRM_XE_SYNCS_FLAG_WAIT_FOR_OP)
@@ -3868,15 +3856,6 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
err = vm_bind_ioctl_ops_parse(vm, ops[i], &vops);
if (err)
goto unwind_ops;
-
-#ifdef TEST_VM_OPS_ERROR
- if (flags & FORCE_OP_ERROR) {
- vops.inject_error = true;
- vm->xe->vm_inject_error_position =
- (vm->xe->vm_inject_error_position + 1) %
- FORCE_OP_ERROR_COUNT;
- }
-#endif
}
/* Nothing to do */
diff --git a/drivers/gpu/drm/xe/xe_vm_types.h b/drivers/gpu/drm/xe/xe_vm_types.h
index b5108d010786..a7a9e80777f3 100644
--- a/drivers/gpu/drm/xe/xe_vm_types.h
+++ b/drivers/gpu/drm/xe/xe_vm_types.h
@@ -25,16 +25,6 @@ struct xe_user_fence;
struct xe_vm;
struct xe_vm_pgtable_update_op;
-#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
-#define TEST_VM_OPS_ERROR
-#define FORCE_OP_ERROR BIT(31)
-
-#define FORCE_OP_ERROR_LOCK 0
-#define FORCE_OP_ERROR_PREPARE 1
-#define FORCE_OP_ERROR_RUN 2
-#define FORCE_OP_ERROR_COUNT 3
-#endif
-
#define XE_VMA_READ_ONLY DRM_GPUVA_USERBITS
#define XE_VMA_DESTROYED (DRM_GPUVA_USERBITS << 1)
#define XE_VMA_ATOMIC_PTE_BIT (DRM_GPUVA_USERBITS << 2)
@@ -512,10 +502,6 @@ struct xe_vma_ops {
#define XE_VMA_OPS_FLAG_HAS_SVM_PREFETCH BIT(0)
#define XE_VMA_OPS_FLAG_MADVISE BIT(1)
u32 flags;
-#ifdef TEST_VM_OPS_ERROR
- /** @inject_error: inject error to test error handling */
- bool inject_error;
-#endif
};
#endif
--
2.43.0
next prev parent reply other threads:[~2025-08-27 20:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 20:14 [PATCH v5 0/3] drm/xe/xe_vm: Add error injection support to lock and prep Jonathan Cavitt
2025-08-27 20:14 ` [PATCH v5 1/3] drm/xe: Add error_injectable define Jonathan Cavitt
2025-08-27 20:31 ` Michal Wajdeczko
2025-08-27 20:14 ` Jonathan Cavitt [this message]
2025-08-27 20:14 ` [PATCH v5 3/3] drm/xe/xe_vm: Add error injection support to lock and prep Jonathan Cavitt
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=20250827201405.116855-7-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=alex.zuo@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=saurabhg.gupta@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.