drm/amdgpu: improve GMC v9 page fault message
Subsystems (2)
PATCH 1/2 drm/amdgpu: improve GMC v9 page fault message
Note if this is a retry fault or not and cleanup the message a bit.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +4 -1
@@ -305,6 +305,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev, struct amdgpu_iv_entry *entry) {struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src]; +bool retry_fault = !!(entry->src_data[1 ] &0x80 );uint32_t status =0 ;u64 addr;
@@ -326,8 +327,10 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,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, for process %s pid %d thread %s pid %d)\n" , +"[%s] %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" , + retry_fault ?"retry" :"no-retry" , entry->src_id, entry->ring_id, entry->vmid, entry->pasid, task_info.process_name, task_info.tgid, task_info.task_name, task_info.pid);
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): 20190102133506.110324-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu: set the executable flag on unused Vega10 PTEs
Otherwise we run into a non-retry fault on access.
It seems to be a hardware bug that the executable bit has higher priority than the valid bit.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +8 -2
@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, addr += ats_entries *8 ; } -if (entries) +if (entries) { +uint64_t value =0 ; + +if (level ==AMDGPU_VM_PTB && adev->asic_type >=CHIP_VEGA10 ) + value =AMDGPU_PTE_EXECUTABLE ; +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], addr,0 , - entries,0 ,0 ); + entries,0 , value); + }amdgpu_ring_pad_ib (ring, &job->ibs[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): 20190102133506.110324-2-christian.koenig-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Acked-byRe: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs
Series is:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <[email protected]>
Sent: Wednesday, January 2, 2019 8:35:06 AM
To: [email protected]
Subject: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs
Otherwise we run into a non-retry fault on access.
It seems to be a hardware bug that the executable bit has higher priority than the valid bit.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +8 -2
@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, addr += ats_entries *8 ; } -if (entries) +if (entries) { +uint64_t value =0 ; + +if (level ==AMDGPU_VM_PTB && adev->asic_type >=CHIP_VEGA10 ) + value =AMDGPU_PTE_EXECUTABLE ; +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], addr,0 , - entries,0 ,0 ); + entries,0 , value); + }amdgpu_ring_pad_ib (ring, &job->ibs[0 ]);
--
2.17.1
_______________________________________________
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
Re: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs
In reply to a message not in the archiveDon't you need to update amdgpu_vm_clear_freed as well?
Regards,
Felix
Quoted 22 lines · Christian König
Otherwise we run into a non-retry fault on access.
It seems to be a hardware bug that the executable bit has higher priority than the valid bit.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3
-1@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, addr += ats_entries *8 ; } -if (entries) +if (entries) { +uint64_t value =0 ; +
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 813
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5
-1+if (level ==AMDGPU_VM_PTB && adev->asic_type >=CHIP_VEGA10 ) + value =AMDGPU_PTE_EXECUTABLE ; +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], addr,0 , - entries,0 ,0 ); + entries,0 , value); + }amdgpu_ring_pad_ib (ring, &job->ibs[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): 28ccb2db-f54f-110a-dd7e-89c38a8bed81-5C7GfCeVMHo@public.gmane.org
Re: [PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs
Oh, good point. Completely forgot about those.
Going to fix the patch,
Christian.
Am 02.01.19 um 21:26 schrieb Kuehling, Felix:
Quoted 36 lines
Don't you need to update
amdgpu_vm_clear_freedas well?Regards,
FelixQuoted 30 lines · Christian König
Otherwise we run into a non-retry fault on access.
It seems to be a hardware bug that the executable bit has higher priority than the valid bit.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +8
-2@@ -799,9 +799,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, addr += ats_entries *8 ; } -if (entries) +if (entries) { +uint64_t value =0 ; + +if (level ==AMDGPU_VM_PTB && adev->asic_type >=CHIP_VEGA10 ) + value =AMDGPU_PTE_EXECUTABLE ; +amdgpu_vm_set_pte_pde (adev, &job->ibs[0 ], addr,0 , - entries,0 ,0 ); + entries,0 , value); + }
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, · line 813
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0amdgpu_ring_pad_ib (ring, &job->ibs[0 ]);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx