From: Jan Sokolowski <jan.sokolowski@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>,
Jan Sokolowski <jan.sokolowski@intel.com>
Subject: [PATCH i-g-t v2 2/2] tests/xe_eudebug_online: Implement faultable variations of some testcases
Date: Tue, 1 Apr 2025 09:06:51 +0000 [thread overview]
Message-ID: <20250401090651.298768-3-jan.sokolowski@intel.com> (raw)
In-Reply-To: <20250401090651.298768-1-jan.sokolowski@intel.com>
From: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Implement fault variation of tests, which are accessing the memory via
debugfd, by creating a vm in FAULT_MODE.
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
---
tests/intel/xe_eudebug_online.c | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 84ba748c1..a29e5a086 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -38,6 +38,7 @@
#define TARGET_IN_VRAM (1 << 13)
#define SHADER_PAGEFAULT_READ (1 << 14)
#define SHADER_PAGEFAULT_WRITE (1 << 15)
+#define FAULTABLE_VM (1 << 16)
#define TRIGGER_UFENCE_SET_BREAKPOINT (1 << 24)
#define TRIGGER_RESUME_SINGLE_WALK (1 << 25)
#define TRIGGER_RESUME_PARALLEL_WALK (1 << 26)
@@ -1098,7 +1099,8 @@ static void run_online_client(struct xe_eudebug_client *c)
2 * sizeof(**metadata), metadata[1]);
vm_flags = DRM_XE_VM_CREATE_FLAG_LR_MODE;
- vm_flags |= c->flags & SHADER_PAGEFAULT ? DRM_XE_VM_CREATE_FLAG_FAULT_MODE : 0;
+ vm_flags |= c->flags & (SHADER_PAGEFAULT | FAULTABLE_VM) ?
+ DRM_XE_VM_CREATE_FLAG_FAULT_MODE : 0;
create.vm_id = xe_eudebug_client_vm_create(c, fd, vm_flags, 0);
@@ -1481,6 +1483,12 @@ static void test_basic_online(int fd, struct drm_xe_engine_class_instance *hwe,
* SUBTEST: set-breakpoint
* Description:
* Checks for attention after setting a dynamic breakpoint in the ufence event.
+ *
+ * SUBTEST: set-breakpoint-faultable
+ * Sub-category: EUdebug online
+ * Functionality: dynamic breakpoint with FAULTABLE_VM
+ * Description:
+ * Faultable variation of test set-breakpoint.
*/
static void test_set_breakpoint_online(int fd, struct drm_xe_engine_class_instance *hwe, int flags)
@@ -1488,6 +1496,8 @@ static void test_set_breakpoint_online(int fd, struct drm_xe_engine_class_instan
struct xe_eudebug_session *s;
struct online_debug_data *data;
+ igt_require(!(flags & FAULTABLE_VM) || !xe_supports_faults(fd));
+
data = online_debug_data_create(hwe);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_OPEN,
@@ -1739,6 +1749,12 @@ static void test_reset_with_attention_online(int fd, struct drm_xe_engine_class_
* interrupts all threads, once attention event come it sets breakpoint on
* the very next instruction and resumes stopped threads back. It expects
* that every thread hits the breakpoint.
+ *
+ * SUBTEST: interrupt-all-set-breakpoint-faultable
+ * Sub-category: EUdebug online
+ * Functionality: dynamic breakpoint with FAULTABLE_VM
+ * Description:
+ * Faultable variation of test interrupt-all-set-breakpoint.
*/
static void test_interrupt_all(int fd, struct drm_xe_engine_class_instance *hwe, int flags)
{
@@ -1746,6 +1762,8 @@ static void test_interrupt_all(int fd, struct drm_xe_engine_class_instance *hwe,
struct online_debug_data *data;
uint32_t val;
+ igt_require(!(flags & FAULTABLE_VM) || !xe_supports_faults(fd));
+
data = online_debug_data_create(hwe);
s = xe_eudebug_session_create(fd, run_online_client, flags, data);
@@ -2521,6 +2539,9 @@ igt_main
test_gt_render_or_compute("set-breakpoint", fd, hwe)
test_set_breakpoint_online(fd, hwe, SHADER_NOP | TRIGGER_UFENCE_SET_BREAKPOINT);
+ test_gt_render_or_compute("set-breakpoint-faultable", fd, hwe)
+ test_set_breakpoint_online(fd, hwe, SHADER_NOP | TRIGGER_UFENCE_SET_BREAKPOINT | FAULTABLE_VM);
+
test_gt_render_or_compute("set-breakpoint-sigint-debugger", fd, hwe)
test_set_breakpoint_online_sigint_debugger(fd, hwe,
SHADER_NOP | TRIGGER_UFENCE_SET_BREAKPOINT);
@@ -2563,6 +2584,9 @@ igt_main
test_gt_render_or_compute("interrupt-all-set-breakpoint", fd, hwe)
test_interrupt_all(fd, hwe, SHADER_LOOP | TRIGGER_RESUME_SET_BP);
+ test_gt_render_or_compute("interrupt-all-set-breakpoint-faultable", fd, hwe)
+ test_interrupt_all(fd, hwe, SHADER_LOOP | TRIGGER_RESUME_SET_BP | FAULTABLE_VM);
+
test_gt_render_or_compute("tdctl-parameters", fd, hwe)
test_tdctl_parameters(fd, hwe, SHADER_LOOP);
--
2.34.1
next prev parent reply other threads:[~2025-04-01 9:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 9:06 [PATCH i-g-t v2 0/2] Fault variations of tests Jan Sokolowski
2025-04-01 9:06 ` [PATCH i-g-t v2 1/2] tests/xe_eudebug: Implement faultable variations of some testcases Jan Sokolowski
2025-04-14 11:23 ` Manszewski, Christoph
2025-04-01 9:06 ` Jan Sokolowski [this message]
2025-04-14 12:58 ` [PATCH i-g-t v2 2/2] tests/xe_eudebug_online: " Piatkowski, Dominik Karol
2025-04-14 13:01 ` Manszewski, Christoph
2025-04-01 11:17 ` ✓ i915.CI.BAT: success for Fault variations of tests (rev2) Patchwork
2025-04-01 11:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-01 13:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-01 14:02 ` ✗ i915.CI.Full: " Patchwork
2025-04-07 8:12 ` Sokolowski, Jan
2025-04-06 22:15 ` ✗ Xe.CI.Full: " Patchwork
2025-04-07 8:11 ` Sokolowski, Jan
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=20250401090651.298768-3-jan.sokolowski@intel.com \
--to=jan.sokolowski@intel.com \
--cc=dominik.grzegorzek@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox