Michal Wajdeczko
af2b588abe
drm/xe: Process deferred GGTT node removals on device unwind
While we are indirectly draining our dedicated workqueue ggtt->wq
that we use to complete asynchronous removal of some GGTT nodes,
this happends as part of the managed-drm unwinding (ggtt_fini_early),
which could be later then manage-device unwinding, where we could
already unmap our MMIO/GMS mapping (mmio_fini).
This was recently observed during unsuccessful VF initialization:
[ ] xe 0000:00:02.1: probe with driver xe failed with error -62
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e747340 __xe_bo_unpin_map_no_vm (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e747540 __xe_bo_unpin_map_no_vm (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e747240 __xe_bo_unpin_map_no_vm (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e747040 tiles_fini (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e746840 mmio_fini (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e747f40 xe_bo_pinned_fini (16 bytes)
[ ] xe 0000:00:02.1: DEVRES REL ffff88811e746b40 devm_drm_dev_init_release (16 bytes)
[ ] xe 0000:00:02.1: [drm:drm_managed_release] drmres release begin
[ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef81640 __fini_relay (8 bytes)
[ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80d40 guc_ct_fini (8 bytes)
[ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80040 __drmm_mutex_release (8 bytes)
[ ] xe 0000:00:02.1: [drm:drm_managed_release] REL ffff88810ef80140 ggtt_fini_early (8 bytes)
and this was leading to:
[ ] BUG: unable to handle page fault for address: ffffc900058162a0
[ ] #PF: supervisor write access in kernel mode
[ ] #PF: error_code(0x0002) - not-present page
[ ] Oops: Oops: 0002 [#1] SMP NOPTI
[ ] Tainted: [W]=WARN
[ ] Workqueue: xe-ggtt-wq ggtt_node_remove_work_func [xe]
[ ] RIP: 0010:xe_ggtt_set_pte+0x6d/0x350 [xe]
[ ] Call Trace:
[ ] <TASK>
[ ] xe_ggtt_clear+0xb0/0x270 [xe]
[ ] ggtt_node_remove+0xbb/0x120 [xe]
[ ] ggtt_node_remove_work_func+0x30/0x50 [xe]
[ ] process_one_work+0x22b/0x6f0
[ ] worker_thread+0x1e8/0x3d
Add managed-device action that will explicitly drain the workqueue
with all pending node removals prior to releasing MMIO/GSM mapping.
Fixes: 919bb54e98 ("drm/xe: Fix missing runtime outer protection for ggtt_remove_node")
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250612220937.857-2-michal.wajdeczko@intel.com
(cherry picked from commit 89d2835c36)
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
2025-06-26 15:21:45 +02:00
..
2025-04-10 14:09:35 -07:00
2025-05-07 11:09:43 +03:00
2025-06-26 14:52:25 +02:00
2025-05-28 09:46:39 -07:00
2025-06-24 20:18:31 +02:00
2025-05-08 12:44:34 -07:00
2025-06-06 08:09:56 -07:00
2025-05-10 06:12:18 +10:00
2025-04-23 09:32:16 +01:00
2025-04-23 09:32:16 +01:00
2025-04-23 09:32:16 +01:00
2025-06-05 18:07:25 +02:00
2025-04-28 17:42:49 +02:00
2025-04-08 22:24:00 -07:00
2025-04-08 22:24:00 -07:00
2025-04-24 15:51:38 -07:00
2025-05-01 11:48:56 -04:00
2025-06-05 18:06:01 +02:00
2025-06-06 08:09:56 -07:00
2025-05-07 15:31:10 -04:00
2025-02-25 14:29:06 -08:00
2025-04-26 08:06:14 +10:00
2025-02-20 13:49:08 +01:00
2025-05-07 09:27:40 -07:00
2025-05-01 09:36:48 -07:00
2025-03-05 09:54:24 +05:30
2025-06-06 08:09:56 -07:00
2025-05-07 09:27:40 -07:00
2025-04-05 10:30:12 +02:00
2025-03-10 06:04:38 -07:00
2025-02-27 11:01:15 -08:00
2025-06-26 15:21:45 +02:00
2025-06-05 18:07:15 +02:00
2025-05-08 12:44:41 -07:00
2025-05-08 12:44:41 -07:00
2025-05-08 12:44:41 -07:00
2025-05-08 12:44:41 -07:00
2025-03-25 20:51:29 -07:00
2025-05-08 12:44:51 -07:00
2025-05-28 17:23:13 +02:00
2025-04-23 15:24:06 -04:00
2025-03-31 06:28:03 -07:00
2025-05-08 12:44:20 -07:00
2025-04-04 11:41:11 +01:00
2025-04-14 12:41:58 +02:00
2025-03-12 13:44:05 +01:00
2025-02-28 10:20:35 +01:00
2025-03-13 10:05:45 +01:00
2025-03-13 10:05:45 +01:00
2025-04-23 15:24:06 -04:00
2025-06-19 17:24:30 +02:00
2025-03-06 11:35:38 -08:00
2025-02-26 11:30:56 -08:00
2025-03-25 20:51:29 -07:00
2025-06-19 16:14:47 +02:00
2025-04-17 18:53:38 -07:00
2025-04-22 10:24:47 -07:00
2025-04-28 22:18:27 -07:00
2025-06-26 14:52:43 +02:00
2025-06-19 17:24:30 +02:00
2025-05-23 09:40:55 +02:00
2025-03-25 07:14:32 -07:00
2025-04-17 21:57:18 +02:00
2025-03-25 07:14:32 -07:00
2025-02-24 12:32:09 -08:00
2025-04-04 11:41:01 +01:00
2025-06-19 16:14:56 +02:00
2025-04-02 16:25:28 -07:00
2025-06-19 17:24:30 +02:00
2025-04-07 14:22:35 -07:00
2025-04-29 13:20:57 -07:00
2025-02-26 08:29:30 -08:00
2025-02-25 14:32:03 -08:00
2025-04-17 18:53:38 -07:00
2025-03-05 14:25:27 -05:00
2025-04-07 13:16:07 -07:00
2025-03-06 12:16:35 +01:00
2025-04-07 13:16:07 -07:00
2025-06-24 20:18:31 +02:00
2025-04-04 11:41:08 +01:00
2025-05-14 09:03:29 -07:00
2025-06-12 18:09:50 +02:00
2025-05-14 09:03:29 -07:00
2025-03-10 06:04:38 -07:00
2025-04-24 15:51:39 -07:00
2025-04-24 15:51:39 -07:00
2025-05-28 09:46:39 -07:00
2025-02-18 08:27:11 -08:00
2025-05-22 20:48:50 -07:00
2025-05-28 09:46:39 -07:00
2025-05-14 09:03:29 -07:00
2025-05-07 09:27:40 -07:00
2025-02-28 06:54:14 -08:00
2025-04-17 21:57:51 +02:00
2025-05-14 09:03:29 -07:00
2025-06-06 08:09:56 -07:00
2025-06-05 18:05:44 +02:00
2025-06-05 18:05:44 +02:00
2025-06-05 18:05:44 +02:00
2025-05-28 09:46:39 -07:00
2025-04-23 09:32:16 +01:00
2025-04-02 16:25:28 -07:00
2025-03-06 11:35:43 -08:00
2025-03-05 14:25:11 -05:00
2025-03-05 14:25:11 -05:00
2025-05-28 09:46:39 -07:00
2025-03-06 11:35:40 -08:00
2025-04-17 18:53:38 -07:00
2025-06-05 18:07:33 +02:00
2025-03-03 12:16:04 +02:00
2025-03-27 11:46:06 +01:00
2025-03-12 11:37:52 +01:00
2025-03-12 20:54:17 -07:00
2025-03-06 11:35:37 -08:00
2025-04-15 07:20:41 -07:00
2025-05-14 09:03:29 -07:00
2025-03-12 20:54:17 -07:00
2025-03-12 20:54:17 -07:00
2025-04-04 11:41:01 +01:00
2025-05-13 13:17:05 -07:00
2025-03-05 17:08:59 +01:00
2025-04-08 22:24:00 -07:00
2025-04-08 22:24:00 -07:00
2025-06-09 17:10:20 +02:00
2025-05-28 09:46:39 -07:00
2025-02-21 13:02:54 +05:30
2025-03-06 11:35:54 -08:00
2025-02-24 12:32:09 -08:00
2025-05-14 09:03:29 -07:00
2025-02-26 11:31:01 -08:00
2025-03-05 17:08:59 +01:00
2025-03-12 20:54:17 -07:00
2025-02-28 21:47:33 -08:00
2025-04-10 14:09:58 -07:00
2025-05-08 12:44:41 -07:00
2025-05-08 12:44:41 -07:00
2025-06-05 18:07:07 +02:00
2025-06-05 18:05:19 +02:00
2025-06-05 18:07:07 +02:00
2025-04-10 15:50:01 -07:00
2025-04-10 14:09:35 -07:00
2025-05-28 09:46:39 -07:00