public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jason Gunthorpe <jgg@nvidia•com>, Joerg Roedel <joro@8bytes•org>
Cc: Jason Gunthorpe <jgg@ziepe•ca>,
	Joerg Roedel <joerg.roedel@amd•com>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Nicolin Chen <nicolinc@nvidia•com>
Subject: linux-next: manual merge of the iommufd tree with the iommu tree
Date: Mon, 30 Jun 2025 16:00:59 +1000	[thread overview]
Message-ID: <20250630160059.49544dde@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3430 bytes --]

Hi all,

Today's linux-next merge of the iommufd tree got a conflict in:

  include/linux/iommu.h

between commit:

  792ea7b6cafa ("iommu: Remove ops->pgsize_bitmap")

from the iommu tree and commits:

  187f146d5de6 ("iommu: Introduce get_viommu_size and viommu_init ops")
  f842ea208e43 ("iommu: Deprecate viommu_alloc op")

from the iommufd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/iommu.h
index 7073be1d8841,04548b18df28..000000000000
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@@ -596,14 -597,17 +597,16 @@@ iommu_copy_struct_from_full_user_array(
   *		- IOMMU_DOMAIN_DMA: must use a dma domain
   *		- 0: use the default setting
   * @default_domain_ops: the default ops for domains
-  * @viommu_alloc: Allocate an iommufd_viommu on a physical IOMMU instance behind
-  *                the @dev, as the set of virtualization resources shared/passed
-  *                to user space IOMMU instance. And associate it with a nesting
-  *                @parent_domain. The @viommu_type must be defined in the header
-  *                include/uapi/linux/iommufd.h
-  *                It is required to call iommufd_viommu_alloc() helper for
-  *                a bundled allocation of the core and the driver structures,
-  *                using the given @ictx pointer.
+  * @get_viommu_size: Get the size of a driver-level vIOMMU structure for a given
+  *                   @dev corresponding to @viommu_type. Driver should return 0
+  *                   if vIOMMU isn't supported accordingly. It is required for
+  *                   driver to use the VIOMMU_STRUCT_SIZE macro to sanitize the
+  *                   driver-level vIOMMU structure related to the core one
+  * @viommu_init: Init the driver-level struct of an iommufd_viommu on a physical
+  *               IOMMU instance @viommu->iommu_dev, as the set of virtualization
+  *               resources shared/passed to user space IOMMU instance. Associate
+  *               it with a nesting @parent_domain. It is required for driver to
+  *               set @viommu->ops pointing to its own viommu_ops
 - * @pgsize_bitmap: bitmap of all possible supported page sizes
   * @owner: Driver module providing these ops
   * @identity_domain: An always available, always attachable identity
   *                   translation.
@@@ -653,11 -657,13 +656,12 @@@ struct iommu_ops 
  
  	int (*def_domain_type)(struct device *dev);
  
- 	struct iommufd_viommu *(*viommu_alloc)(
- 		struct device *dev, struct iommu_domain *parent_domain,
- 		struct iommufd_ctx *ictx, unsigned int viommu_type);
+ 	size_t (*get_viommu_size)(struct device *dev,
+ 				  enum iommu_viommu_type viommu_type);
+ 	int (*viommu_init)(struct iommufd_viommu *viommu,
+ 			   struct iommu_domain *parent_domain);
  
  	const struct iommu_domain_ops *default_domain_ops;
 -	unsigned long pgsize_bitmap;
  	struct module *owner;
  	struct iommu_domain *identity_domain;
  	struct iommu_domain *blocked_domain;

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2025-06-30  6:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-30  6:00 Stephen Rothwell [this message]
2025-06-30 13:02 ` linux-next: manual merge of the iommufd tree with the iommu tree Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2025-03-21  8:09 Stephen Rothwell
2023-10-27  4:55 Stephen Rothwell
2023-10-27  6:15 ` Stephen Rothwell
2023-10-30 18:26   ` Jason Gunthorpe
2023-10-31  5:12     ` Stephen Rothwell
2023-10-31 11:31       ` Jason Gunthorpe
2023-11-02 23:53       ` Stephen Rothwell
2023-11-03  0:33         ` Jason Gunthorpe
2023-10-26  3:27 Stephen Rothwell
2023-10-25  4:44 Stephen Rothwell
2023-10-25 12:17 ` Jason Gunthorpe
2023-11-02 23:53 ` Stephen Rothwell
2023-10-25  4:34 Stephen Rothwell
2023-10-25 12:12 ` Jason Gunthorpe
2023-10-25 12:16   ` Baolu Lu
2023-10-25 12:17     ` Jason Gunthorpe
2023-10-25 12:25       ` Baolu Lu
2023-10-23  4:56 Stephen Rothwell
2023-10-11  5:03 Stephen Rothwell
2023-10-11 13:58 ` Jason Gunthorpe
2023-08-16  6:21 Stephen Rothwell
2022-11-04  4:24 Stephen Rothwell
2022-11-04 12:33 ` Jason Gunthorpe
2022-11-04 19:21   ` 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=20250630160059.49544dde@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=jgg@nvidia$(echo .)com \
    --cc=jgg@ziepe$(echo .)ca \
    --cc=joerg.roedel@amd$(echo .)com \
    --cc=joro@8bytes$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=nicolinc@nvidia$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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