drm/amdgpu: Send no-retry XNACK for all fault types
authorJay Cornwall <[email protected]>
Wed, 26 Apr 2017 19:51:57 +0000 (14:51 -0500)
committerAlex Deucher <[email protected]>
Fri, 14 Jul 2017 15:06:37 +0000 (11:06 -0400)
A subset of VM fault types currently send retry XNACK to the client.
This causes a storm of interrupts from the VM to the host.

Until the storm is throttled by other means send no-retry XNACK for
all fault types instead. No change in behavior to the client which
will stall indefinitely with the current configuration in any case.
Improves system stability under GC or MMHUB faults.

Signed-off-by: Jay Cornwall <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Reviewed-by: John Bridgman <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Acked-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c

index 3ff786cfc947a721cde948aa93dbe92ef0110b4a..008ad3dc4afdddb318b757f7077bfc34f8a36b8e 100644 (file)
@@ -206,6 +206,9 @@ static void gfxhub_v1_0_setup_vmid_config(struct amdgpu_device *adev)
                tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL,
                                PAGE_TABLE_BLOCK_SIZE,
                                adev->vm_manager.block_size - 9);
+               /* Send no-retry XNACK on fault to suppress VM fault storm. */
+               tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL,
+                                   RETRY_PERMISSION_OR_INVALID_PAGE_FAULT, 0);
                WREG32_SOC15_OFFSET(GC, 0, mmVM_CONTEXT1_CNTL, i, tmp);
                WREG32_SOC15_OFFSET(GC, 0, mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32, i*2, 0);
                WREG32_SOC15_OFFSET(GC, 0, mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32, i*2, 0);
index 0780e830b76bf1b8244835c01f374c61f4f380dd..96f1628541bbc9b79d48f93ad985a944fd2f0e37 100644 (file)
@@ -222,6 +222,9 @@ static void mmhub_v1_0_setup_vmid_config(struct amdgpu_device *adev)
                tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL,
                                PAGE_TABLE_BLOCK_SIZE,
                                adev->vm_manager.block_size - 9);
+               /* Send no-retry XNACK on fault to suppress VM fault storm. */
+               tmp = REG_SET_FIELD(tmp, VM_CONTEXT1_CNTL,
+                                   RETRY_PERMISSION_OR_INVALID_PAGE_FAULT, 0);
                WREG32_SOC15_OFFSET(MMHUB, 0, mmVM_CONTEXT1_CNTL, i, tmp);
                WREG32_SOC15_OFFSET(MMHUB, 0, mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_LO32, i*2, 0);
                WREG32_SOC15_OFFSET(MMHUB, 0, mmVM_CONTEXT1_PAGE_TABLE_START_ADDR_HI32, i*2, 0);