All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	Robin Murphy <robin.murphy@arm.com>
Cc: "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 08:46:45 +0000	[thread overview]
Message-ID: <BN9PR11MB5276A79834CCB5954A3025DF8CB59@BN9PR11MB5276.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220622161721.469fc9eb.alex.williamson@redhat.com>

> 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.

WARNING: multiple messages have this Message-ID (diff)
From: "Tian, Kevin" <kevin.tian@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	Robin Murphy <robin.murphy@arm.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	"iommu@lists.linux.dev" <iommu@lists.linux.dev>,
	"jgg@nvidia.com" <jgg@nvidia.com>
Subject: RE: [PATCH v2 1/2] vfio/type1: Simplify bus_type determination
Date: Thu, 23 Jun 2022 08:46:45 +0000	[thread overview]
Message-ID: <BN9PR11MB5276A79834CCB5954A3025DF8CB59@BN9PR11MB5276.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220622161721.469fc9eb.alex.williamson@redhat.com>

> 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.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2022-06-23  8:46 UTC|newest]

Thread overview: 38+ 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 ` Robin Murphy
2022-06-22 12:04 ` [PATCH v2 2/2] vfio: Use device_iommu_capable() Robin Murphy
2022-06-22 12:04   ` Robin Murphy
2022-06-23  1:47   ` Baolu Lu
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-22 22:17   ` Alex Williamson
2022-06-23  8:46   ` Tian, Kevin [this message]
2022-06-23  8:46     ` Tian, Kevin
2022-06-23 20:35     ` Alex Williamson
2022-06-23 20:35       ` Alex Williamson
2022-06-23 12:23   ` Robin Murphy
2022-06-23 12:23     ` Robin Murphy
2022-06-23 20:50     ` Jason Gunthorpe
2022-06-23 20:50       ` Jason Gunthorpe via iommu
2022-06-23 23:00     ` Alex Williamson
2022-06-23 23:00       ` Alex Williamson
2022-06-24  1:50       ` Jason Gunthorpe
2022-06-24  1:50         ` Jason Gunthorpe via iommu
2022-06-24 14:11         ` Alex Williamson
2022-06-24 14:11           ` Alex Williamson
2022-06-24 14:18           ` Jason Gunthorpe
2022-06-24 14:18             ` Jason Gunthorpe via iommu
2022-06-24 14:28             ` Alex Williamson
2022-06-24 14:28               ` Alex Williamson
2022-06-24 14:56               ` Jason Gunthorpe via iommu
2022-06-24 14:56                 ` Jason Gunthorpe
2022-06-24 15:12               ` Robin Murphy
2022-06-24 15:12                 ` Robin Murphy
2022-06-24 16:04                 ` Alex Williamson
2022-06-24 16:04                   ` Alex Williamson
2022-06-23  1:46 ` Baolu Lu
2022-06-23  1:46   ` Baolu Lu
2022-06-23  4:32 ` kernel test robot
2022-06-23  4:32   ` kernel test robot
2022-06-24  1:52 ` Jason Gunthorpe
2022-06-24  1:52   ` Jason Gunthorpe via iommu

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=BN9PR11MB5276A79834CCB5954A3025DF8CB59@BN9PR11MB5276.namprd11.prod.outlook.com \
    --to=kevin.tian@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=jgg@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.