[PATCH 2/2] drm/amdgpu: set the executable flag on unused Vega10 PTEs

Kuehling, Felix Felix.Kuehling at amd.com
Wed Jan 2 20:26:02 UTC 2019


Don't you need to update amdgpu_vm_clear_freed as well?

Regards,
  Felix

On 2019-01-02 8:35 a.m., Christian König wrote:
> 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 <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index e73d152659a2..01a68f4e17d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -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]);
>  


More information about the amd-gfx mailing list