Message ID | 20231025154420.718e27af@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2366897vqx; Tue, 24 Oct 2023 21:44:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFvNhA+er3BwbB7+j1QAIIUogMXgRsFBXBO4rCjQabfbkohZ4ToRPOtf2CCTfCQRPKHOB6C X-Received: by 2002:a05:690c:86:b0:5a7:d9e6:8fc6 with SMTP id be6-20020a05690c008600b005a7d9e68fc6mr16508347ywb.39.1698209092404; Tue, 24 Oct 2023 21:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698209092; cv=none; d=google.com; s=arc-20160816; b=0AqtB4qURp92iZAVCiTKTl3jdA9EFdq8RlUIUq4MycTtbp828e1oCN5CySyCo4ofXX khpJJwdBYypUmdXRoDmJUQpyA+eipYCPlXRPkkmTQVAHae1lKjbsiyF4pj3rAR8nKZW0 SoJmUqXd+QqEJQ6XeNcxJxZOC60Y4zXLscx4leuSDYdUw9kqEUIQAV021goOcXUd47E1 fiqm+fgQzNeAcs4S16fnJH7LjWdNaFk6E+kkhrwa8S5DfqFJNZCUoOLPUsiD1Jcx5tJh Xr1CCeQMQ4lkFXtJr/hFMS0uS0TVWn7lFgIQ2MAHNURSo6PnMCYxQ8h3SyGemkkpTf04 pgUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=eZaO9fpaQtji7iLDzW5eW+yJsGU0yPYdhQ1Im0uTBXY=; fh=Yq9NgPdPNJ3f/a3H+WZ8kcj6ghWN4WvEK/lYOs8bYXI=; b=OnJcaEzpO6Plg3Du34wJ2tPz9CCCHUdeLT6XKHU4N9/Ru2XjkwWaKnPPmLFT0Pk+Zc H88SuK79u4Ht4+WFGEUjs7fkVAIa9Y+59Nnwu5yjyTT2me2yDSgqCkBXha11Cg3pncQw 7wUuTr0R56Z8FHceZKGFpbVI9bZsoDRoKomXWomKXm4qi/Sj0s8ZFTIJZsLOBAkAIjcP cexddzC+wNqxQ+k9S0W36GJB7ioOH3T0BQSLMK8asbtMzlGvNR2KGSvBegFu/1DNvppt jL3cjpjdpHmG0tGRdWh1bpDen73lDk0pkC8xgrD6r+ecGROb+rf/iYNHI8Q4w/IegDc3 eDlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b="A/kR7n4F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id m13-20020a81d24d000000b005a7a80a94cfsi9863878ywl.346.2023.10.24.21.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 21:44:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b="A/kR7n4F"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canb.auug.org.au Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id A512E80C3470; Tue, 24 Oct 2023 21:44:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229829AbjJYEo1 (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Wed, 25 Oct 2023 00:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjJYEoZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 25 Oct 2023 00:44:25 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFAA09D; Tue, 24 Oct 2023 21:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1698209061; bh=eZaO9fpaQtji7iLDzW5eW+yJsGU0yPYdhQ1Im0uTBXY=; h=Date:From:To:Cc:Subject:From; b=A/kR7n4Fqm+3+zX8QhC1OL94pWVBzrjn0966h8GQg5NF+nHdkyMLlLKva4KDX8V8J bCmC2UG8Ru/E+TMStx96l158icAiWj1nO5CbjqhjVeX773M+YRPXaamavdn22RruBY cIvDQ/ECYMc/Sa9g4Cb+wq1OMxwoBZChhGUuhy7ZU/YoMRKio5Egfpy/H7bp7jDwIn K8t5GIP1U1vlKClws8tPJwQQuvQo/mQj3H3HrLmLb4acmmVAzEupk8UyNKBwcvod87 8/1DaQMnEwuhbggOYr2dYBlOjjnZ5ois8aOB4mccY3MgddCdNDVHzp46eFuGCsAP/C 004nXsmwcJBaQ== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SFbtX3Zgvz4wcc; Wed, 25 Oct 2023 15:44:20 +1100 (AEDT) Date: Wed, 25 Oct 2023 15:44:20 +1100 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 <jroedel@suse.de>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org>, Lu Baolu <baolu.lu@linux.intel.com>, Nicolin Chen <nicolinc@nvidia.com>, Yi Liu <yi.l.liu@intel.com> Subject: linux-next: manual merge of the iommufd tree with the iommu tree Message-ID: <20231025154420.718e27af@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/2_R1etV5rzCjR+kCHxkEtiB"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 21:44:49 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780700693874610619 X-GMAIL-MSGID: 1780701297395478444 |
Series |
linux-next: manual merge of the iommufd tree with the iommu tree
|
|
Commit Message
Stephen Rothwell
Oct. 25, 2023, 4:44 a.m. UTC
Hi all, Today's linux-next merge of the iommufd tree got a conflict in: include/linux/iommu.h between commits: 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") 4601cd2d7c4c ("iommu: Add ops->domain_alloc_paging()") from the iommu tree and commits: 1621aef1fbfe ("iommu: Add IOMMU_DOMAIN_NESTED") 909f4abd1097 ("iommu: Add new iommu op to create domains owned by userspace") 17dd7701a2e7 ("iommu: Pass in parent domain with user_data to domain_alloc_user 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.
Comments
On Wed, Oct 25, 2023 at 03:44:20PM +1100, Stephen Rothwell wrote: > diff --cc include/linux/iommu.h > index b5b254e205c6,f347bf31761f..000000000000 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@@ -64,8 -66,10 +66,11 @@@ struct iommu_domain_geometry > #define __IOMMU_DOMAIN_DMA_FQ (1U << 3) /* DMA-API uses flush queue */ > > #define __IOMMU_DOMAIN_SVA (1U << 4) /* Shared process address space */ > +#define __IOMMU_DOMAIN_PLATFORM (1U << 5) > > + #define __IOMMU_DOMAIN_NESTED (1U << 5) /* User-managed address space nested > + on a stage-2 translation */ One of these should be 6 I'm going to change my tree so __IOMMU_DOMAIN_NESTED is 6 Otherwise looks OK thanks Jason
Hi all, On Wed, 25 Oct 2023 15:44:20 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Today's linux-next merge of the iommufd tree got a conflict in: > > include/linux/iommu.h > > between commits: > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > 4601cd2d7c4c ("iommu: Add ops->domain_alloc_paging()") > > from the iommu tree and commits: > > 1621aef1fbfe ("iommu: Add IOMMU_DOMAIN_NESTED") > 909f4abd1097 ("iommu: Add new iommu op to create domains owned by userspace") > 17dd7701a2e7 ("iommu: Pass in parent domain with user_data to domain_alloc_user 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 b5b254e205c6,f347bf31761f..000000000000 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@@ -64,8 -66,10 +66,11 @@@ struct iommu_domain_geometry > #define __IOMMU_DOMAIN_DMA_FQ (1U << 3) /* DMA-API uses flush queue */ > > #define __IOMMU_DOMAIN_SVA (1U << 4) /* Shared process address space */ > +#define __IOMMU_DOMAIN_PLATFORM (1U << 5) > > + #define __IOMMU_DOMAIN_NESTED (1U << 5) /* User-managed address space nested > + on a stage-2 translation */ > + > #define IOMMU_DOMAIN_ALLOC_FLAGS ~__IOMMU_DOMAIN_DMA_FQ > /* > * This are the possible domain-types > @@@ -94,7 -96,7 +99,8 @@@ > __IOMMU_DOMAIN_DMA_API | \ > __IOMMU_DOMAIN_DMA_FQ) > #define IOMMU_DOMAIN_SVA (__IOMMU_DOMAIN_SVA) > +#define IOMMU_DOMAIN_PLATFORM (__IOMMU_DOMAIN_PLATFORM) > + #define IOMMU_DOMAIN_NESTED (__IOMMU_DOMAIN_NESTED) > > struct iommu_domain { > unsigned type; > @@@ -238,9 -327,19 +331,21 @@@ static inline int __iommu_copy_struct_f > * op is allocated in the iommu driver and freed by the caller after > * use. The information type is one of enum iommu_hw_info_type defined > * in include/uapi/linux/iommufd.h. > - * @domain_alloc: allocate iommu domain > + * @domain_alloc: allocate and return an iommu domain if success. Otherwise > + * NULL is returned. The domain is not fully initialized until > + * the caller iommu_domain_alloc() returns. > + * @domain_alloc_paging: Allocate an iommu_domain that can be used for > + * UNMANAGED, DMA, and DMA_FQ domain types. > + * @domain_alloc_user: Allocate an iommu domain corresponding to the input > + * parameters as defined in include/uapi/linux/iommufd.h. > + * Unlike @domain_alloc, it is called only by IOMMUFD and > + * must fully initialize the new domain before return. > + * Upon success, if the @user_data is valid and the @parent > + * points to a kernel-managed domain, the new domain must be > + * IOMMU_DOMAIN_NESTED type; otherwise, the @parent must be > + * NULL while the @user_data can be optionally provided, the > + * new domain must support __IOMMU_DOMAIN_PAGING. > + * Upon failure, ERR_PTR must be returned. > * @probe_device: Add device to iommu driver handling > * @release_device: Remove device from iommu driver handling > * @probe_finalize: Do final setup work after the device is added to an IOMMU > @@@ -275,7 -372,9 +380,10 @@@ struct iommu_ops > > /* Domain allocation and freeing by the iommu driver */ > struct iommu_domain *(*domain_alloc)(unsigned iommu_domain_type); > + struct iommu_domain *(*domain_alloc_paging)(struct device *dev); > + struct iommu_domain *(*domain_alloc_user)( > + struct device *dev, u32 flags, struct iommu_domain *parent, > + const struct iommu_user_data *user_data); > > struct iommu_device *(*probe_device)(struct device *dev); > void (*release_device)(struct device *dev); This is now a conflict between the iommu tree and Linus' tree.
diff --cc include/linux/iommu.h index b5b254e205c6,f347bf31761f..000000000000 --- a/include/linux/iommu.h