Skip to contentSkip to conversation

drm/amdgpu/virt: skip VM fault handler for VF

PATCH In review Pixel Ding 2 participants 3 messages Feb 7, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Pixel Ding

author
#0 lore raw

PATCH 1/1 drm/amdgpu/virt: skip VM fault handler for VF

VF uses KIQ to access registers. When VM fault occurs, the driver can't get back the fence of KIQ submission and runs into CPU soft lockup.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +5 -0
index 7669b32..ff4fb37 100644
@@ -1237,6 +1237,11 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
 {
 	u32 addr, status, mc_client;
 
+	if (amdgpu_sriov_vf(adev)) {
+		dev_err(adev->dev, "GPU fault detected on VF, can't access VM registers\n");
+		return 0;
+	}
+
 	addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
 	status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
 	mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
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): 1486446538-7317-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Maybe we can get the some useful info from IV entry.

Regards,
Jerry (Junwei Zhang)

Linux Base Graphics
SRDC Software Development
_____________________________________

Quoted 38 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Pixel Ding
Sent: Tuesday, February 07, 2017 13:49
To: Zhou, David(ChunMing); Koenig, Christian
Cc: Ding, Pixel; [email protected]
Subject: [PATCH] drm/amdgpu/virt: skip VM fault handler for VF

VF uses KIQ to access registers. When VM fault occurs, the driver can't get back the fence of KIQ submission and runs into CPU soft lockup.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +5 -0
index 7669b32..ff4fb37 100644
@@ -1237,6 +1237,11 @@ static int gmc_v8_0_process_interrupt(struct
 amdgpu_device *adev,  {
 	u32 addr, status, mc_client;
 
+	if (amdgpu_sriov_vf(adev)) {
+		dev_err(adev->dev, "GPU fault detected on VF, can't access VM
 registers\n");
+		return 0;
+	}
+
 	addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
 	status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);

mc_client =
RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
--
2.7.4

Quoted 4 lines

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): DM5PR12MB181842F0CB88E25C56A0829AFF430-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw

Good point.
—
Sincerely Yours,
Pixel

Quoted 48 lines · Jerry

Maybe we can get the some useful info from IV entry.

Regards,
Jerry (Junwei Zhang)

Linux Base Graphics
SRDC Software Development
_____________________________________

Quoted 38 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Pixel Ding
Sent: Tuesday, February 07, 2017 13:49
To: Zhou, David(ChunMing); Koenig, Christian
Cc: Ding, Pixel; [email protected]
Subject: [PATCH] drm/amdgpu/virt: skip VM fault handler for VF

VF uses KIQ to access registers. When VM fault occurs, the driver can't get back the fence of KIQ submission and runs into CPU soft lockup.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +5 -0
index 7669b32..ff4fb37 100644
@@ -1237,6 +1237,11 @@ static int gmc_v8_0_process_interrupt(struct
 amdgpu_device *adev,  {
 	u32 addr, status, mc_client;
 
+	if (amdgpu_sriov_vf(adev)) {
+		dev_err(adev->dev, "GPU fault detected on VF, can't access VM
 registers\n");
+		return 0;
+	}
+
 	addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
 	status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);

mc_client =
RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
--
2.7.4

Quoted 4 lines
Quoted 4 lines

_______________________________________________
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