[PATCH v2 3/3] drm/amdgpu: Workaround IOMMU driver bug

Zeng, Oak Oak.Zeng at amd.com
Fri May 21 14:06:11 UTC 2021


[Public]

Reviewed-by: oak zeng <oak.zeng at amd.com>


Get Outlook for Android<https://aka.ms/AAb9ysg>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Felix Kuehling <felix.kuehling at amd.com>
Sent: Friday, May 21, 2021 9:47:17 AM
To: Christian König <ckoenig.leichtzumerken at gmail.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Subject: Re: [PATCH v2 3/3] drm/amdgpu: Workaround IOMMU driver bug

Am 2021-05-21 um 4:41 a.m. schrieb Christian König:
> Am 21.05.21 um 04:22 schrieb Felix Kuehling:
>> The intel IOMMU driver causes kernel oopses or internal errors flooding
>> kernel log when mapping larger SG tables. Limiting the size of
>> userptr BOs
>> to 6GB seems to avoid this.
>>
>> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
>
> CC whoever is the maintainer of the Intel IOMMU driver?
>
> Would be nice to have that bug fixed instead.

Yeah, I'm not ready to submit this hack. I want to run some more
experiments to see what's going on.

Regards,
  Felix


>
> Christian.
>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> index 2b8b89535198..3becf9d9f8fd 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
>> @@ -1409,6 +1409,9 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(
>>           domain = alloc_domain = AMDGPU_GEM_DOMAIN_GTT;
>>           alloc_flags = 0;
>>       } else if (flags & KFD_IOC_ALLOC_MEM_FLAGS_USERPTR) {
>> +        /* workaround IOMMU driver bug */
>> +        if (size >= (6ULL << 30))
>> +            return -ENOMEM;
>>           domain = AMDGPU_GEM_DOMAIN_GTT;
>>           alloc_domain = AMDGPU_GEM_DOMAIN_CPU;
>>           alloc_flags = AMDGPU_GEM_CREATE_PREEMPTIBLE;
>
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Coak.zeng%40amd.com%7C123862fb48234bfa897008d91c5ef74d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637572016476523870%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=2HM3hcsYI7i5LWoaiyOUlWLvUHAhCdudGsBrpT7E73Y%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210521/ecc7d727/attachment.htm>


More information about the amd-gfx mailing list