[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260126211636.GB1134360@nvidia.com>
Date: Mon, 26 Jan 2026 17:16:36 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: will@...nel.org, robin.murphy@....com, joro@...tes.org, jpb@...nel.org,
praan@...gle.com, miko.lenczewski@....com,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH v2 06/10] iommu/arm-smmu-v3: Allocate vmid in
arm_vsmmu_init
On Wed, Jan 21, 2026 at 05:24:24PM -0800, Nicolin Chen wrote:
> VMID owned by a vSMMU should be allocated in the viommu_init callback, as
> HW like tegra241-cmdqv needs to setup VINTF with the VMID.
Even the architected SMMU needs this, the VMS (not implemented in
Linux) should all share the same VMID for the same VM.
> +void arm_vsmmu_destroy(struct iommufd_viommu *viommu)
> +{
> + struct arm_vsmmu *vsmmu = container_of(viommu, struct arm_vsmmu, core);
> +
> + mutex_lock(&arm_smmu_asid_lock);
> + ida_free(&vsmmu->smmu->vmid_map, vsmmu->vmid);
> + mutex_unlock(&arm_smmu_asid_lock);
Need a comment explaining where the flush is.
It looks like arm_smmu_iotlb_tag_free() does the free in the case of
INV_TYPE_S2_VMID_VSMMU?
But this patch doesn't have that code yet. So maybe this should be
merged with the next patch..
Jason
Powered by blists - more mailing lists