[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220706144652.1b254c76@canb.auug.org.au>
Date: Wed, 6 Jul 2022 14:46:52 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Alex Williamson <alex.williamson@...hat.com>
Cc: Jason Gunthorpe <jgg@...dia.com>, Jason Gunthorpe <jgg@...pe.ca>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Robin Murphy <robin.murphy@....com>
Subject: linux-next: manual merge of the vfio tree with the vfio-fixes tree
Hi all,
Today's linux-next merge of the vfio tree got a conflict in:
drivers/vfio/vfio.c
between commit:
afe4e376ac5d ("vfio: Move IOMMU_CAP_CACHE_COHERENCY test to after we know we have a group")
from the vfio-fixes tree and commit:
3b498b665621 ("vfio: Use device_iommu_capable()")
from the vfio 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 drivers/vfio/vfio.c
index e60b06f2ac22,bd84ca7c5e35..100a3d84380c
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@@ -549,16 -551,6 +551,16 @@@ static struct vfio_group *vfio_group_fi
if (!iommu_group)
return ERR_PTR(-EINVAL);
+ /*
+ * VFIO always sets IOMMU_CACHE because we offer no way for userspace to
+ * restore cache coherency. It has to be checked here because it is only
+ * valid for cases where we are using iommu groups.
+ */
- if (!iommu_capable(dev->bus, IOMMU_CAP_CACHE_COHERENCY)) {
++ if (!device_iommu_capable(dev, IOMMU_CAP_CACHE_COHERENCY)) {
+ iommu_group_put(iommu_group);
+ return ERR_PTR(-EINVAL);
+ }
+
group = vfio_group_get_from_iommu(iommu_group);
if (!group)
group = vfio_create_group(iommu_group, VFIO_IOMMU);
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists