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-05-06 16:39:25 +10:00
2025-06-18 13:17:49 -04:00
2025-06-12 13:11:25 +01:00
2024-12-13 08:48:09 +10:00
2025-02-26 15:27:06 +01:00
2025-06-13 08:54:18 +02:00
2024-12-13 08:48:09 +10:00
2025-06-08 09:07:37 +02:00
2025-05-04 09:20:28 -07:00
2025-03-11 12:51:21 +01:00
2025-05-27 23:08:21 +03:00
2025-06-16 20:18:13 -03:00
2025-06-08 09:07:37 +02:00
2025-03-06 12:37:33 -05:00
2025-06-04 11:26:17 -07:00
2025-06-08 09:07:37 +02:00
2025-06-04 11:26:17 -07:00
2025-03-09 23:46:56 +00:00
2025-06-16 07:57:00 +03:00
2025-04-24 11:08:48 +01:00
2025-03-20 14:45:38 +01:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2025-04-07 14:35:48 +02:00
2024-12-13 08:48:09 +10:00
2025-04-23 15:40:30 -05:00
2025-04-29 11:21:23 +02:00
2025-06-08 09:07:37 +02:00
2025-06-10 14:15:42 +02:00
2025-06-13 08:54:31 +02:00
2025-06-18 11:37:14 +10:00
2025-03-12 09:14:29 +01:00
2025-06-13 16:41:43 +02:00
2025-05-15 20:59:32 +02:00
2025-04-07 14:35:48 +02:00
2025-06-06 09:26:47 -07:00
2025-04-28 10:24:04 +01:00
2025-04-29 18:12:23 +02:00
2025-03-07 10:25:10 +01:00
2025-04-23 15:40:30 -05:00
2025-06-06 08:09:56 -07:00
2025-05-02 11:52:46 +03:00
2025-05-04 12:40:53 +02:00
2025-06-06 09:26:47 -07:00
2025-06-11 10:44:56 +02:00
2025-06-12 14:04:56 +02:00
2025-03-10 16:25:01 -04:00
2025-04-14 15:29:49 +10:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2025-04-14 10:16:14 +02:00
2025-05-07 18:07:27 +02:00
2025-05-06 16:39:25 +10:00
2025-03-20 14:45:38 +01:00
2024-12-13 08:48:09 +10:00
2025-06-04 11:26:17 -07:00
2025-06-08 09:07:37 +02:00
2024-12-13 08:48:09 +10:00
2025-04-17 10:21:40 +02:00
2025-06-16 19:35:05 -03:00
2025-02-28 09:05:10 +01:00
2025-06-10 10:47:04 +02:00
2025-06-08 09:07:37 +02:00
2025-05-06 16:39:25 +10:00
2025-05-06 10:17:00 +02:00
2025-06-04 11:26:17 -07:00
2025-06-26 15:21:45 +02:00
2024-12-05 12:35:42 +02:00
2025-04-16 15:03:22 +03:00
2025-03-20 14:45:48 +01:00
2025-03-28 17:44:52 -07:00
2025-03-20 14:45:46 +01:00
2025-04-30 23:35:00 +02:00
2025-03-20 14:45:48 +01:00
2025-04-07 11:38:05 +02:00
2025-01-14 20:43:19 +05:30
2025-03-05 21:48:49 +01:00
2025-03-13 18:33:57 +02:00
2025-03-26 22:59:56 +03:00
2025-03-10 18:18:37 +02:00
2025-01-07 12:45:19 +02:00
2025-03-27 14:02:57 +02:00
2025-01-08 01:39:58 +02:00
2025-03-03 14:45:40 +02:00
2025-03-12 10:50:32 +01:00
2025-04-16 20:40:51 +03:00
2024-12-10 14:36:41 +01:00
2025-04-07 14:35:48 +02:00
2025-05-28 09:46:39 -07:00
2025-05-28 09:46:39 -07:00
2025-03-06 08:59:17 +01:00
2025-03-05 21:48:50 +01:00
2025-02-27 09:37:55 +01:00
2025-05-12 07:14:34 +10:00
2025-04-07 08:45:31 +02:00
2025-04-01 15:35:22 +02:00
2024-11-25 16:09:48 -08:00
2025-03-06 08:59:01 +01:00
2025-03-26 22:59:56 +03:00
2025-04-04 15:56:44 +03:00
2025-03-26 23:00:02 +03:00
2025-05-28 09:46:39 -07:00
2025-03-26 22:59:56 +03:00
2025-01-21 10:32:31 +01:00
2025-04-29 17:29:49 +02:00
2025-03-30 19:47:12 +03:00
2025-05-09 15:29:40 +05:30
2025-01-10 14:24:17 +10:00
2025-02-17 14:17:55 +01:00
2025-03-15 20:49:38 +02:00
2025-04-22 16:49:11 +03:00
2025-05-02 12:58:00 +02:00
2025-04-10 10:50:58 +02:00
2025-05-09 15:30:28 +05:30
2025-03-26 22:59:56 +03:00
2024-12-10 14:08:40 +02:00
2025-03-24 09:31:03 +01:00
2025-04-01 18:30:25 +02:00
2025-02-21 09:20:31 +01:00
2025-01-08 18:15:03 +01:00
2025-06-08 09:07:37 +02:00
2025-02-20 15:02:09 +01:00
2025-06-04 11:26:17 -07:00
2025-04-10 14:06:06 +02:00
2025-05-28 09:46:39 -07:00