From: Alex Williamson <alex.williamson@redhat.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] vfio/type1: Simplify bus_type determination
Date: Thu, 23 Jun 2022 14:35:52 -0600 [thread overview]
Message-ID: <20220623143552.634779e0.alex.williamson@redhat.com> (raw)
In-Reply-To: <BN9PR11MB5276A79834CCB5954A3025DF8CB59@BN9PR11MB5276.namprd11.prod.outlook.com>
On Thu, 23 Jun 2022 08:46:45 +0000
"Tian, Kevin" <kevin.tian@intel.com> wrote:
> > From: Alex Williamson <alex.williamson@redhat.com>
> > Sent: Thursday, June 23, 2022 6:17 AM
> >
> > >
> > > ret = -EIO;
> > > - domain->domain = iommu_domain_alloc(bus);
> > > + domain->domain = iommu_domain_alloc(iommu_api_dev->dev-
> > >bus);
> >
> > It makes sense to move away from a bus centric interface to iommu ops
> > and I can see that having a device interface when we have device level
> > address-ability within a group makes sense, but does it make sense to
> > only have that device level interface? For example, if an iommu_group
> > is going to remain an aspect of the iommu subsystem, shouldn't we be
> > able to allocate a domain and test capabilities based on the group and
> > the iommu driver should have enough embedded information reachable
> > from
> > the struct iommu_group to do those things? This "perform group level
> > operations based on an arbitrary device in the group" is pretty klunky.
> > Thanks,
> >
>
> This sounds a right thing to do.
>
> btw another alternative which I'm thinking of is whether vfio_group
> can record the bus info when the first device is added to it in
> __vfio_register_dev(). Then we don't need a group interface from
> iommu to test if vfio is the only user having such requirement.
That might be more simple, but it's just another variation on vfio
picking an arbitrary device from a group to satisfy the iommu interface
rather than operating on an iommu subsystem provided object. Thanks,
Alex
next prev parent reply other threads:[~2022-06-23 20:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 12:04 [PATCH v2 1/2] vfio/type1: Simplify bus_type determination Robin Murphy
2022-06-22 12:04 ` [PATCH v2 2/2] vfio: Use device_iommu_capable() Robin Murphy
2022-06-23 1:47 ` Baolu Lu
2022-06-22 22:17 ` [PATCH v2 1/2] vfio/type1: Simplify bus_type determination Alex Williamson
2022-06-23 8:46 ` Tian, Kevin
2022-06-23 20:35 ` Alex Williamson [this message]
2022-06-23 12:23 ` Robin Murphy
2022-06-23 20:50 ` Jason Gunthorpe
2022-06-23 23:00 ` Alex Williamson
2022-06-24 1:50 ` Jason Gunthorpe
2022-06-24 14:11 ` Alex Williamson
2022-06-24 14:18 ` Jason Gunthorpe
2022-06-24 14:28 ` Alex Williamson
2022-06-24 14:56 ` Jason Gunthorpe
2022-06-24 15:12 ` Robin Murphy
2022-06-24 16:04 ` Alex Williamson
2022-06-23 1:46 ` Baolu Lu
2022-06-23 4:32 ` kernel test robot
2022-06-24 1:52 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220623143552.634779e0.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=iommu@lists.linux.dev \
--cc=jgg@nvidia.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).