[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aSTSZacbqy3hvKIe@willie-the-truck>
Date: Mon, 24 Nov 2025 21:47:17 +0000
From: Will Deacon <will@...nel.org>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Nicolin Chen <nicolinc@...dia.com>, robin.murphy@....com,
joro@...tes.org, kevin.tian@...el.com, praan@...gle.com,
linux-arm-kernel@...ts.infradead.org, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, skolothumtho@...dia.com
Subject: Re: [PATCH v2] iommu/arm-smmu-v3-iommufd: Allow attaching nested
domain for GBPA cases
On Mon, Nov 24, 2025 at 03:34:35PM -0400, Jason Gunthorpe wrote:
> On Mon, Nov 03, 2025 at 09:27:55AM -0800, Nicolin Chen wrote:
> > A vDEVICE has been a hard requirement for attaching a nested domain to the
> > device. This makes sense when installing a guest STE, since a vSID must be
> > present and given to the kernel during the vDEVICE allocation.
> >
> > But, when CR0.SMMUEN is disabled, VM doesn't really need a vSID to program
> > the vSMMU behavior as GBPA will take effect, in which case the vSTE in the
> > nested domain could have carried the bypass or abort configuration in GBPA
> > register. Thus, having such a hard requirement doesn't work well for GBPA.
> >
> > Skip vmaster allocation in arm_smmu_attach_prepare_vmaster() for an abort
> > or bypass vSTE. Note that device on this attachment won't report vevents.
> >
> > Update the uAPI doc accordingly.
> >
> > Tested-by: Shameer Kolothum <skolothumtho@...dia.com>
> > Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> > ---
> >
> > Changelog
> > v2
> > * Add Tested-by from Shameer
> > * Skip vmaster allocation instead of bypassing vsid=0
> > * Revise the uAPI doc to note a corner case when CR0.SMMUEN=1
> >
> > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-iommufd.c | 13 ++++++++++++-
> > include/uapi/linux/iommufd.h | 9 +++++++++
> > 2 files changed, 21 insertions(+), 1 deletion(-)
>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
>
> Will, I will grab this in a few days unless you want it in your tree
Sure, go for it.
Will
Powered by blists - more mailing lists