Re: [PATCH] dt-bindings: arm-smmu: Fix json-schema syntax

2021-06-22 Thread Krzysztof Kozlowski
On Mon, 21 Jun 2021 16:00:36 +0200, Thierry Reding wrote: > Commit 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible > string") introduced a jsonschema syntax error as a result of a rebase > gone wrong. Fix it. Applied, thanks! [1/1] dt-bindings: arm-smmu: Fix json-schema syntax

Re: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-22 Thread Yongji Xie
On Wed, Jun 23, 2021 at 11:31 AM Jason Wang wrote: > > > 在 2021/6/22 下午4:14, Yongji Xie 写道: > > On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: > >> > >> 在 2021/6/22 下午3:22, Yongji Xie 写道: > We need fix a way to propagate the error to the userspace. > > E.g if we want to stop

Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-22 Thread Jason Wang
在 2021/6/22 下午4:14, Yongji Xie 写道: On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: 在 2021/6/22 下午3:22, Yongji Xie 写道: We need fix a way to propagate the error to the userspace. E.g if we want to stop the deivce, we will delay the status reset until we get respose from the userspace? I

Re: swiotlb/caamjr regression (Was: [GIT PULL] (swiotlb) stable/for-linus-5.12)

2021-06-22 Thread 'Dominique MARTINET'
Konrad Rzeszutek Wilk wrote on Tue, Jun 22, 2021 at 05:58:14PM -0400: > On Tue, Jun 22, 2021 at 04:48:24PM +0900, 'Dominique MARTINET' wrote: > > Thanks, that should be good. > > > > Do you want me to send a follow-up patch with the two extra checks > > (tlb_addr & (IO_TLB_SIZE -1)) >

Re: [PATCH v14 6/6] iommu: Remove mode argument from iommu_set_dma_strict()

