Rebase eudebug patches to v7.1.1#445
Conversation
9a790fd to
de08683
Compare
Rebase kernel from v7.1-rc6 to v7.1 then rebase eudebug patches Signed-off-by: Pravalika Gurram <pravalika.gurram@intel.com>
CI Bug Log - changes from xkb-285-6067ee166d4dc4c32bf13c66f1b3ada796d0354d_BAT -> xkb-pr-main-445-664-de08683068c12e73c321be690a8b32bad2174205_BATSummarySUCCESS No regressions found. Participating hosts (9 -> 8)Missing (1): bat-bmg-2 Known issuesHere are the changes found in xkb-pr-main-445-664-de08683068c12e73c321be690a8b32bad2174205_BAT that come from known issues: IGT changesIssues hit
Build changes
igt-xkb-140-0f9854df35: 0f9854df35 |
|
|
||
| kunit_printk(KERN_DEBUG, test, "Test eudebug WAs for graphics version: %u\n", | ||
| GRAPHICS_VERx100(xe)); | ||
| diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c |
There was a problem hiding this comment.
Cross check why this is not required
There was a problem hiding this comment.
The upstream commit (bf0257ae) moved xe_eudebug_init from xe_device_create() to xe_device_probe_early() as part of the SR-IOV/eudebug exclusivity work. However, in the backport tree, this move was already done earlier — the initial eudebug introduction patch (0001-drm-xe-eudebug-Introduce-eudebug-support.patch) placed xe_eudebug_init directly into xe_device_probe_early() (not in xe_device_create()), because of this, we won't required this change.
commit fd2f4b3dcd06ff90cfce7b938f5cb1e0b519a065
Author: Mika Kuoppala mika.kuoppala@linux.intel.com
Date: Thu Jan 5 11:06:00 2023 +0200
drm/xe/eudebug: Introduce eudebug support
With eudebug event interface, user space debugger process (like gdb)
is able to keep track of resources created by another process
(debuggee using drm/xe) and act upon these resources.
For example, debugger can find a client vm which contains isa/elf
for a particular shader/eu-kernel and then inspect and modify it
(for example installing a breakpoint).
Debugger first opens a connection to xe with a drm ioctl specifying
target pid to connect. This returns an anon fd handle that can then be
used to listen for events with dedicated ioctl.
This patch introduces eudebug connection and event queuing, adding
client create/destroy and vm create/destroy events as a baseline.
More events for full debugger operation are needed and
those will be introduced in follow up patches.
The resource tracking parts are inspired by the work of
Maciej Patelczyk on resource handling for i915. Chris Wilson
suggested improvement of two ways mapping which makes it easy to
use resource map as a definitive bookkeep of what resources
are played to debugger in the discovery phase (on follow up patch).
v2: - Kconfig support (Matthew)
- ptraced access control (Lucas)
- pass expected event length to user (Zbigniew)
- only track long running VMs
- checkpatch (Tilak)
- include order (Andrzej)
- 32bit fixes (Andrzej)
- cleaner get_task_struct
- remove xa_array and use clients.list for tracking (Mika)
v3: - adapt to removal of clients.lock (Mika)
- create_event cleanup (Christoph)
v4: - add proper header guards (Christoph)
- better read_event fault handling (Christoph, Mika)
- simplify attach (Mika)
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Signed-off-by: Christoph Manszewski <christoph.manszewski@intel.com>
Acked-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 089872507bdd..c41f6f1b185c 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -33,6 +33,7 @@
static long xe_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -458,6 +464,8 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy)
{
struct xe_device *xe = to_xe_device(dev);
-
xe_eudebug_fini(xe); -
xe_bo_dev_fini(&xe->bo_device); if (xe->preempt_fence_wq)
@@ -576,6 +584,8 @@ int xe_device_init_early(struct xe_device *xe)
if (err)
return err;
-
xe_eudebug_init(xe); -
xe->preempt_fence_wq = alloc_ordered_workqueue("xe-preempt-fence-wq", WQ_MEM_RECLAIM); xe->ordered_wq = alloc_ordered_workqueue("xe-ordered-wq", 0);
Rebase kernel from v7.1-rc6 to v7.1 then rebase eudebug patches
Signed-off-by: Pravalika Gurram pravalika.gurram@intel.com