Message ID | 20231027155522.6b2863a4@canb.auug.org.au |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp363387vqb; Thu, 26 Oct 2023 21:56:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGa8S4YdluMtDA/hXd4U9FL3DPOisKLP4Pj3PRE1BeIEx8rtqwuAGlRZpnaqZfotMAigHwK X-Received: by 2002:a1f:17cf:0:b0:49a:6742:b176 with SMTP id 198-20020a1f17cf000000b0049a6742b176mr1824755vkx.16.1698382565941; Thu, 26 Oct 2023 21:56:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698382565; cv=none; d=google.com; s=arc-20160816; b=agqdKplu7ZEFjXYxoX8jzWBkDorygLlxY0RJ/c1bC5B7JgX4mmFPe8+dKryTpUNi+N nGeXfAaxNcUebtY/vu4efUKtXRk3d4hti6cgvcQQLEVXQgYl6u1RUDNgPjxxptrshRN1 NNTYjkl70TFwqY86oQP9NZGM4MpcNwfN0aWVfzdaDbxsPEU/eZhRfpWcQvg4fTS8yz4D dQS/aWXz+bSvDld1N3y5AAHeDxEs7sPyQAWOi6aClm1E1UfCgMgsmECQzSzLxGNhKfZg kCkHodE4YlOVq39xSvga0NbvmrQYnrelIsJuAxBoHjwZa7MxGUoAcb1a4dSliiuCXwE8 tL7Q== 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=pn/MK2PwSd3NO/fy5gAheuSGiNydeLRHOjVKL3rZO80=; fh=zBCc/qqWAUryCnSof31iC/NE3oM9BcsYgXg/ZHh1pEc=; b=iXwMd/PeGjmX66MNKkrKfVfQ8rst1qISx2PYf2/PRx6VZdwTXhGyIKttjNyuu5/k4p Rj9Rp4OuwaNWLpO8QpnC2XHNjv9JOAg60sfpxDHk1ZXBpGELkg3D+Lva4UMi0TO2RONm +FyyRxbfCP7Dhtaf2Fipe1diYg4SMxYWOK5Kh2ZhXtSa5vhHbWRENygC/ijHnC2OOrKu cE5tnh/M2UxYeIq4N97RJwd5k74uCWB/6B5a8sux2Mc3TcBT9O926qGlH5jnWFI2f1F6 2ZMRNUKkZhUZQFEdeAKZKQXFwhT0JTi92C/GZmKk+z9QtFpZedBEpdhEqd0/G0Ylo8v5 6e+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=NNRNq9VH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id x186-20020a81a0c3000000b005a247d7248esi1296268ywg.5.2023.10.26.21.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 21:56:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@canb.auug.org.au header.s=201702 header.b=NNRNq9VH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id DBFBE8266513; Thu, 26 Oct 2023 21:56:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234816AbjJ0Eze (ORCPT <rfc822;aposhian.dev@gmail.com> + 26 others); Fri, 27 Oct 2023 00:55:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232306AbjJ0Eza (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Oct 2023 00:55:30 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 606081A7; Thu, 26 Oct 2023 21:55:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canb.auug.org.au; s=201702; t=1698382525; bh=pn/MK2PwSd3NO/fy5gAheuSGiNydeLRHOjVKL3rZO80=; h=Date:From:To:Cc:Subject:From; b=NNRNq9VHCi50Uxd6ixpXE2LmG03uRZB/+Jp9sF6I02bJByTdcDGHdn1G8lvl6MQu4 uGA2jj/q9GdWDSJDfK5rUAw0MVlvJnXu6oJcYIR89HbruuU8Klou+wZI5qxSRnpR6w IE3SBgqsa8qJ4cCJf+JbMUqRrCumKHasOg+HerI7NB83Xji5Mp6gG20GdnNWHzYxGv 0d9Wgtbw2xXMxfrdFW79wZYYfW5nrEnzt2PF3lLZk4O+D8bpa316fEk4UhX4MMbwPU oAdz7qjfjqO2r+j1GwWphcodvpZbSnT8m24gwLmi2RlAQzybFB1MWhdx+FRCArePqa 66Wy2zOPoPWzg== 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 4SGr2M4MzDz4wd1; Fri, 27 Oct 2023 15:55:23 +1100 (AEDT) Date: Fri, 27 Oct 2023 15:55:22 +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>, Joao Martins <joao.m.martins@oracle.com>, Joerg Roedel <jroedel@suse.de>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Linux Next Mailing List <linux-next@vger.kernel.org>, 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: <20231027155522.6b2863a4@canb.auug.org.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/bmNe/dKWE5QI_gaZUeETryt"; 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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 26 Oct 2023 21:56:02 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780883197529518161 X-GMAIL-MSGID: 1780883197529518161 |
Series |
linux-next: manual merge of the iommufd tree with the iommu tree
|
|
Commit Message
Stephen Rothwell
Oct. 27, 2023, 4:55 a.m. UTC
Hi all, Today's linux-next merge of the iommufd tree got a conflict in: drivers/iommu/iommufd/selftest.c between commits: 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") from the iommu tree and commits: 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") 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
Hi all, On Fri, 27 Oct 2023 15:55:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > Today's linux-next merge of the iommufd tree got a conflict in: > > drivers/iommu/iommufd/selftest.c > > between commits: > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") > > from the iommu tree and commits: > > 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") > 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") > 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") > a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") > 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") > > 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. The resolution should have been as below (I think).
On Fri, Oct 27, 2023 at 05:15:22PM +1100, Stephen Rothwell wrote: > Hi all, > > On Fri, 27 Oct 2023 15:55:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > Today's linux-next merge of the iommufd tree got a conflict in: > > > > drivers/iommu/iommufd/selftest.c > > > > between commits: > > > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > > 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") > > > > from the iommu tree and commits: > > > > 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") > > 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") > > 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") > > a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > > 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") > > 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") > > > > 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. > > The resolution should have been as below (I think). This was too horrible, I pushed a patch to reorganize the new iommufd side code to more closely match how the domain_alloc_paging stuff is supposed to work Thanks, Jason
Hi all, On Mon, 30 Oct 2023 15:26:21 -0300 Jason Gunthorpe <jgg@nvidia.com> wrote: > > On Fri, Oct 27, 2023 at 05:15:22PM +1100, Stephen Rothwell wrote: > > > > On Fri, 27 Oct 2023 15:55:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > > Today's linux-next merge of the iommufd tree got a conflict in: > > > > > > drivers/iommu/iommufd/selftest.c > > > > > > between commits: > > > > > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > > > 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") > > > > > > from the iommu tree and commits: > > > > > > 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") > > > 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") > > > 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") > > > a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > > > 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") > > > 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") > > > > > > 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. > > > > The resolution should have been as below (I think). > > This was too horrible, I pushed a patch to reorganize the new iommufd side > code to more closely match how the domain_alloc_paging stuff is > supposed to work I have used the conflict resolution below now.
On Tue, Oct 31, 2023 at 04:12:14PM +1100, Stephen Rothwell wrote: > Hi all, > > On Mon, 30 Oct 2023 15:26:21 -0300 Jason Gunthorpe <jgg@nvidia.com> wrote: > > > > On Fri, Oct 27, 2023 at 05:15:22PM +1100, Stephen Rothwell wrote: > > > > > > On Fri, 27 Oct 2023 15:55:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > > > > Today's linux-next merge of the iommufd tree got a conflict in: > > > > > > > > drivers/iommu/iommufd/selftest.c > > > > > > > > between commits: > > > > > > > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > > > > 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") > > > > > > > > from the iommu tree and commits: > > > > > > > > 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") > > > > 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") > > > > 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") > > > > a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > > > > 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") > > > > 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") > > > > > > > > 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. > > > > > > The resolution should have been as below (I think). > > > > This was too horrible, I pushed a patch to reorganize the new iommufd side > > code to more closely match how the domain_alloc_paging stuff is > > supposed to work > > I have used the conflict resolution below now. Yep! Thanks, Jason
Hi all, On Tue, 31 Oct 2023 16:12:14 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > On Mon, 30 Oct 2023 15:26:21 -0300 Jason Gunthorpe <jgg@nvidia.com> wrote: > > > > On Fri, Oct 27, 2023 at 05:15:22PM +1100, Stephen Rothwell wrote: > > > > > > On Fri, 27 Oct 2023 15:55:22 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > > > > > > > Today's linux-next merge of the iommufd tree got a conflict in: > > > > > > > > drivers/iommu/iommufd/selftest.c > > > > > > > > between commits: > > > > > > > > 1c68cbc64fe6 ("iommu: Add IOMMU_DOMAIN_PLATFORM") > > > > 13fbceb1b8e9 ("iommufd: Convert to alloc_domain_paging()") > > > > > > > > from the iommu tree and commits: > > > > > > > > 408663619fcf ("iommufd/selftest: Add domain_alloc_user() support in iommu mock") > > > > 266ce58989ba ("iommufd/selftest: Test IOMMU_HWPT_ALLOC_DIRTY_TRACKING") > > > > 7adf267d66d1 ("iommufd/selftest: Test IOMMU_HWPT_SET_DIRTY_TRACKING") > > > > a9af47e382a4 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP") > > > > 0795b305da89 ("iommufd/selftest: Test IOMMU_HWPT_GET_DIRTY_BITMAP_NO_CLEAR flag") > > > > 65fe32f7a447 ("iommufd/selftest: Add nested domain allocation for mock domain") > > > > > > > > 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. > > > > > > The resolution should have been as below (I think). > > > > This was too horrible, I pushed a patch to reorganize the new iommufd side > > code to more closely match how the domain_alloc_paging stuff is > > supposed to work > > I have used the conflict resolution below now. > > -- > Cheers, > Stephen Rothwell > > diff --cc drivers/iommu/iommufd/selftest.c > index ee6079847091,d43a87737c1e..5d93434003d8 > --- a/drivers/iommu/iommufd/selftest.c > +++ b/drivers/iommu/iommufd/selftest.c > @@@ -155,6 -240,81 +235,72 @@@ static struct iommu_domain *mock_domain > return &mock->domain; > } > > + static struct iommu_domain * > + __mock_domain_alloc_nested(struct mock_iommu_domain *mock_parent, > + const struct iommu_hwpt_selftest *user_cfg) > + { > + struct mock_iommu_domain_nested *mock_nested; > + int i; > + > + mock_nested = kzalloc(sizeof(*mock_nested), GFP_KERNEL); > + if (!mock_nested) > + return ERR_PTR(-ENOMEM); > + mock_nested->parent = mock_parent; > + mock_nested->domain.ops = &domain_nested_ops; > + mock_nested->domain.type = IOMMU_DOMAIN_NESTED; > + for (i = 0; i < MOCK_NESTED_DOMAIN_IOTLB_NUM; i++) > + mock_nested->iotlb[i] = user_cfg->iotlb; > + return &mock_nested->domain; > + } > + > -static struct iommu_domain *mock_domain_alloc(unsigned int iommu_domain_type) > -{ > - if (iommu_domain_type == IOMMU_DOMAIN_BLOCKED) > - return &mock_blocking_domain; > - if (iommu_domain_type == IOMMU_DOMAIN_UNMANAGED) > - return mock_domain_alloc_paging(NULL); > - return NULL; > -} > - > + static struct iommu_domain * > + mock_domain_alloc_user(struct device *dev, u32 flags, > + struct iommu_domain *parent, > + const struct iommu_user_data *user_data) > + { > + struct mock_iommu_domain *mock_parent; > + struct iommu_hwpt_selftest user_cfg; > + int rc; > + > + /* must be mock_domain */ > + if (!parent) { > + struct mock_dev *mdev = container_of(dev, struct mock_dev, dev); > + bool has_dirty_flag = flags & IOMMU_HWPT_ALLOC_DIRTY_TRACKING; > + bool no_dirty_ops = mdev->flags & MOCK_FLAGS_DEVICE_NO_DIRTY; > + struct iommu_domain *domain; > + > + if (flags & (~(IOMMU_HWPT_ALLOC_NEST_PARENT | > + IOMMU_HWPT_ALLOC_DIRTY_TRACKING))) > + return ERR_PTR(-EOPNOTSUPP); > + if (user_data || (has_dirty_flag && no_dirty_ops)) > + return ERR_PTR(-EOPNOTSUPP); > + domain = mock_domain_alloc_paging(NULL); > + if (!domain) > + return ERR_PTR(-ENOMEM); > + if (has_dirty_flag) > + container_of(domain, struct mock_iommu_domain, domain) > + ->domain.dirty_ops = &dirty_ops; > + return domain; > + } > + > + /* must be mock_domain_nested */ > + if (user_data->type != IOMMU_HWPT_DATA_SELFTEST || flags) > + return ERR_PTR(-EOPNOTSUPP); > + if (!parent || parent->ops != mock_ops.default_domain_ops) > + return ERR_PTR(-EINVAL); > + > + mock_parent = container_of(parent, struct mock_iommu_domain, domain); > + if (!mock_parent) > + return ERR_PTR(-EINVAL); > + > + rc = iommu_copy_struct_from_user(&user_cfg, user_data, > + IOMMU_HWPT_DATA_SELFTEST, iotlb); > + if (rc) > + return ERR_PTR(rc); > + > + return __mock_domain_alloc_nested(mock_parent, &user_cfg); > + } > + > static void mock_domain_free(struct iommu_domain *domain) > { > struct mock_iommu_domain *mock = > @@@ -272,9 -432,28 +418,20 @@@ static phys_addr_t mock_domain_iova_to_ > > static bool mock_domain_capable(struct device *dev, enum iommu_cap cap) > { > - return cap == IOMMU_CAP_CACHE_COHERENCY; > + struct mock_dev *mdev = container_of(dev, struct mock_dev, dev); > + > + switch (cap) { > + case IOMMU_CAP_CACHE_COHERENCY: > + return true; > + case IOMMU_CAP_DIRTY_TRACKING: > + return !(mdev->flags & MOCK_FLAGS_DEVICE_NO_DIRTY); > + default: > + break; > + } > + > + return false; > } > > -static void mock_domain_set_plaform_dma_ops(struct device *dev) > -{ > - /* > - * mock doesn't setup default domains because we can't hook into the > - * normal probe path > - */ > -} > - > static struct iommu_device mock_iommu_device = { > }; > > @@@ -293,8 -466,10 +450,9 @@@ static const struct iommu_ops mock_ops > .owner = THIS_MODULE, > .pgsize_bitmap = MOCK_IO_PAGE_SIZE, > .hw_info = mock_domain_hw_info, > - .domain_alloc = mock_domain_alloc, > + .domain_alloc_paging = mock_domain_alloc_paging, > + .domain_alloc_user = mock_domain_alloc_user, > .capable = mock_domain_capable, > - .set_platform_dma_ops = mock_domain_set_plaform_dma_ops, > .device_group = generic_device_group, > .probe_device = mock_probe_device, > .default_domain_ops = This is now a conflict between the iommu tree and Linus' tree.
On Fri, Nov 03, 2023 at 10:53:12AM +1100, Stephen Rothwell wrote: > > I have used the conflict resolution below now. > > This is now a conflict between the iommu tree and Linus' tree. My PR has instructions for the resolution to both: https://lore.kernel.org/linux-iommu/20231031131417.GA1815719@nvidia.com/ Thanks, Jason
diff --cc drivers/iommu/iommufd/selftest.c index ee6079847091,6684ab4cdc7a..000000000000 --- a/drivers/iommu/iommufd/selftest.c