[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zw-CGb_BaLBaefIR@google.com>
Date: Wed, 16 Oct 2024 09:06:33 +0000
From: Pranjal Shrivastava <praan@...gle.com>
To: Peng Fan <peng.fan@....com>
Cc: Nicolin Chen <nicolinc@...dia.com>, Robin Murphy <robin.murphy@....com>,
"Peng Fan (OSS)" <peng.fan@....nxp.com>,
Will Deacon <will@...nel.org>, Joerg Roedel <joro@...tes.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Joy Zou <joy.zou@....com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH RFC 0/2] iommu/arm-smmu-v3: bypass streamid zero on i.MX95
On Wed, Oct 16, 2024 at 08:53:20AM +0000, Peng Fan wrote:
> > Subject: Re: [PATCH RFC 0/2] iommu/arm-smmu-v3: bypass streamid
> > zero on i.MX95
> >
> > On Wed, Oct 16, 2024 at 12:56:54AM +0000, Peng Fan wrote:
> > > > Subject: Re: [PATCH RFC 0/2] iommu/arm-smmu-v3: bypass
> > streamid zero
> > > > on i.MX95
> > > >
> > > > On 2024-10-15 4:14 am, Peng Fan (OSS) wrote:
> > > > > i.MX95 eDMA3 connects to DSU ACP, supporting dma coherent
> > > > memory to
> > > > > memory operations. However TBU is in the path between eDMA3
> > > > and ACP,
> > > > > need to bypass the default SID 0 to make eDMA3 work properly.
> > > >
> > > > I'm confused, why not just describe that the device owns this
> > > > StreamID in the DT the normal way, i.e, "iommus = <&smmu 0>;"?
> > >
> > > Current SMMU-v3 driver not support streamID sharing, but we have
> > > limited streamIDs(i.MX95 max supports 64 SIDs). However the eDMA
> > > supports 64 channels, each channel may have a SID, but not
> > supported
> > > by current smmuv3 driver.
> > >
> > > We see smmu would degrade the performance in somecases, so we
> > wanna to
> > > give user an option to bypass SMMU for eDMA.
> >
> > If it's a system-wise global need, adding "iommu.passthrough=y"
> > to the bootargs string should work for all trusted devices. And
>
> No. not system wide.
>
> > particular group can be changed to the IDENTITY domain too upon
> > cmdline setting, e.g.
> > echo identity | sudo tee
> > /sys/class/pci_bus/0009\:01/device/iommu_group/type
>
> This means I still need to put iommus = <&smmu 0> under
> the device tree node.
>
Yes, otherwise the bypassing an unassigned SID isn't something that the
community wouldn't prefer as it smashes a hole in security for everyone.
Does your hardware have a way all the devices can configure/program
SIDs or does the hardware have multiple devices that generate SID 0?
If it's programmable, I'd suggest reserving streamID 0 for bypass and
let the system work with the other 63.
Apart from that, if you can guarantee that the `eDMA3` would always
access a fixed region of memory, then maybe use RMRs to install bypass.
> Thanks,
> Peng.
>
> >
> > Thanks
> > Nicolin
>
Thanks,
Pranjal
Powered by blists - more mailing lists