Hi all,
Today's linux-next merge of the iommu tree got a conflict in:
drivers/vfio/vfio_iommu_type1.c
between commit:
895c0747f726 ("vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp()")
from Linus' tree and commit:
1369459b2e21 ("iommu: Add a gfp parameter to iommu_map()")
from the iommu 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_iommu_type1.c
index 2209372f236d,e14f86a8ef52..000000000000
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@@ -1867,22 -1866,15 +1868,22 @@@ static void vfio_test_domain_fgsp(struc
if (!pages)
return;
- ret = iommu_map(domain->domain, 0, page_to_phys(pages), PAGE_SIZE * 2,
- IOMMU_READ | IOMMU_WRITE | IOMMU_CACHE, GFP_KERNEL);
- if (!ret) {
- size_t unmapped = iommu_unmap(domain->domain, 0, PAGE_SIZE);
+ list_for_each_entry(region, regions, list) {
+ start = ALIGN(region->start, PAGE_SIZE * 2);
+ if (start >= region->end || (region->end - start < PAGE_SIZE * 2))
+ continue;
- if (unmapped == PAGE_SIZE)
- iommu_unmap(domain->domain, PAGE_SIZE, PAGE_SIZE);
- else
- domain->fgsp = true;
+ ret = iommu_map(domain->domain, start, page_to_phys(pages), PAGE_SIZE * 2,
- IOMMU_READ | IOMMU_WRITE | IOMMU_CACHE);
++ IOMMU_READ | IOMMU_WRITE | IOMMU_CACHE, GFP_KERNEL);
+ if (!ret) {
+ size_t unmapped = iommu_unmap(domain->domain, start, PAGE_SIZE);
+
+ if (unmapped == PAGE_SIZE)
+ iommu_unmap(domain->domain, start + PAGE_SIZE, PAGE_SIZE);
+ else
+ domain->fgsp = true;
+ }
+ break;
}
__free_pages(pages, order);
Thanks for the report, Stephen. Alex, On Fri, Jan 27, 2023 at 02:13:30PM +1100, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the iommu tree got a conflict in: > > drivers/vfio/vfio_iommu_type1.c > > between commit: > > 895c0747f726 ("vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp()") > > from Linus' tree and commit: > > 1369459b2e21 ("iommu: Add a gfp parameter to iommu_map()") > > from the iommu tree. In case you want to fix this up in your tree, the patch-set causing this is in a separate branch in the IOMMU tree which you can merge into your tree: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git iommu-memory-accounting Regards, -- Jörg Rödel jroedel@suse.de SUSE Software Solutions Germany GmbH Frankenstraße 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
On Mon, 30 Jan 2023 09:49:16 +0100 Joerg Roedel <jroedel@suse.de> wrote: > Thanks for the report, Stephen. > > Alex, > > On Fri, Jan 27, 2023 at 02:13:30PM +1100, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the iommu tree got a conflict in: > > > > drivers/vfio/vfio_iommu_type1.c > > > > between commit: > > > > 895c0747f726 ("vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp()") > > > > from Linus' tree and commit: > > > > 1369459b2e21 ("iommu: Add a gfp parameter to iommu_map()") > > > > from the iommu tree. > > In case you want to fix this up in your tree, the patch-set causing this > is in a separate branch in the IOMMU tree which you can merge into your > tree: > > git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git iommu-memory-accounting Hi Joerg, The conflict is with mainline, not my next branch. The commit above went in as a fix for v6.2. Thanks, Alex
On Mon, Jan 30, 2023 at 10:55:49AM -0700, Alex Williamson wrote: > On Mon, 30 Jan 2023 09:49:16 +0100 > Joerg Roedel <jroedel@suse.de> wrote: > > > Thanks for the report, Stephen. > > > > Alex, > > > > On Fri, Jan 27, 2023 at 02:13:30PM +1100, Stephen Rothwell wrote: > > > Hi all, > > > > > > Today's linux-next merge of the iommu tree got a conflict in: > > > > > > drivers/vfio/vfio_iommu_type1.c > > > > > > between commit: > > > > > > 895c0747f726 ("vfio/type1: Respect IOMMU reserved regions in vfio_test_domain_fgsp()") > > > > > > from Linus' tree and commit: > > > > > > 1369459b2e21 ("iommu: Add a gfp parameter to iommu_map()") > > > > > > from the iommu tree. > > > > In case you want to fix this up in your tree, the patch-set causing this > > is in a separate branch in the IOMMU tree which you can merge into your > > tree: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git iommu-memory-accounting > > Hi Joerg, > > The conflict is with mainline, not my next branch. The commit above > went in as a fix for v6.2. Thanks, I usually sort out conflicts against the rc series when I send a PR, I pulled Joerg's branch so I can deal with these conflicts, they are trivial enough There will be another -rc conflict from rdma as well: https://lore.kernel.org/r/20230129093757.637354-1-yangyingliang@huawei.com Jason
© 2016 - 2025 Red Hat, Inc.