drm/amdgpu: Add more page fault info printing for GFX10
Subsystems (2)
PATCH 1/1 drm/amdgpu: Add more page fault info printing for GFX10
The printing we did for GFX9 was not propogated to GFX10 somehow, so fix it now.
--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++++++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++- 2 files changed, 32 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +28 -5
@@ -140,17 +140,40 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev, }if (printk_ratelimit ()) { +struct amdgpu_task_info task_info; + +memset (&task_info,0 ,sizeof (struct amdgpu_task_info )); +amdgpu_vm_get_task_info (adev, entry->pasid, &task_info); +dev_err (adev->dev, -"[%s] VMC page fault (src_id:%u ring:%u vmid:%u pasid:%u)\n" , +"[%s] page fault (src_id:%u ring:%u vmid:%u pasid:%u, " +"for process:%s pid:%d thread:%s pid:%d)\n" , entry->vmid_src ?"mmhub" :"gfxhub" , entry->src_id, entry->ring_id, entry->vmid, - entry->pasid); -dev_err (adev->dev," at page 0x%016llx from %d\n" , + entry->pasid, task_info.process_name, task_info.tgid, + task_info.task_name, task_info.pid); +dev_err (adev->dev," in page starting at address 0x%016llx from client %d\n" , addr, entry->client_id); -if (!amdgpu_sriov_vf (adev)) +if (!amdgpu_sriov_vf (adev)) {dev_err (adev->dev, -"VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n" , +"GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n" , status); +dev_err (adev->dev,"\t MORE_FAULTS: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,MORE_FAULTS )); +dev_err (adev->dev,"\t WALKER_ERROR: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,WALKER_ERROR )); +dev_err (adev->dev,"\t PERMISSION_FAULTS: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,PERMISSION_FAULTS )); +dev_err (adev->dev,"\t MAPPING_ERROR: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,MAPPING_ERROR )); +dev_err (adev->dev,"\t RW: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,RW )); + } }return 0 ;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4 -1
@@ -364,7 +364,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev, "[%s] %s page fault (src_id:%u ring:%u vmid:%u " - "pasid:%u, for process %s pid %d thread %s pid %d)\n", + "pasid:%u, for process:%s pid:%d thread:%s pid:%d)\n", hub_name, retry_fault ? "retry" : "no-retry", entry->src_id, entry->ring_id, entry->vmid, entry->pasid, task_info.process_name, task_info.tgid,
@@ -387,6 +387,9 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,dev_err (adev->dev,"\t MAPPING_ERROR: 0x%lx\n" ,REG_GET_FIELD (status,VM_L2_PROTECTION_FAULT_STATUS ,MAPPING_ERROR )); +dev_err (adev->dev,"\t RW: 0x%lx\n" , +REG_GET_FIELD (status, +VM_L2_PROTECTION_FAULT_STATUS ,RW )); } }
Signature · 6 lines
2.17.1 _______________________________________________ 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): [email protected]
Am 12.08.19 um 21:05 schrieb Zhao, Yong:
Quoted 65 lines
The printing we did for GFX9 was not propogated to GFX10 somehow, so fix it now.
Change-Id Ic0b8381134340b83cd69c3fe186ac7a8a97b1bcaSigned-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++++++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++- 2 files changed, 32 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +28
-5@@ -140,17 +140,40 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev, }if (printk_ratelimit ()) { +struct amdgpu_task_info task_info; + +memset (&task_info,0 ,sizeof (struct amdgpu_task_info )); +amdgpu_vm_get_task_info (adev, entry->pasid, &task_info); +dev_err (adev->dev, -"[%s] VMC page fault (src_id:%u ring:%u vmid:%u pasid:%u)\n" , +"[%s] page fault (src_id:%u ring:%u vmid:%u pasid:%u, " +"for process:%s pid:%d thread:%s pid:%d)\n" , entry->vmid_src ?"mmhub" :"gfxhub" , entry->src_id, entry->ring_id, entry->vmid, - entry->pasid); -dev_err (adev->dev," at page 0x%016llx from %d\n" , + entry->pasid, task_info.process_name, task_info.tgid, + task_info.task_name, task_info.pid); +dev_err (adev->dev," in page starting at address 0x%016llx from client %d\n" , addr, entry->client_id); -if (!amdgpu_sriov_vf (adev)) +if (!amdgpu_sriov_vf (adev)) {dev_err (adev->dev, -"VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n" , +"GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n" , status); +dev_err (adev->dev,"\t MORE_FAULTS: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,MORE_FAULTS )); +dev_err (adev->dev,"\t WALKER_ERROR: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,WALKER_ERROR )); +dev_err (adev->dev,"\t PERMISSION_FAULTS: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,PERMISSION_FAULTS )); +dev_err (adev->dev,"\t MAPPING_ERROR: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,MAPPING_ERROR )); +dev_err (adev->dev,"\t RW: 0x%lx\n" , +REG_GET_FIELD (status, +GCVM_L2_PROTECTION_FAULT_STATUS ,RW )); + } }return 0 ;drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, · line 367
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-1@@ -364,7 +364,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev, "[%s] %s page fault (src_id:%u ring:%u vmid:%u " - "pasid:%u, for process %s pid %d thread %s pid %d)\n", + "pasid:%u, for process:%s pid:%d thread:%s pid:%d)\n",
I think the text actually looks better without the ":".
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, · line 392
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3
-0hub_name, retry_fault ?"retry" :"no-retry" , entry->src_id, entry->ring_id, entry->vmid, entry->pasid, task_info.process_name, task_info.tgid,@@ -387,6 +387,9 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,dev_err (adev->dev,"\t MAPPING_ERROR: 0x%lx\n" ,REG_GET_FIELD (status,VM_L2_PROTECTION_FAULT_STATUS ,MAPPING_ERROR )); +dev_err (adev->dev,"\t RW: 0x%lx\n" , +REG_GET_FIELD (status, +VM_L2_PROTECTION_FAULT_STATUS ,RW ));
That should probably be a separate patch since it is fixing gfx9.
Apart from that the patch looks good to me,
Christian.
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, · line 394
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0} }
_______________________________________________
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): b8fd8285-12f8-373d-022f-e846dbb99efc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Hi Christian,
I feel with ":" it is better, because without it I found it is not easy to interpret the printing. Moreover, it continues the format of the former part.
It looks like this:
[ 190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 ring:0 vmid:8 pasid:32771, for process:kfdtest pid:3273 thread:kfdtest pid:3273)
vs without ":"
[ 190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 ring:0 vmid:8 pasid:32771, for process kfdtest pid 3273 thread kfdtest pid 3273)
If you are not convinced, I can change it to without ":".
Regards,
Yong
Quoted 91 lines · Christian König
Am 12.08.19 um 21:05 schrieb Zhao, Yong:
Quoted 70 lines
The printing we did for GFX9 was not propogated to GFX10 somehow, so fix it now.
Change-Id Ic0b8381134340b83cd69c3fe186ac7a8a97b1bcaSigned-off-by Yong Zhao <[email protected]>---
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c| 33 ++++++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++-2 files changed, 32 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +28
-5@@ -140,17 +140,40 @@ static int gmc_v10_0_process_interrupt(structamdgpu_device *adev, } if (printk_ratelimit()) { + struct amdgpu_task_info task_info; + + memset(&task_info, 0, sizeof(struct amdgpu_task_info)); + amdgpu_vm_get_task_info(adev, entry->pasid, &task_info); + dev_err(adev->dev, - "[%s] VMC page fault (src_id:%u ring:%u vmid:%u pasid:%u)\n", + "[%s] page fault (src_id:%u ring:%u vmid:%u pasid:%u, " + "for process:%s pid:%d thread:%s pid:%d)\n", entry->vmid_src ? "mmhub" : "gfxhub", entry->src_id, entry->ring_id, entry->vmid, - entry->pasid); - dev_err(adev->dev, " at page 0x%016llx from %d\n", + entry->pasid, task_info.process_name, task_info.tgid, + task_info.task_name, task_info.pid); + dev_err(adev->dev, " in page starting at address 0x%016llx from client %d\n", addr, entry->client_id); - if (!amdgpu_sriov_vf(adev)) + if (!amdgpu_sriov_vf(adev)) { dev_err(adev->dev, - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", + "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", status); + dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS)); + dev_err(adev->dev, "\t WALKER_ERROR: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, WALKER_ERROR)); + dev_err(adev->dev, "\t PERMISSION_FAULTS: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, PERMISSION_FAULTS)); + dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR)); + dev_err(adev->dev, "\t RW: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, RW)); + } }return 0;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0@@ -364,7 +364,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev,Quoted 3 lines
"[%s] %s page fault (src_id:%u ring:%u vmid:%u " - "pasid:%u, for process %s pid %d thread %s pid %d)\n", + "pasid:%u, for process:%s pid:%d thread:%s pid:%d)\n",
I think the text actually looks better without the ":".
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct · line 393
Quoted 11 lines
hub_name,retry_fault? "retry" : "no-retry",entry->src_id,entry->ring_id,entry->vmid,entry->pasid, task_info.process_name, task_info.tgid,drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3
-0@@ -387,6 +387,9 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n", REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR)); + dev_err(adev->dev, "\t RW: 0x%lx\n", + REG_GET_FIELD(status, + VM_L2_PROTECTION_FAULT_STATUS, RW));That should probably be a separate patch since it is fixing gfx9.
Quoted 6 lines
Apart from that the patch looks good to me,
Christian.Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0} }
_______________________________________________
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): 2da6884f-fcbf-e1ba-9150-28609dd16c2b-5C7GfCeVMHo@public.gmane.org
Hi Yong,
that is an intentional differentiation.
The values behind the ":" are hardware values from the page faults interrupt vector.
All values printed without the ":" are additional things we get from the kernel task information based on the pasid.
Please keep that,
Christian.
Am 12.08.19 um 21:20 schrieb Zhao, Yong:
Quoted 119 lines
Hi Christian,
I feel with ":" it is better, because without it I found it is not easy to interpret the printing. Moreover, it continues the format of the former part.
It looks like this:
[ 190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 ring:0 vmid:8 pasid:32771, for process:kfdtest pid:3273 thread:kfdtest pid:3273)
vs without ":"
[ 190.686668] amdgpu 0000:03:00.0: [gfxhub0] retry page fault (src_id:0 ring:0 vmid:8 pasid:32771, for process kfdtest pid 3273 thread kfdtest pid 3273)
If you are not convinced, I can change it to without ":".
Regards,
Yong
Quoted 92 lines · Christian König
Am 12.08.19 um 21:05 schrieb Zhao, Yong:
Quoted 68 lines
The printing we did for GFX9 was not propogated to GFX10 somehow, so fix it now.
Change-Id Ic0b8381134340b83cd69c3fe186ac7a8a97b1bcaSigned-off-by Yong Zhao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++++++++++++++++++++++---- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 +++- 2 files changed, 32 insertions(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +28
-5@@ -140,17 +140,40 @@ static int gmc_v10_0_process_interrupt(structamdgpu_device *adev, } if (printk_ratelimit()) { + struct amdgpu_task_info task_info; + + memset(&task_info, 0, sizeof(struct amdgpu_task_info)); + amdgpu_vm_get_task_info(adev, entry->pasid, &task_info); + dev_err(adev->dev, - "[%s] VMC page fault (src_id:%u ring:%u vmid:%u pasid:%u)\n", + "[%s] page fault (src_id:%u ring:%u vmid:%u pasid:%u, " + "for process:%s pid:%d thread:%s pid:%d)\n", entry->vmid_src ? "mmhub" : "gfxhub", entry->src_id, entry->ring_id, entry->vmid, - entry->pasid); - dev_err(adev->dev, " at page 0x%016llx from %d\n", + entry->pasid, task_info.process_name, task_info.tgid, + task_info.task_name, task_info.pid); + dev_err(adev->dev, " in page starting at address 0x%016llx from client %d\n", addr, entry->client_id); - if (!amdgpu_sriov_vf(adev)) + if (!amdgpu_sriov_vf(adev)) { dev_err(adev->dev, - "VM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", + "GCVM_L2_PROTECTION_FAULT_STATUS:0x%08X\n", status); + dev_err(adev->dev, "\t MORE_FAULTS: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, MORE_FAULTS)); + dev_err(adev->dev, "\t WALKER_ERROR: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, WALKER_ERROR)); + dev_err(adev->dev, "\t PERMISSION_FAULTS: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, PERMISSION_FAULTS)); + dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR)); + dev_err(adev->dev, "\t RW: 0x%lx\n", + REG_GET_FIELD(status, + GCVM_L2_PROTECTION_FAULT_STATUS, RW)); + } }return 0;
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct · line 367
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-1@@ -364,7 +364,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev, "[%s] %s page fault (src_id:%u ring:%u vmid:%u " - "pasid:%u, for process %s pid %d thread %s pid %d)\n", + "pasid:%u, for process:%s pid:%d thread:%s pid:%d)\n",I think the text actually looks better without the ":".
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct · line 393
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3
-0hub_name, retry_fault ? "retry" : "no-retry", entry->src_id, entry->ring_id, entry->vmid, entry->pasid, task_info.process_name, task_info.tgid,@@ -387,6 +387,9 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, dev_err(adev->dev, "\t MAPPING_ERROR: 0x%lx\n", REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, MAPPING_ERROR)); + dev_err(adev->dev, "\t RW: 0x%lx\n", + REG_GET_FIELD(status, + VM_L2_PROTECTION_FAULT_STATUS, RW));That should probably be a separate patch since it is fixing gfx9.
Apart from that the patch looks good to me,
Christian.
Quoted 6 lines
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct · line 395
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0} }_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx