Skip to contentSkip to conversation

drm/amdgpu: Add printing for RW extracted from VM_L2_PROTECTION_FAULT_STATUS

PATCH In review Zhao, Yong 1 participant 3 messages Aug 13, 2019 – Aug 14, 2019 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Zhao, Yong

author
#0 lore raw

PATCH 1/2 drm/amdgpu: Add printing for RW extracted from VM_L2_PROTECTION_FAULT_STATUS

RW is also useful in most cases.

Change-Id Icf4bd65ea168e5965a6a8ebe32ce9327a2de2851
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +3 -0
index 296e2d982578..ec5e858926ad 100644
@@ -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]

author
#2 lore raw

PATCH 2/2 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.

Change-Id Ic0b8381134340b83cd69c3fe186ac7a8a97b1bca
---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 33 ++++++++++++++++++++++----
 1 file changed, 28 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +28 -5
index 4e3ac1084a94..ead2d3bf8a8d 100644
@@ -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;
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]

A message that is not in the archive (sent off-list or not yet received): f4eee045-e4f3-c21b-a231-3417a1243800-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#5 lore raw

Pushed! Thanks.

Yong

Quoted 12 lines · Christian König

Am 13.08.19 um 20:08 schrieb Zhao, Yong:

Quoted 4 lines

RW is also useful in most cases.

Change-Id Icf4bd65ea168e5965a6a8ebe32ce9327a2de2851
Quoted 4 lines

---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 +++

  1 file changed, 3 insertions(+)
Quoted 16 lines
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0 -0
index 296e2d982578..ec5e858926ad 100644

drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c static int gmc_v9_0_process_interrupt(struct · line 395

Quoted 9 lines
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));
             }
       }

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