public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: christoph.manszewski@intel.com,
	dominik.karol.piatkowski@intel.com, maciej.patelczyk@intel.com,
	jan.maslak@intel.com, zbigniew.kempczynski@intel.com,
	Mika Kuoppala <mika.kuoppala@linux.intel.com>
Subject: [PATCH i-g-t 17/21] tests/xe_eudebug_online: Adapt set-breakpoint test to work with new vm bind event interface
Date: Mon, 12 Jan 2026 15:00:03 +0200	[thread overview]
Message-ID: <20260112130008.1649357-18-mika.kuoppala@linux.intel.com> (raw)
In-Reply-To: <20260112130008.1649357-1-mika.kuoppala@linux.intel.com>

From: Christoph Manszewski <christoph.manszewski@intel.com>

Metadata used to be a standalone kernel resource created with a dedicated
ioctl and carried a binary blob as payload. The set-breakpoint testcase
relies on metadata resource creation events for bb ppgtt address and size
passing.

After rework the (now called) debug data can only be passed to the debugger
by mapping it to a vm. Convert the test to use this new interface.

Signed-off-by: Christoph Manszewski <christoph.manszewski@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 tests/intel/xe_eudebug_online.c | 37 +++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 34a8ff26e9..a9fa150114 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -875,6 +875,32 @@ static void vm_open_trigger(struct xe_eudebug_debugger *d,
 	pthread_mutex_unlock(&data->mutex);
 }
 
+static void online_debug_data_trigger(struct xe_eudebug_debugger *d, struct drm_xe_eudebug_event *e)
+{
+	struct drm_xe_eudebug_event_vm_bind_op_debug_data *ed = (void *)e;
+	struct online_debug_data *data = d->ptr;
+
+	if (!(e->flags & DRM_XE_EUDEBUG_EVENT_CREATE))
+		return;
+
+	igt_assert(ed->flags & DRM_XE_VM_BIND_DEBUG_DATA_FLAG_PSEUDO);
+
+	pthread_mutex_lock(&data->mutex);
+	switch (ed->pseudopath) {
+	case DRM_XE_VM_BIND_DEBUG_DATA_PSEUDO_SBA_AREA:
+		data->bb_offset = ed->addr;
+		data->bb_size = ed->range;
+		break;
+	case DRM_XE_VM_BIND_DEBUG_DATA_PSEUDO_MODULE_AREA:
+		data->target_offset = ed->addr;
+		data->target_size = ed->range;
+		break;
+	default:
+		break;
+	}
+	pthread_mutex_unlock(&data->mutex);
+}
+
 static void overwrite_immediate_value_in_common_target_write(int vm_fd, uint64_t offset,
 							     uint32_t old_val, uint32_t new_val)
 {
@@ -1081,6 +1107,13 @@ static void run_online_client(struct xe_eudebug_client *c)
 
 	create.vm_id = xe_eudebug_client_vm_create(c, vm_flags, 0);
 
+	xe_eudebug_client_vm_bind_debug_data_add(c, create.vm_id, 0, bb_offset, bb_size,
+						 DRM_XE_VM_BIND_DEBUG_DATA_PSEUDO_SBA_AREA,
+						 NULL, NULL, 0);
+	xe_eudebug_client_vm_bind_debug_data_add(c, create.vm_id, 0, target_offset, buf->size,
+						 DRM_XE_VM_BIND_DEBUG_DATA_PSEUDO_MODULE_AREA,
+						 NULL, NULL, 0);
+
 	xe_eudebug_client_exec_queue_create(c, &create);
 
 	ibb = xe_bb_create_on_offset(c->fd,
@@ -1126,6 +1159,8 @@ static void run_online_client(struct xe_eudebug_client *c)
 	intel_bb_destroy(ibb);
 
 	xe_eudebug_client_exec_queue_destroy(c, &create);
+	xe_eudebug_client_vm_bind_debug_data_remove(c, create.vm_id, bb_offset, bb_size);
+	xe_eudebug_client_vm_bind_debug_data_remove(c, create.vm_id, target_offset, buf->size);
 	xe_eudebug_client_vm_destroy(c, create.vm_id);
 
 	intel_buf_destroy(buf);
@@ -1493,6 +1528,8 @@ static void test_set_breakpoint_online(int fd, struct drm_xe_engine_class_instan
 	xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_EXEC_QUEUE,
 					exec_queue_trigger);
 	xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_VM, vm_open_trigger);
+	xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_VM_BIND_OP_DEBUG_DATA,
+					online_debug_data_trigger);
 	xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_VM_BIND_UFENCE,
 					ufence_ack_set_bp_trigger);
 	xe_eudebug_debugger_add_trigger(s->debugger, DRM_XE_EUDEBUG_EVENT_EU_ATTENTION,
-- 
2.43.0


  parent reply	other threads:[~2026-01-12 13:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 12:59 [PATCH i-g-t 00/21] eudebug: uapi changes on connect and metadata Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 01/21] lib/xe/xe_eudebug: Dont compare if everything filtered Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 02/21] lib/xe/xe_eudebug: Make sure debugger drains events Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 03/21] lib/xe/xe_eudebug: Avoid matching if event is filtered Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 04/21] tests/intel/xe_eudebug_sriov: Align expected return code Mika Kuoppala
2026-01-12 13:12   ` Piatkowski, Dominik Karol
2026-01-12 12:59 ` [PATCH i-g-t 05/21] eudebug: Remove metadata tests Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 06/21] eudebug: Remove EVENT_OPEN and adjust tests Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 07/21] tests/xe_eudebug: Adapt basic-read-event Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 08/21] tests/intel/xe_eudebug: Fix connect-user test Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 09/21] tests/intel/xe_eudebug: Mold ufence reconnect test to disconnect Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 10/21] lib/xe_eudebug: Adapt to vm_bind debug data Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 11/21] tests/xe_eudebug: Adapt basic-vm-bind and remove basic-vm-bind-extended Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 12/21] tests/xe_eudebug: Adapt some ufence reliant tests to new vm_bind event interface Mika Kuoppala
2026-01-12 12:59 ` [PATCH i-g-t 13/21] tests/xe_eudebug: Adapt vm-bind-clear* subtests to debug data Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 14/21] lib/xe_eudebug: Remove unused xe_eudebug_client_vm_bind wrappers Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 15/21] tests/xe_eudebug: Add vm-bind-debug-data-ufence subtest Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 16/21] lib/intel_batchbuffer: Add dummy OP_DEBUG_DATA operation to __xe_alloc_bind_ops Mika Kuoppala
2026-01-12 13:00 ` Mika Kuoppala [this message]
2026-01-12 13:00 ` [PATCH i-g-t 18/21] tests/xe_eudebug_online: Adapt several subtests to work with new vm bind event interface Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 19/21] lib/xe/xe_eudebug: Add callback for session work Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 20/21] tests/intel/xe_eudebug: Add render node testing Mika Kuoppala
2026-01-12 13:00 ` [PATCH i-g-t 21/21] eudebug: Update xe_drm_eudebug.h uapi Mika Kuoppala

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=20260112130008.1649357-18-mika.kuoppala@linux.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=christoph.manszewski@intel.com \
    --cc=dominik.karol.piatkowski@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jan.maslak@intel.com \
    --cc=maciej.patelczyk@intel.com \
    --cc=zbigniew.kempczynski@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox