linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the iommu tree with Linus' tree
@ 2023-01-27  3:13 Stephen Rothwell
  2023-01-30  8:49 ` Joerg Roedel
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2023-01-27  3:13 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Alex Williamson, Jason Gunthorpe, Jason Gunthorpe, Joerg Roedel,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Niklas Schnelle

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

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);

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the iommu tree with Linus' tree
  2023-01-27  3:13 linux-next: manual merge of the iommu tree with Linus' tree Stephen Rothwell
@ 2023-01-30  8:49 ` Joerg Roedel
  2023-01-30 17:55   ` Alex Williamson
  0 siblings, 1 reply; 4+ messages in thread
From: Joerg Roedel @ 2023-01-30  8:49 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Joerg Roedel, Alex Williamson, Jason Gunthorpe, Jason Gunthorpe,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Niklas Schnelle

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the iommu tree with Linus' tree
  2023-01-30  8:49 ` Joerg Roedel
@ 2023-01-30 17:55   ` Alex Williamson
  2023-01-30 18:00     ` Jason Gunthorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Williamson @ 2023-01-30 17:55 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Stephen Rothwell, Joerg Roedel, Jason Gunthorpe, Jason Gunthorpe,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Niklas Schnelle

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linux-next: manual merge of the iommu tree with Linus' tree
  2023-01-30 17:55   ` Alex Williamson
@ 2023-01-30 18:00     ` Jason Gunthorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2023-01-30 18:00 UTC (permalink / raw)
  To: Alex Williamson
  Cc: Joerg Roedel, Stephen Rothwell, Joerg Roedel,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Niklas Schnelle

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-30 18:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27  3:13 linux-next: manual merge of the iommu tree with Linus' tree Stephen Rothwell
2023-01-30  8:49 ` Joerg Roedel
2023-01-30 17:55   ` Alex Williamson
2023-01-30 18:00     ` Jason Gunthorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).