lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260127151313.GJ1134360@nvidia.com>
Date: Tue, 27 Jan 2026 11:13:13 -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 08/10] iommu/arm-smmu-v3: Introduce
 INV_TYPE_S2_VMID_VSMMU

On Wed, Jan 21, 2026 at 05:24:26PM -0800, Nicolin Chen wrote:
> A VMID held by a vSMMU is required to setup hardware (e.g. tegra241-cmdqv)
> during its initialization. So, it should be allocated in the ->viommu_init
> callback. This makes the VMID lifecycle unique than a VMID allocated for a
> naked S2 attachment.
> 
> Introduce an INV_TYPE_S2_VMID_VSMMU to accommodate this case.
> 
> Note that a second device attaching to a nested domain associated with the
> same vSMMU instance will have an INV_TYPE_S2_VMID_VSMMU and reuse the VMID
> held by the vSMMU. Devices attaching directly to the nesting parent domain
> will have an INV_TYPE_S2_VMID and shouldn't resue the VMID from the vSMMU.
> 
> Suggested-by: Jason Gunthorpe <jgg@...dia.com>
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> ---
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h |  1 +
>  drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 18 +++++++++++++++---
>  2 files changed, 16 insertions(+), 3 deletions(-)
>
> 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 386ac75879c0..8365660282d5 100644
> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h
> @@ -656,6 +656,7 @@ struct arm_smmu_cmdq_batch {
>  enum arm_smmu_inv_type {
>  	INV_TYPE_S1_ASID,
>  	INV_TYPE_S2_VMID,
> +	INV_TYPE_S2_VMID_VSMMU,
>  	INV_TYPE_S2_VMID_S1_CLEAR,
>  	INV_TYPE_ATS,
>  	INV_TYPE_ATS_FULL,

This should be moved earlier and probably some of the hunks merged
with the patch introducing the vsmmu vmid.

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