[PATCH] drm/amd/amdgpu: Fix iova debugfs for non-iommu case
Christian König
christian.koenig at amd.com
Tue Sep 19 17:18:18 UTC 2017
Am 19.09.2017 um 19:14 schrieb Tom St Denis:
> On 19/09/17 01:10 PM, Christian König wrote:
>> As far as I know we don't need #ifdefs cause there are dummy
>> functions when IOMMU is not compiled in.
>>
>> But this patch is a NAK since it circumvents the /dev/mem restriction
>> when IOMMU is disabled and that is not something we can easily allow.
>
> I raised this objection 24 hours ago and was told to go ahead with the
> read/write methods anyways.
>
> Short of making a list of mappings/allocations in the ttm layer I have
> no idea how we would track this in the non-iommu case which means the
> entire iova debugfs entry should have been NAK'ed in the first place.
>
> I'm open to suggestions.
As long as IOMMU is enabled the entry is perfectly fine, cause only
memory mapped to the IOMMU is accessible to the GPU and so accessible
using the debugfs entry as well.
Only when IOMMU is disabled we can't go this way cause we can't know
which memory is mapped to the driver and which isn't (or could we
somehow track this?).
I suggest to not create the file in the first place if IOMMU is disabled.
Christian.
>
> Tom
More information about the amd-gfx
mailing list