Skip to contentSkip to conversation

drm/amdgpu: shadow in shadow_list without tbo.mem.start cause page fault in sriov TDR

PATCH In review wentalou 2 participants 2 messages Apr 12, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

wentalou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: shadow in shadow_list without tbo.mem.start cause page fault in sriov TDR

shadow was added into shadow_list by amdgpu_bo_create_shadow.
meanwhile, shadow->tbo.mem was not fully configured.
tbo.mem would be fully configured by amdgpu_vm_sdma_map_table until calling amdgpu_vm_clear_bo. If sriov TDR occurred between amdgpu_bo_create_shadow and amdgpu_vm_sdma_map_table, amdgpu_device_recover_vram would deal with shadow without tbo.mem.start.

Change-Id I1a6a69587d6c689d0a357dd495ee44833d0f0790
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 3785195..be88d06 100644
@@ -3184,6 +3184,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
 
 		/* No need to recover an evicted BO */
 		if (shadow->tbo.mem.mem_type != TTM_PL_TT ||
+		    shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET ||
 		    shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM)
 			continue;
 
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1555053230-5963-1-git-send-email-Wentao.Lou-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 12.04.19 um 09:13 schrieb wentalou:

Quoted 8 lines

shadow was added into shadow_list by amdgpu_bo_create_shadow.
meanwhile, shadow->tbo.mem was not fully configured.
tbo.mem would be fully configured by amdgpu_vm_sdma_map_table until calling amdgpu_vm_clear_bo. If sriov TDR occurred between amdgpu_bo_create_shadow and amdgpu_vm_sdma_map_table, amdgpu_device_recover_vram would deal with shadow without tbo.mem.start.

Change-Id I1a6a69587d6c689d0a357dd495ee44833d0f0790
Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 3785195..be88d06 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_recover_vram(struct amdgpu_device *adev) · line 3190

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
@@ -3184,6 +3184,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)
 
  		/* No need to recover an evicted BO */
  		if (shadow->tbo.mem.mem_type != TTM_PL_TT ||
+		    shadow->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET ||
  		    shadow->parent->tbo.mem.mem_type != TTM_PL_VRAM)
  			continue;
 

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx