[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZN5vk9cVp0j0jd8T@nvidia.com>
Date: Thu, 17 Aug 2023 16:05:55 -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 1/8] iommu/arm-smmu-v3: Add list of installed_smmus
On Fri, Aug 18, 2023 at 02:16:23AM +0800, Michael Shavit wrote:
> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
> index 83d2790b701e7..a9202d2045537 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
> @@ -690,12 +690,20 @@ struct arm_smmu_stream {
> struct rb_node node;
> };
>
> +/* List of smmu devices that a domain is installed to */
> +struct arm_smmu_installed_smmu {
> + struct list_head list;
'installed_smmus_item'
> + /* List of masters that the domain is attached to*/
> + struct list_head devices;
> + struct arm_smmu_device *smmu;
> +};
Ah, if you have this struct you could just put
u32 cache_tag; // ASID or VMID depending on domain type
And make both allocators local to the instance.
AFAIK the only specific thing that needs a global ASID is the SVA BTM
stuff and it already has code to handle collisions, it can just run
that code per-instance.
> /* SMMU private data for each master */
> struct arm_smmu_master {
> struct arm_smmu_device *smmu;
> struct device *dev;
> struct arm_smmu_domain *domain;
> - struct list_head domain_head;
> + struct list_head list;
What is list for now?
Jason
Powered by blists - more mailing lists