[PATCH] drm/amdkfd: Insert missing TLB flush on GFX10 and later

Christian König ckoenig.leichtzumerken at gmail.com
Wed Sep 13 08:25:48 UTC 2023


Am 11.09.23 um 21:00 schrieb Harish Kasiviswanathan:
> Heavy-weight TLB flush is required after unmap on all GPUs for
> correctness and security.
>
> Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com>

Acked-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> index b315311dfe2a..b9950074aee0 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
> @@ -1466,8 +1466,7 @@ void kfd_flush_tlb(struct kfd_process_device *pdd, enum TLB_FLUSH_TYPE type);
>   
>   static inline bool kfd_flush_tlb_after_unmap(struct kfd_dev *dev)
>   {
> -	return KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 3) ||
> -	       KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 2) ||
> +	return KFD_GC_VERSION(dev) > IP_VERSION(9, 4, 2) ||
>   	       (KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 1) && dev->sdma_fw_version >= 18) ||
>   	       KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 0);
>   }



More information about the amd-gfx mailing list