All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	cohuck@redhat.com, iommu@lists.linux.dev,
	iommu@lists.linux-foundation.org, kvm@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 17:50:32 -0300	[thread overview]
Message-ID: <20220623205032.GH4147@nvidia.com> (raw)
In-Reply-To: <68263bd7-4528-7acb-b11f-6b1c6c8c72ef@arm.com>

On Thu, Jun 23, 2022 at 01:23:05PM +0100, Robin Murphy wrote:

> So yes, technically we could implement an iommu_group_capable() and an
> iommu_group_domain_alloc(), which would still just internally resolve the
> IOMMU ops and instance data from a member device to perform the driver-level
> call, but once again it would be for the benefit of precisely one
> user. 

Benefit one user and come with a fairly complex locking situation to
boot.

Alex, I'd rather think about moving the type 1 code so that the iommu
attach happens during device FD creation (then we have a concrete
non-fake device), not during group FD opening.

That is the model we need for iommufd anyhow.

Jason

WARNING: multiple messages have this Message-ID (diff)
From: Jason Gunthorpe via iommu <iommu@lists.linux-foundation.org>
To: Robin Murphy <robin.murphy@arm.com>
Cc: kvm@vger.kernel.org, iommu@lists.linux.dev, cohuck@redhat.com,
	linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	Alex Williamson <alex.williamson@redhat.com>
Subject: Re: [PATCH v2 1/2] vfio/type1: Simplify bus_type determination
Date: Thu, 23 Jun 2022 17:50:32 -0300	[thread overview]
Message-ID: <20220623205032.GH4147@nvidia.com> (raw)
In-Reply-To: <68263bd7-4528-7acb-b11f-6b1c6c8c72ef@arm.com>

On Thu, Jun 23, 2022 at 01:23:05PM +0100, Robin Murphy wrote:

> So yes, technically we could implement an iommu_group_capable() and an
> iommu_group_domain_alloc(), which would still just internally resolve the
> IOMMU ops and instance data from a member device to perform the driver-level
> call, but once again it would be for the benefit of precisely one
> user. 

Benefit one user and come with a fairly complex locking situation to
boot.

Alex, I'd rather think about moving the type 1 code so that the iommu
attach happens during device FD creation (then we have a concrete
non-fake device), not during group FD opening.

That is the model we need for iommufd anyhow.

Jason
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2022-06-23 20:50 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
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 [this message]
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=20220623205032.GH4147@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=iommu@lists.linux.dev \
    --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.