Re: [Resend RFC PATCH V2 07/12] HV/Vmbus: Initialize VMbus ring buffer for Isolation VM

2021-04-19 Thread Christoph Hellwig
On Thu, Apr 15, 2021 at 04:24:15PM -0400, Konrad Rzeszutek Wilk wrote: > So you are exposing these two: > EXPORT_SYMBOL_GPL(get_vm_area); > EXPORT_SYMBOL_GPL(ioremap_page_range); > > But if you used vmap wouldn't you get the same thing for free? Yes, this needs to go into some vmap version,

[PATCH v3] iommu/iova: put free_iova_mem() outside of spinlock iova_rbtree_lock

2021-04-19 Thread chenxiang
From: Xiang Chen It is not necessary to put free_iova_mem() inside of spinlock/unlock iova_rbtree_lock which only leads to more completion for the spinlock. It has a small promote on the performance after the change. And also rename private_free_iova() as remove_iova() because the function will

RE: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Alice Guo (OSS)
> -Original Message- > From: Dominique MARTINET > Sent: 2021年4月19日 13:03 > To: Alice Guo (OSS) > Subject: Re: [RFC v1 PATCH 3/3] driver: update all the code that use > soc_device_match > > Alice Guo (OSS) wrote on Mon, Apr 19, 2021 at 12:27:22PM +0800: > > From: Alice Guo > > > >

Re: [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-19 Thread Dominique MARTINET
First comment overall for the whole serie: Since it is the solution I had suggested when I reported the problem[1] I have no qualm on the approach, comments for individual patches follow. [1] http://lore.kernel.org/r/YGGZJjAxA1IO+/v...@atmark-techno.com Alice Guo (OSS) wrote on Mon, Apr 19,

[RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-19 Thread Alice Guo (OSS)
From: Alice Guo In i.MX8M boards, the registration of SoC device is later than caam driver which needs it. Caam driver needs soc_device_match to provide -EPROBE_DEFER when no SoC device is registered and no early_soc_dev_attr. Signed-off-by: Alice Guo --- drivers/base/soc.c | 5 + 1 file

[PATCH] iommu: Use passthrough mode for the Intel IPUs

2021-04-19 Thread Bingbu Cao
Intel IPU(Image Processing Unit) has its own (IO)MMU hardware, The IPU driver allocates its own page table that is not mapped via the DMA, and thus the Intel IOMMU driver blocks access giving this error: DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Read] Request device [00:05.0] PASID

[RFC v1 PATCH 2/3] caam: add defer probe when the caam driver cannot identify SoC

2021-04-19 Thread Alice Guo (OSS)
From: Alice Guo When imx8_soc_info_driver uses module_platform_driver() to regitser itself, the caam driver cannot identify the SoC in the machine because the SoC driver is probed later, so that add return -EPROBE_DEFER. Signed-off-by: Alice Guo --- drivers/crypto/caam/ctrl.c | 3 +++ 1 file

RE: [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-19 Thread Alice Guo (OSS)
> -Original Message- > From: Dominique MARTINET > Sent: 2021年4月19日 12:49 > To: Alice Guo (OSS) > Cc: gre...@linuxfoundation.org; raf...@kernel.org; Horia Geanta > ; Aymen Sghaier ; > herb...@gondor.apana.org.au; da...@davemloft.net; t...@atomide.com; > geert+rene...@glider.be;

[RFC v1 PATCH 0/3] support soc_device_match to return -EPROBE_DEFER

2021-04-19 Thread Alice Guo (OSS)
From: Alice Guo In patch "soc: imx8m: change to use platform driver", change soc-imx8m.c to use module platform driver and use NVMEM APIs to ocotp register, the reason is that directly reading ocotp egister causes kexec kernel hang because kernel will disable unused clks after kernel boots up.

RE: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Alice Guo (OSS)
> -Original Message- > From: Leon Romanovsky > Sent: 2021年4月19日 13:02 > To: Alice Guo (OSS) > Cc: gre...@linuxfoundation.org; raf...@kernel.org; Horia Geanta > ; Aymen Sghaier ; > herb...@gondor.apana.org.au; da...@davemloft.net; t...@atomide.com; > geert+rene...@glider.be;

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Dominique MARTINET
Alice Guo (OSS) wrote on Mon, Apr 19, 2021 at 12:27:22PM +0800: > From: Alice Guo > > Update all the code that use soc_device_match A single patch might be difficult to accept for all components, a each maintainer will probably want to have a say on their subsystem? I would suggest to split

Re: [PATCH] iommu: Use passthrough mode for the Intel IPUs

2021-04-19 Thread Lu Baolu
Hi Bingbu, On 4/19/21 12:57 PM, Bingbu Cao wrote: Intel IPU(Image Processing Unit) has its own (IO)MMU hardware, The IPU driver allocates its own page table that is not mapped via the DMA, and thus the Intel IOMMU driver blocks access giving this error: DMAR: DRHD: handling fault status reg 3

[RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Alice Guo (OSS)
From: Alice Guo Update all the code that use soc_device_match because add support for soc_device_match returning -EPROBE_DEFER. Signed-off-by: Alice Guo --- drivers/bus/ti-sysc.c | 2 +- drivers/clk/renesas/r8a7795-cpg-mssr.c| 4 +++-

Re: [RFC v1 PATCH 1/3] drivers: soc: add support for soc_device_match returning -EPROBE_DEFER

2021-04-19 Thread Geert Uytterhoeven
Hi Alice, CC Arnd (soc_device_match() author) On Mon, Apr 19, 2021 at 6:28 AM Alice Guo (OSS) wrote: > From: Alice Guo > > In i.MX8M boards, the registration of SoC device is later than caam > driver which needs it. Caam driver needs soc_device_match to provide > -EPROBE_DEFER when no SoC

Re: [PATCH v3] iommu/iova: put free_iova_mem() outside of spinlock iova_rbtree_lock

2021-04-19 Thread John Garry
On 19/04/2021 08:13, chenxiang wrote: From: Xiang Chen It is not necessary to put free_iova_mem() inside of spinlock/unlock iova_rbtree_lock which only leads to more completion for the spinlock. It has a small promote on the performance after the change. And also rename private_free_iova() as

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Geert Uytterhoeven
Hi Dominique, CC Arnd (soc_device_match() author) On Mon, Apr 19, 2021 at 7:03 AM Dominique MARTINET wrote: > Alice Guo (OSS) wrote on Mon, Apr 19, 2021 at 12:27:22PM +0800: > > From: Alice Guo > > Update all the code that use soc_device_match > > A single patch might be difficult to accept

Re: [PATCH v3 02/12] iommu: Add iommu_split_block interface

2021-04-19 Thread Keqian Zhu
Hi Baolu, On 2021/4/14 15:14, Lu Baolu wrote: > On 4/13/21 4:54 PM, Keqian Zhu wrote: >> Block(largepage) mapping is not a proper granule for dirty log tracking. >> Take an extreme example, if DMA writes one byte, under 1G mapping, the >> dirty amount reported is 1G, but under 4K mapping, the

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Dominique MARTINET
Geert Uytterhoeven wrote on Mon, Apr 19, 2021 at 11:03:24AM +0200: > > This is going to need quite some more work to be acceptable, in my > > opinion, but I think it should be possible. > > In general, this is very hard to do, IMHO. Some drivers may be used on > multiple platforms, some of them

Re: [PATCH v3 02/12] iommu: Add iommu_split_block interface

2021-04-19 Thread Lu Baolu
Hi Keqian, On 2021/4/19 17:32, Keqian Zhu wrote: +EXPORT_SYMBOL_GPL(iommu_split_block); Do you really have any consumers of this interface other than the dirty bit tracking? If not, I don't suggest to make this as a generic IOMMU interface. There is an implicit requirement for such

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Guenter Roeck
On 4/18/21 9:27 PM, Alice Guo (OSS) wrote: > From: Alice Guo > > Update all the code that use soc_device_match because add support for > soc_device_match returning -EPROBE_DEFER. > > Signed-off-by: Alice Guo > --- [ ... ] > drivers/watchdog/renesas_wdt.c| 2 +- > 48 files

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-04-19 Thread Bjorn Andersson
On Fri 26 Feb 03:55 CST 2021, Sai Prakash Ranjan wrote: > Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU > both implement "arm,mmu-500" in some QTI SoCs and to run through > adreno smmu specific implementation such as enabling split pagetables > support, we need to match the

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Arnd Bergmann
On Mon, Apr 19, 2021 at 11:33 AM Dominique MARTINET wrote: > Geert Uytterhoeven wrote on Mon, Apr 19, 2021 at 11:03:24AM +0200: > > > soc_device_match() should only be used as a last resort, to identify > > systems that cannot be identified otherwise. Typically this is used for > > quirks, which

Re: [PATCH v2 1/3] iommu: io-pgtable: add DART pagetable format

2021-04-19 Thread Will Deacon
On Fri, Apr 09, 2021 at 09:38:15PM +0200, Arnd Bergmann wrote: > On Fri, Apr 9, 2021 at 6:56 PM Sven Peter wrote: > > On Wed, Apr 7, 2021, at 12:44, Will Deacon wrote: > > > On Sun, Mar 28, 2021 at 09:40:07AM +0200, Sven Peter wrote: > > > > > > > + cfg->pgsize_bitmap &= SZ_16K; > > > > + if

Re: [PATCH v2] iommu/amd: Fix extended features logging

2021-04-19 Thread Alexander Monakov
On Sun, 11 Apr 2021, Joe Perches wrote: > > v2: avoid pr_info(""), change pci_info() to pr_info() for a nicer > > solution > > > >  drivers/iommu/amd/init.c | 4 ++-- > >  1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c > >

Re: [PATCH v2] iommu/amd: Fix extended features logging

2021-04-19 Thread Joe Perches
On Mon, 2021-04-19 at 22:23 +0300, Alexander Monakov wrote: > On Sun, 11 Apr 2021, Joe Perches wrote: > > > > v2: avoid pr_info(""), change pci_info() to pr_info() for a nicer > > > solution > > > > > >  drivers/iommu/amd/init.c | 4 ++-- > > >  1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [RFC v1 PATCH 3/3] driver: update all the code that use soc_device_match

2021-04-19 Thread Dominique MARTINET
Arnd Bergmann wrote on Mon, Apr 19, 2021 at 02:16:36PM +0200: > In some cases, you can use the device_link infrastructure to deal > with dependencies between devices. Not sure if this would help > in your case, but have a look at device_link_add() etc in drivers/base/core.c I'll need to actually

Re: [PATCH v3 02/12] iommu: Add iommu_split_block interface

2021-04-19 Thread Keqian Zhu
Hi Baolu, On 2021/4/19 21:33, Lu Baolu wrote: > Hi Keqian, > > On 2021/4/19 17:32, Keqian Zhu wrote: +EXPORT_SYMBOL_GPL(iommu_split_block); >>> Do you really have any consumers of this interface other than the dirty >>> bit tracking? If not, I don't suggest to make this as a generic IOMMU

[RESEND v2] iommu/vt-d: Use passthrough mode for the Intel IPUs

2021-04-19 Thread Bingbu Cao
Intel IPU(Image Processing Unit) has its own (IO)MMU hardware, The IPU driver allocates its own page table that is not mapped via the DMA, and thus the Intel IOMMU driver blocks access giving this error: DMAR: DRHD: handling fault status reg 3 DMAR: [DMA Read] Request device [00:05.0] PASID

[PATCH] pci: Rename pci_dev->untrusted to pci_dev->external

2021-04-19 Thread Rajat Jain via iommu
The current flag name "untrusted" is not correct as it is populated using the firmware property "external-facing" for the parent ports. In other words, the firmware only says which ports are external facing, so the field really identifies the devices as external (vs internal). Only field

Re: [PATCH v3 02/12] iommu: Add iommu_split_block interface

2021-04-19 Thread Lu Baolu
Hi Keqian, On 4/20/21 9:25 AM, Keqian Zhu wrote: Hi Baolu, On 2021/4/19 21:33, Lu Baolu wrote: Hi Keqian, On 2021/4/19 17:32, Keqian Zhu wrote: +EXPORT_SYMBOL_GPL(iommu_split_block); Do you really have any consumers of this interface other than the dirty bit tracking? If not, I don't

Re: [RFC PATCH v5 11/15] iommu/io-pgtable-arm: Implement arm_lpae_map_pages()

2021-04-19 Thread chenxiang (M)
Hi Isaac, 在 2021/4/9 1:13, Isaac J. Manjarres 写道: Implement the map_pages() callback for the ARM LPAE io-pgtable format. Signed-off-by: Isaac J. Manjarres --- drivers/iommu/io-pgtable-arm.c | 42 ++ 1 file changed, 32 insertions(+), 10 deletions(-) diff