[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250924210228.GM2617119@nvidia.com>
Date: Wed, 24 Sep 2025 18:02:28 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: joro@...tes.org, bhelgaas@...gle.com, suravee.suthikulpanit@....com,
will@...nel.org, robin.murphy@....com, sven@...nel.org,
j@...nau.net, alyssa@...enzweig.io, neal@...pa.dev,
robin.clark@....qualcomm.com, m.szyprowski@...sung.com,
krzk@...nel.org, alim.akhtar@...sung.com, dwmw2@...radead.org,
baolu.lu@...ux.intel.com, kevin.tian@...el.com,
yong.wu@...iatek.com, matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com, tjeznach@...osinc.com,
paul.walmsley@...ive.com, palmer@...belt.com, aou@...s.berkeley.edu,
alex@...ti.fr, heiko@...ech.de, schnelle@...ux.ibm.com,
mjrosato@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
orsonzhai@...il.com, baolin.wang@...ux.alibaba.com,
zhang.lyra@...il.com, wens@...e.org, jernej.skrabec@...il.com,
samuel@...lland.org, jean-philippe@...aro.org, rafael@...nel.org,
lenb@...nel.org, yi.l.liu@...el.com, cwabbott0@...il.com,
quic_pbrahma@...cinc.com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, asahi@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-arm-msm@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-riscv@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-sunxi@...ts.linux.dev, linux-tegra@...r.kernel.org,
virtualization@...ts.linux.dev, linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org, patches@...ts.linux.dev,
vsethi@...dia.com, helgaas@...nel.org, etzhao1900@...il.com
Subject: Re: [PATCH v4 5/7] iommu: Add iommu_get_domain_for_dev_locked()
helper
On Wed, Sep 24, 2025 at 01:02:54PM -0700, Nicolin Chen wrote:
> On Wed, Sep 24, 2025 at 04:52:54PM -0300, Jason Gunthorpe wrote:
> > On Wed, Sep 24, 2025 at 12:49:14PM -0700, Nicolin Chen wrote:
> > > > I really wanted to say this should just always return the
> > > > default_domain, but it looks like host1x_client_iommu_detach() is the
> > > > only place outside the iommu drivers that would be unhappy with that.
> > >
> > > I suppose any external user that allocates/attaches a domain has a
> > > risk of potentially using this helper, in which case group->domain
> > > may not be default_domain?
> >
> > Yes, host1x seemed to be the only place that had that intersection.
>
> I meant, we cannot prevent others from calling it like host1x does?
>
> Even if we have those replacement APIs that we discussed last time,
> such a driver might still want its own domain v.s. default_domain,
> for pgsize or other use?
If a driver allocates its own domain and attaches it then it should be
able to track it and not need to ask the iommu subsystem to give it
back to them :)
Jason
Powered by blists - more mailing lists