2021-06-22 Thread Robin Murphy
On 2021-06-21 15:32, Lu Baolu wrote: Hi Robin, On 2021/6/21 19:59, Robin Murphy wrote: On 2021-06-21 11:34, John Garry wrote: On 21/06/2021 11:00, Lu Baolu wrote: void iommu_set_dma_strict(bool force) {   if (force == true) iommu_dma_strict = true;  else if

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Robin Murphy
On 2021-06-22 17:06, Doug Anderson wrote: Hi, On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: Hi Doug, On 2021-06-22 00:52, Douglas Anderson wrote: This patch attempts to put forward a proposal for enabling non-strict DMA on a device-by-device basis. The patch series requests

[GIT PULL] (stable) stable/for-linus-5.14

2021-06-22 Thread Konrad Rzeszutek Wilk
Hey Linus, Please git pull the following branch: git pull git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git stable/for-linus-5.14 which has the regression for the DMA operations where the offset was ignored and corruptions would appear. Going forward there will be a cleanups to

Re: swiotlb/caamjr regression (Was: [GIT PULL] (swiotlb) stable/for-linus-5.12)

2021-06-22 Thread Konrad Rzeszutek Wilk
On Tue, Jun 22, 2021 at 04:48:24PM +0900, 'Dominique MARTINET' wrote: > Konrad Rzeszutek Wilk wrote on Mon, Jun 21, 2021 at 09:16:43AM -0400: > > The beaty of 'devel' and 'linux-next' is that they can be reshuffled and > > mangled. I pushed them original patch from Bumyong there and will let > >

Re: [PATCH v14 01/12] swiotlb: Refactor swiotlb init functions

2021-06-22 Thread Stefano Stabellini
On Sat, 19 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by:

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 1:06 PM Saravana Kannan wrote: > > On Tue, Jun 22, 2021 at 1:02 PM Rob Herring wrote: > > > > On Tue, Jun 22, 2021 at 09:06:02AM -0700, Doug Anderson wrote: > > > Hi, > > > > > > On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: > > > > > > > > Hi Doug, > > > > >

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Saravana Kannan via iommu
On Tue, Jun 22, 2021 at 1:02 PM Rob Herring wrote: > > On Tue, Jun 22, 2021 at 09:06:02AM -0700, Doug Anderson wrote: > > Hi, > > > > On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: > > > > > > Hi Doug, > > > > > > On 2021-06-22 00:52, Douglas Anderson wrote: > > > > > > > > This patch

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Rob Herring
On Tue, Jun 22, 2021 at 09:06:02AM -0700, Doug Anderson wrote: > Hi, > > On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: > > > > Hi Doug, > > > > On 2021-06-22 00:52, Douglas Anderson wrote: > > > > > > This patch attempts to put forward a proposal for enabling non-strict > > > DMA on a

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Saravana Kannan via iommu
On Tue, Jun 22, 2021 at 9:46 AM Doug Anderson wrote: > > Hi, > > On Mon, Jun 21, 2021 at 7:56 PM Saravana Kannan wrote: > > > > On Mon, Jun 21, 2021 at 4:53 PM Douglas Anderson > > wrote: > > > > > > In the patch ("drivers: base: Add bits to struct device to control > > > iommu strictness") we

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 10:46 AM John Garry wrote: > > On 22/06/2021 00:52, Douglas Anderson wrote: > > > > This patch attempts to put forward a proposal for enabling non-strict > > DMA on a device-by-device basis. The patch series requests non-strict > > DMA for the Qualcomm SDHCI

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 11:45 AM Rajat Jain wrote: > > On Mon, Jun 21, 2021 at 4:53 PM Douglas Anderson > wrote: > > > > In the patch ("drivers: base: Add bits to struct device to control > > iommu strictness") we add the ability for devices to tell us about > > their IOMMU strictness

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Rajat Jain via iommu
On Mon, Jun 21, 2021 at 4:53 PM Douglas Anderson wrote: > > In the patch ("drivers: base: Add bits to struct device to control > iommu strictness") we add the ability for devices to tell us about > their IOMMU strictness requirements. Let's now take that into account > in the IOMMU layer. > > A

Re: [PATCHv2 1/3] iommu/io-pgtable: Add a quirk to use tlb_flush_all() for partial walk flush

2021-06-22 Thread Robin Murphy
On 2021-06-22 15:27, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-22 17:41, Robin Murphy wrote: On 2021-06-22 08:11, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-21 21:15, Robin Murphy wrote: On 2021-06-18 03:51, Sai Prakash Ranjan wrote: Add a quirk IO_PGTABLE_QUIRK_TLB_INV_ALL to

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread John Garry
On 22/06/2021 00:52, Douglas Anderson wrote: This patch attempts to put forward a proposal for enabling non-strict DMA on a device-by-device basis. The patch series requests non-strict DMA for the Qualcomm SDHCI controller as a first device to enable, getting a nice bump in performance with

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 9:53 AM Doug Anderson wrote: > > Hi, > > On Mon, Jun 21, 2021 at 7:05 PM Lu Baolu wrote: > > > > On 6/22/21 7:52 AM, Douglas Anderson wrote: > > > @@ -1519,7 +1542,8 @@ static int iommu_get_def_domain_type(struct device > > > *dev) > > > > > > static int

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Doug Anderson
Hi, On Mon, Jun 21, 2021 at 7:05 PM Lu Baolu wrote: > > On 6/22/21 7:52 AM, Douglas Anderson wrote: > > @@ -1519,7 +1542,8 @@ static int iommu_get_def_domain_type(struct device > > *dev) > > > > static int iommu_group_alloc_default_domain(struct bus_type *bus, > >

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Doug Anderson
Hi, On Mon, Jun 21, 2021 at 7:56 PM Saravana Kannan wrote: > > On Mon, Jun 21, 2021 at 4:53 PM Douglas Anderson > wrote: > > > > In the patch ("drivers: base: Add bits to struct device to control > > iommu strictness") we add the ability for devices to tell us about > > their IOMMU strictness

Re: [PATCH] dt-bindings: arm-smmu: Fix json-schema syntax

2021-06-22 Thread Rob Herring
On Mon, Jun 21, 2021 at 7:58 AM Thierry Reding wrote: > > From: Thierry Reding > > Commit 4287861dca9d ("dt-bindings: arm-smmu: Add Tegra186 compatible > string") introduced a jsonschema syntax error as a result of a rebase > gone wrong. Fix it. > > Fixes: 4287861dca9d ("dt-bindings: arm-smmu:

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Doug Anderson
Hi, On Tue, Jun 22, 2021 at 4:35 AM Robin Murphy wrote: > > Hi Doug, > > On 2021-06-22 00:52, Douglas Anderson wrote: > > > > This patch attempts to put forward a proposal for enabling non-strict > > DMA on a device-by-device basis. The patch series requests non-strict > > DMA for the Qualcomm

Re: [PATCHv2 1/3] iommu/io-pgtable: Add a quirk to use tlb_flush_all() for partial walk flush

2021-06-22 Thread Sai Prakash Ranjan
Hi Robin, On 2021-06-22 17:41, Robin Murphy wrote: On 2021-06-22 08:11, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-21 21:15, Robin Murphy wrote: On 2021-06-18 03:51, Sai Prakash Ranjan wrote: Add a quirk IO_PGTABLE_QUIRK_TLB_INV_ALL to invalidate entire context with tlb_flush_all()

Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems

2021-06-22 Thread Rob Herring
On Tue, Jun 22, 2021 at 2:17 AM Geert Uytterhoeven wrote: > > Hi Rob, > > On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > > same size as the list is redundant and can be dropped. Note that is DT > > schema

[PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-06-22 Thread Roman Skakun
This commit is dedicated to fix incorrect conversion from cpu_addr to page address in cases when we get virtual address which allocated in the vmalloc range. As the result, virt_to_page() cannot convert this address properly and return incorrect page address. Need to detect such cases and obtains

Re: [PATCHv2 1/3] iommu/io-pgtable: Add a quirk to use tlb_flush_all() for partial walk flush

2021-06-22 Thread Robin Murphy
On 2021-06-22 08:11, Sai Prakash Ranjan wrote: Hi Robin, On 2021-06-21 21:15, Robin Murphy wrote: On 2021-06-18 03:51, Sai Prakash Ranjan wrote: Add a quirk IO_PGTABLE_QUIRK_TLB_INV_ALL to invalidate entire context with tlb_flush_all() callback in partial walk flush to improve unmap

Re: [PATCH 4/6] iommu: Combine device strictness requests with the global default

2021-06-22 Thread Robin Murphy
On 2021-06-22 00:52, Douglas Anderson wrote: In the patch ("drivers: base: Add bits to struct device to control iommu strictness") we add the ability for devices to tell us about their IOMMU strictness requirements. Let's now take that into account in the IOMMU layer. A few notes here: *

Re: [PATCH 0/6] iommu: Enable devices to request non-strict DMA, starting with QCom SD/MMC

2021-06-22 Thread Robin Murphy
Hi Doug, On 2021-06-22 00:52, Douglas Anderson wrote: This patch attempts to put forward a proposal for enabling non-strict DMA on a device-by-device basis. The patch series requests non-strict DMA for the Qualcomm SDHCI controller as a first device to enable, getting a nice bump in

Re: [PATCH v2 12/12] iommu: Do not allow IOMMU passthrough with Secure Launch

2021-06-22 Thread Robin Murphy
On 2021-06-21 18:51, Ross Philipson wrote: On 6/18/21 2:32 PM, Robin Murphy wrote: On 2021-06-18 17:12, Ross Philipson wrote: The IOMMU should always be set to default translated type after the PMRs are disabled to protect the MLE from DMA. Signed-off-by: Ross Philipson ---  

Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems

2021-06-22 Thread Geert Uytterhoeven
Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will

Re: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-22 Thread Yongji Xie
On Tue, Jun 22, 2021 at 3:50 PM Jason Wang wrote: > > > 在 2021/6/22 下午3:22, Yongji Xie 写道: > >> We need fix a way to propagate the error to the userspace. > >> > >> E.g if we want to stop the deivce, we will delay the status reset until > >> we get respose from the userspace? > >> > > I didn't

Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-22 Thread Jason Wang
在 2021/6/22 下午3:22, Yongji Xie 写道: We need fix a way to propagate the error to the userspace. E.g if we want to stop the deivce, we will delay the status reset until we get respose from the userspace? I didn't get how to delay the status reset. And should it be a DoS that we want to fix if

Re: swiotlb/caamjr regression (Was: [GIT PULL] (swiotlb) stable/for-linus-5.12)

2021-06-22 Thread 'Dominique MARTINET'
Konrad Rzeszutek Wilk wrote on Mon, Jun 21, 2021 at 09:16:43AM -0400: > The beaty of 'devel' and 'linux-next' is that they can be reshuffled and > mangled. I pushed them original patch from Bumyong there and will let > it sit for a day and then create a stable branch and give it to Linus. Thanks,

Re: [PATCH v5 2/5] ACPI: Move IOMMU setup code out of IORT

2021-06-22 Thread Eric Auger
Hi Jean, On 6/18/21 5:20 PM, Jean-Philippe Brucker wrote: > Extract the code that sets up the IOMMU infrastructure from IORT, since > it can be reused by VIOT. Move it one level up into a new > acpi_iommu_configure_id() function, which calls the IORT parsing > function which in turn calls the

Re: [PATCH v5 4/5] iommu/dma: Pass address limit rather than size to iommu_setup_dma_ops()

2021-06-22 Thread Eric Auger
Hi Jean, On 6/18/21 5:20 PM, Jean-Philippe Brucker wrote: > Passing a 64-bit address width to iommu_setup_dma_ops() is valid on > virtual platforms, but isn't currently possible. The overflow check in > iommu_dma_init_domain() prevents this even when @dma_base isn't 0. Pass > a limit address

Re: [PATCH 1/1] dma-mapping: remove trailing spaces and tabs

2021-06-22 Thread Christoph Hellwig
Thanks, applied to the dma-mapping tree. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH] dma debug: report -EEXIST errors in add_dma_entry

2021-06-22 Thread Christoph Hellwig
Thanks, applied to the dma-mapping tree. ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace

2021-06-22 Thread Yongji Xie
.On Tue, Jun 22, 2021 at 1:07 PM Jason Wang wrote: > > > 在 2021/6/21 下午6:41, Yongji Xie 写道: > > On Mon, Jun 21, 2021 at 5:14 PM Jason Wang wrote: > >> > >> 在 2021/6/15 下午10:13, Xie Yongji 写道: > >>> This VDUSE driver enables implementing vDPA devices in userspace. > >>> The vDPA device's control

Re: [PATCHv2 1/3] iommu/io-pgtable: Add a quirk to use tlb_flush_all() for partial walk flush

2021-06-22 Thread Sai Prakash Ranjan
Hi Robin, On 2021-06-21 21:15, Robin Murphy wrote: On 2021-06-18 03:51, Sai Prakash Ranjan wrote: Add a quirk IO_PGTABLE_QUIRK_TLB_INV_ALL to invalidate entire context with tlb_flush_all() callback in partial walk flush to improve unmap performance on select few platforms where the cost of