[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN5r5q4j8hcuvYt/@nvidia.com>
Date: Thu, 17 Aug 2023 15:50:14 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Michael Shavit <mshavit@...gle.com>
Cc: iommu@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, will@...nel.org, nicolinc@...dia.com,
tina.zhang@...el.com, jean-philippe@...aro.org,
robin.murphy@....com
Subject: Re: [RFC PATCH v1 6/8] iommu/arm-smmu-v3: Free VMID when
uninstalling domain from SMMU
On Fri, Aug 18, 2023 at 02:16:28AM +0800, Michael Shavit wrote:
> This will allow installing a domain onto multiple smmu devices.
>
> Signed-off-by: Michael Shavit <mshavit@...gle.com>
> ---
>
> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
The VMID is basically a different ASID, eg ASID is the cahage tag for
a S1 and VMID is the cache tag for S2.
It is strange that it has a different lifecycle. It seems like the
issue is that the VMID IDA is per smmu while the ASID xarray is
global?
So, I'd suggest consistency. Either the domain ASID/VMID is global and
assigned at allocation time.
Or it is local to the instance, assigned at bind time, and stored in
the domain's attached device list. Some logic is needed to optimize
this - probably keep the instance list sorted by instance.
Having per-instance cache-tags avoids the limit problem a prior patch
was struggling with, at the cost of some more complexity in other
places.
Jason
Powered by blists - more mailing lists