lkml.org 
[lkml]   [2021]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions()
From
Date
On 2021/12/6 19:56, Joerg Roedel wrote:
> On Tue, Nov 16, 2021 at 05:06:20PM +0800, Yicong Yang wrote:
>> Export iommu_{get,put}_resv_regions() to the modules so that the driver
>> can retrieve and use the reserved regions of the device.
>
> Why should any driver bother? These functions are only used by the iommu
> core to call into iommu drivers to get information about needed direct
> mappings. Why drivers need this information belongs into this commit
> message.
>

Our driver makes use of RMR[1], so we need these APIs to retrieve the reserved
memory region in the driver. The device will store the traced data to
the rmr memory and the drivers needs to know the memory address for reading
the data. Due to some hardware limitation, the device can only use direct
mapping for DMA so we need RMR when the iommu is presented and the policy
of the iommu domain is not passthrough.

[1] https://lore.kernel.org/linux-acpi/20210805080724.480-1-shameerali.kolothum.thodi@huawei.com/

Thanks,
Yicong

\
 
 \ /
  Last update: 2021-12-06 13:57    [W:1.914 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site