drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump
The devcoredump is done in fence signaling context. Because of this, we
cannot take any of the normal mutexes or we would invert.
Normal: Take vm->lock, dma_fence_wait()
Devcoredump: from dma_fence_wait() context, take vm->lock.
This doesn't work, and we only care about integrity, so take the locks
around additions and removals of vma's.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240221133024.898315-5-maarten.lankhorst@linux.intel.com