Don't update the fault cache if status is 0. In the multiple fault case, subsequent faults will return a 0 status which is useless for userspace and replaces the useful fault status, so only update if status is non-0.
Unified · Split
| @@ -2753,7 +2753,12 @@ void amdgpu_vm_update_fault_cache(struct amdgpu_device *adev, · 2752 unmodified lines | |||
| 2753 | xa_lock_irqsave(&adev->vm_manager.pasids, flags); | 2753 | xa_lock_irqsave(&adev->vm_manager.pasids, flags); |
| 2754 | 2754 | ||
| 2755 | vm = xa_load(&adev->vm_manager.pasids, pasid); | 2755 | vm = xa_load(&adev->vm_manager.pasids, pasid); |
| 2756 | if (vm) { | 2756 | /* Don't update the fault cache if status is 0. In the multiple |
| 2757 | * fault case, subsequent faults will return a 0 status which is | ||
| 2758 | * useless for userspace and replaces the useful fault status, so | ||
| 2759 | * only update if status is non-0. | ||
| 2760 | */ | ||
| 2761 | if (vm && status) { | ||
| 2757 | vm->fault_info.addr = addr; | 2762 | vm->fault_info.addr = addr; |
| 2758 | vm->fault_info.status = status; | 2763 | vm->fault_info.status = status; |
| 2759 | if (AMDGPU_IS_GFXHUB(vmhub)) { | 2764 | if (AMDGPU_IS_GFXHUB(vmhub)) { |