lkml.org 
[lkml]   [2023]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 7/7] iommu/arm-smmu-v3: Move CD table to arm_smmu_master
On Fri, Jul 28, 2023 at 07:11:46PM +0800, Michael Shavit wrote:
> On Fri, Jul 28, 2023 at 2:43 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> > Then you can put the free in a detach op once the CD table becomes
> > empty and it behaves much like it already does.
>
> This turns out to be a bit tricky; the SMMU driver detaches the
> currently attached domain whenever a new domain is attached with
> attach_dev().

Oh, yeah, it is a bit quirky that way

> More generally, do we really want to be de-allocating
> the table whenever we switch between an S1 domain and other domain
> types that don't make use of the table (such as IDENTITY or NESTED)?

Probably.

> One solution is to defer the allocation to the first attach_op, but
> only free when the master is freed (this patch's v1 behavior).

That seems reasonable, just don't allocate it at probe time since
PASID is very rarely used.

Jason

\
 
 \ /
  Last update: 2023-07-28 14:27    [W:0.046 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site