lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v6 01/11] iommu: Add dma ownership management interfaces
From
On 2022-02-24 05:29, Lu Baolu wrote:
> On 2/24/22 1:16 PM, Lu Baolu wrote:
>> Hi Robin and Jason,
>>
>> On 2/24/22 2:02 AM, Jason Gunthorpe wrote:
>>> On Wed, Feb 23, 2022 at 06:00:06PM +0000, Robin Murphy wrote:
>>>
>>>> ...and equivalently just set owner_cnt directly to 0 here. I don't
>>>> see a
>>>> realistic use-case for any driver to claim the same group more than
>>>> once,
>>>> and allowing it in the API just feels like opening up various potential
>>>> corners for things to get out of sync.
>>> I am Ok if we toss it out to get this merged, as there is no in-kernel
>>> user right now.
>>
>> So we don't need the owner pointer in the API anymore, right?
>
> Oh, NO.
>
> The owner token represents that the group has been claimed for user
> space access. And the default domain auto-attach policy will be changed
> accordingly.
>
> So we still need this. Sorry for the noise.

Exactly. In fact we could almost go the other way, and rename owner_cnt
to dma_api_users and make it mutually exclusive with owner being set,
but that's really just cosmetic. It's understandable enough as-is that
owner_cnt > 0 with owner == NULL represents implicit DMA API ownership.

Cheers,
Robin.

\
 
 \ /
  Last update: 2022-02-24 09:59    [W:0.420 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site