[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1a22fecf-9cba-76f8-7dc4-88a56b2457cd@linux.intel.com>
Date: Tue, 4 Jan 2022 09:53:47 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: baolu.lu@...ux.intel.com, Robin Murphy <robin.murphy@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joerg Roedel <joro@...tes.org>,
Alex Williamson <alex.williamson@...hat.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Kevin Tian <kevin.tian@...el.com>,
Ashok Raj <ashok.raj@...el.com>, Will Deacon <will@...nel.org>,
Dan Williams <dan.j.williams@...el.com>, rafael@...nel.org,
Diana Craciun <diana.craciun@....nxp.com>,
Cornelia Huck <cohuck@...hat.com>,
Eric Auger <eric.auger@...hat.com>,
Liu Yi L <yi.l.liu@...el.com>,
Jacob jun Pan <jacob.jun.pan@...el.com>,
Chaitanya Kulkarni <kch@...dia.com>,
Stuart Yoder <stuyoder@...il.com>,
Laurentiu Tudor <laurentiu.tudor@....com>,
Thierry Reding <thierry.reding@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>,
Li Yang <leoyang.li@....com>,
Dmitry Osipenko <digetx@...il.com>,
iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 07/13] iommu: Add iommu_at[de]tach_device_shared() for
multi-device groups
On 12/24/21 10:50 AM, Jason Gunthorpe wrote:
>>> We don't need _USER anymore because iommu_group_set_dma_owner() always
>>> does detatch, and iommu_replace_group_domain() avoids ever reassigning
>>> default_domain. The sepecial USER behavior falls out automatically.
>> This means we will grow more group-centric interfaces. My understanding
>> is the opposite that we should hide the concept of group in IOMMU
>> subsystem, and the device drivers only faces device specific interfaces.
> Ideally group interfaces would be reduced, but in this case VFIO needs
> the group. It has sort of a fundamental problem with its uAPI that
> expects the container is fully setup with a domain at the moment the
> group is attached. So deferring domain setup to when the device is
> available becomes a user visible artifact - and if this is important
> or not is a whole research question that isn't really that important
> for this series.
>
> We also can't just pull a device out of thin air, a device that hasn't
> been probed() hasn't even had dma_configure called! Let alone the
> lifetime and locking problems with that kind of idea.
>
> So.. leaving it as a group interface makes the most sense,
> particularly for this series which is really about fixing the sharing
> model in the iommu core and deleting the BUG_ONs.
I feel it makes more sense if we leave the attach_device/group
refactoring patches into a separated series. I will come up with this
new series so that people can review and comment on the real code.
Best regards,
baolu
Powered by blists - more mailing lists