[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220624184628.GY4147@nvidia.com>
Date: Fri, 24 Jun 2022 15:46:28 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: joro@...tes.org, will@...nel.org, marcan@...can.st,
sven@...npeter.dev, robin.murphy@....com, robdclark@...il.com,
baolu.lu@...ux.intel.com, matthias.bgg@...il.com,
orsonzhai@...il.com, baolin.wang7@...il.com, zhang.lyra@...il.com,
jean-philippe@...aro.org, alex.williamson@...hat.com,
kevin.tian@...el.com, suravee.suthikulpanit@....com,
alyssa@...enzweig.io, dwmw2@...radead.org, yong.wu@...iatek.com,
mjrosato@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
thierry.reding@...il.com, vdumpa@...dia.com, jonathanh@...dia.com,
cohuck@...hat.com, thunder.leizhen@...wei.com, tglx@...utronix.de,
chenxiang66@...ilicon.com, christophe.jaillet@...adoo.fr,
john.garry@...wei.com, yangyingliang@...wei.com,
jordan@...micpenguin.net, iommu@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-mediatek@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-tegra@...r.kernel.org,
virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org
Subject: Re: [PATCH v3 3/5] vfio/iommu_type1: Remove the domain->ops
comparison
On Fri, Jun 24, 2022 at 03:28:33PM -0300, Jason Gunthorpe wrote:
> On Thu, Jun 23, 2022 at 01:00:27PM -0700, Nicolin Chen wrote:
> > The domain->ops validation was added, as a precaution, for mixed-driver
> > systems.
> >
> > Per Robin's remarks,
> > * While bus_set_iommu() still exists, the core code prevents multiple
> > drivers from registering, so we can't really run into a situation of
> > having a mixed-driver system:
> > https://lore.kernel.org/kvm/6e1280c5-4b22-ebb3-3912-6c72bc169982@arm.com/
> >
> > * And there's plenty more significant problems than this to fix; in future
> > when many can be permitted, we will rely on the IOMMU core code to check
> > the domain->ops:
> > https://lore.kernel.org/kvm/6575de6d-94ba-c427-5b1e-967750ddff23@arm.com/
> >
> > So remove the check in VFIO for simplicity.
>
> As discussed we can't remove this check, multiple iommus on different
> busses are allowed today and VFIO does not restrict its attempts to
> attach a pre-existing domain to a single group or bus.
>
> Please go back to the original version with the ops check in the core
> code.
Robin convinced me, so never mind :)
Jason
Powered by blists - more mailing lists