提交 b6fd6e0f 编写于 作者: S Surbhi Kakarya 提交者: Alex Deucher

drm/amdgpu: Check the memory can be accesssed by ttm_device_clear_dma_mappings.

If the event guard is enabled and VF doesn't receive an ack from PF for full access,
the guest driver load crashes.
This is caused due to the call to ttm_device_clear_dma_mappings with non-initialized
mman during driver tear down.

This patch adds the necessary condition to check if the mman initialization passed or not
and takes the path based on the condition output.
Signed-off-by: NSurbhi Kakarya <Surbhi.Kakarya@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 f89c6bf7
...@@ -3895,6 +3895,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev) ...@@ -3895,6 +3895,7 @@ void amdgpu_device_fini_hw(struct amdgpu_device *adev)
amdgpu_irq_fini_hw(adev); amdgpu_irq_fini_hw(adev);
if (adev->mman.initialized)
ttm_device_clear_dma_mappings(&adev->mman.bdev); ttm_device_clear_dma_mappings(&adev->mman.bdev);
amdgpu_gart_dummy_page_fini(adev); amdgpu_gart_dummy_page_fini(adev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册