RE: [PATCH] iommu/arm-smmu: fix the module name for disable_bypass parameter

2020-02-11 Thread Leo Li
> -Original Message- > From: Russell King - ARM Linux admin > Sent: Tuesday, February 11, 2020 5:46 PM > To: Leo Li > Cc: Joerg Roedel ; Will Deacon ; > Robin Murphy ; iommu@lists.linux- > foundation.org; linux-ker...@vger.kernel.org; linux-arm- > ker...@lists.infradead.org > Subject:

Re: [PATCH] iommu/vt-d: consider real PCI device when checking if mapping is needed

2020-02-11 Thread Daniel Drake
On Wed, Feb 12, 2020 at 12:03 AM Derrick, Jonathan wrote: > On Tue, 2020-02-11 at 17:13 +0800, Daniel Drake wrote: > > The PCI devices handled by intel-iommu may have a DMA requester on > > another bus, such as VMD subdevices needing to use the VMD endpoint. > > > > The real DMA device is now used

[PATCH] iommu/arm-smmu: fix the module name to be consistent with older kernel

2020-02-11 Thread Li Yang
Commit cd221bd24ff5 ("iommu/arm-smmu: Allow building as a module") introduced a side effect that changed the module name from arm-smmu to arm-smmu-mod. This breaks the users of kernel parameters for the driver (e.g. arm-smmu.disable_bypass). This patch changes the module name back to be consisten

Re: [PATCH] iommu/arm-smmu: fix the module name for disable_bypass parameter

2020-02-11 Thread Li Yang
On Tue, Feb 11, 2020 at 5:47 PM Russell King - ARM Linux admin wrote: > > On Tue, Feb 11, 2020 at 05:36:55PM -0600, Li Yang wrote: > > Since commit cd221bd24ff5 ("iommu/arm-smmu: Allow building as a module"), > > there is a side effect that the module name is changed from arm-smmu to > > arm-smmu-

Re: [PATCH v1] xprtrdma: Fix DMA scatter-gather list mapping imbalance

2020-02-11 Thread Andre Tomt
On 11.02.2020 23:00, Chuck Lever wrote: Hi Andre, thanks for trying this out. On Feb 11, 2020, at 3:50 PM, Andre Tomt wrote: On 11.02.2020 20:58, Chuck Lever wrote: The @nents value that was passed to ib_dma_map_sg() has to be passed to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg()

Re: [PATCH] iommu/arm-smmu: fix the module name for disable_bypass parameter

2020-02-11 Thread Russell King - ARM Linux admin
On Tue, Feb 11, 2020 at 05:36:55PM -0600, Li Yang wrote: > Since commit cd221bd24ff5 ("iommu/arm-smmu: Allow building as a module"), > there is a side effect that the module name is changed from arm-smmu to > arm-smmu-mod. So the kernel parameter for disable_bypass need to be > changed too. Fix t

[PATCH] iommu/arm-smmu: fix the module name for disable_bypass parameter

2020-02-11 Thread Li Yang
Since commit cd221bd24ff5 ("iommu/arm-smmu: Allow building as a module"), there is a side effect that the module name is changed from arm-smmu to arm-smmu-mod. So the kernel parameter for disable_bypass need to be changed too. Fix the Kconfig help and error message to the correct parameter name.

Re: [PATCH v1] xprtrdma: Fix DMA scatter-gather list mapping imbalance

2020-02-11 Thread Chuck Lever
Hi Andre, thanks for trying this out. > On Feb 11, 2020, at 3:50 PM, Andre Tomt wrote: > > On 11.02.2020 20:58, Chuck Lever wrote: >> The @nents value that was passed to ib_dma_map_sg() has to be passed >> to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to >> concatenate sg ent

Re: [PATCH v1] xprtrdma: Fix DMA scatter-gather list mapping imbalance

2020-02-11 Thread Andre Tomt
On 11.02.2020 20:58, Chuck Lever wrote: The @nents value that was passed to ib_dma_map_sg() has to be passed to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to concatenate sg entries, it will return a different nents value than it was passed. The bug was exposed by recent chang

[PATCH v1] xprtrdma: Fix DMA scatter-gather list mapping imbalance

2020-02-11 Thread Chuck Lever
The @nents value that was passed to ib_dma_map_sg() has to be passed to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to concatenate sg entries, it will return a different nents value than it was passed. The bug was exposed by recent changes to the AMD IOMMU driver. Reported-by:

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Andre Tomt
On 11.02.2020 17:36, Robin Murphy wrote: On 11/02/2020 4:03 pm, Chuck Lever wrote: Robin, your explanation makes sense to me. I can post a fix for this imbalance later today for Andre to try. FWIW here's a quick hack which *should* suppress the concatenation behaviour - if it makes Andre's sy

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Chuck Lever
> On Feb 11, 2020, at 11:36 AM, Robin Murphy wrote: > > On 11/02/2020 4:03 pm, Chuck Lever wrote: >>> On Feb 11, 2020, at 10:32 AM, Robin Murphy wrote: >>> >>> On 11/02/2020 3:24 pm, Chuck Lever wrote: > On Feb 11, 2020, at 10:12 AM, Robin Murphy wrote: > > On 11/02/2020 1:48 p

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Robin Murphy
On 11/02/2020 4:03 pm, Chuck Lever wrote: On Feb 11, 2020, at 10:32 AM, Robin Murphy wrote: On 11/02/2020 3:24 pm, Chuck Lever wrote: On Feb 11, 2020, at 10:12 AM, Robin Murphy wrote: On 11/02/2020 1:48 pm, Chuck Lever wrote: Andre- Thank you for the detailed report! Tom- There is a rich

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Chuck Lever
> On Feb 11, 2020, at 10:32 AM, Robin Murphy wrote: > > On 11/02/2020 3:24 pm, Chuck Lever wrote: >>> On Feb 11, 2020, at 10:12 AM, Robin Murphy wrote: >>> >>> On 11/02/2020 1:48 pm, Chuck Lever wrote: Andre- Thank you for the detailed report! Tom- There is a rich set of

Re: [PATCH] iommu/vt-d: consider real PCI device when checking if mapping is needed

2020-02-11 Thread Derrick, Jonathan
Hi Daniel On Tue, 2020-02-11 at 17:13 +0800, Daniel Drake wrote: > The PCI devices handled by intel-iommu may have a DMA requester on > another bus, such as VMD subdevices needing to use the VMD endpoint. > > The real DMA device is now used for the DMA mapping, but one case was > missed earlier,

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Robin Murphy
On 11/02/2020 3:24 pm, Chuck Lever wrote: On Feb 11, 2020, at 10:12 AM, Robin Murphy wrote: On 11/02/2020 1:48 pm, Chuck Lever wrote: Andre- Thank you for the detailed report! Tom- There is a rich set of trace points available in the RPC/RDMA implementation in 5.4/5.5, fwiw. Please keep me

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Chuck Lever
> On Feb 11, 2020, at 10:12 AM, Robin Murphy wrote: > > On 11/02/2020 1:48 pm, Chuck Lever wrote: >> Andre- >> Thank you for the detailed report! >> Tom- >> There is a rich set of trace points available in the RPC/RDMA implementation >> in 5.4/5.5, fwiw. >> Please keep me in the loop, let me

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Robin Murphy
On 11/02/2020 1:48 pm, Chuck Lever wrote: Andre- Thank you for the detailed report! Tom- There is a rich set of trace points available in the RPC/RDMA implementation in 5.4/5.5, fwiw. Please keep me in the loop, let me know if there is anything I can do to help. One aspect that may be worth

Re: AMD IOMMU stops RDMA NFS from working since kernel 5.5 (bisected)

2020-02-11 Thread Chuck Lever
Andre- Thank you for the detailed report! Tom- There is a rich set of trace points available in the RPC/RDMA implementation in 5.4/5.5, fwiw. Please keep me in the loop, let me know if there is anything I can do to help. > On Feb 11, 2020, at 2:25 AM, Joerg Roedel wrote: > > Adding Tom's ne

Re: [PATCH 2/3] iommu: Add Allwinner H6 IOMMU driver

2020-02-11 Thread Maxime Ripard
Hi Robin, On Mon, Jan 27, 2020 at 07:01:02PM +, Robin Murphy wrote: > > > > +static void sun50i_iommu_domain_free(struct iommu_domain *domain) > > > > +{ > > > > + struct sun50i_iommu_domain *sun50i_domain = > > > > to_sun50i_domain(domain); > > > > + struct sun50i_iommu *iommu =

[PATCH] iommu/vt-d: consider real PCI device when checking if mapping is needed

2020-02-11 Thread Daniel Drake
The PCI devices handled by intel-iommu may have a DMA requester on another bus, such as VMD subdevices needing to use the VMD endpoint. The real DMA device is now used for the DMA mapping, but one case was missed earlier, when allocating memory through (e.g.) intel_map_page(). Confusion ensues if

Re: [PATCH] iommu/intel-iommu: set as DUMMY_DEVICE_DOMAIN_INFO if no IOMMU

2020-02-11 Thread Daniel Drake
On Sat, Feb 8, 2020 at 2:30 PM Lu Baolu wrote: > > The devices under segment 1 are fake devices produced by > > intel-nvme-remap mentioned here https://lkml.org/lkml/2020/2/5/139 > > Has this series been accepted? Sadly not - we didn't find any consensus on the right approach, and further convers

[PATCH] iommu/dmar: ignore devices with out-of-spec domain number

2020-02-11 Thread Daniel Drake
VMD subdevices are created with a PCI domain ID of 0x1 or higher. These subdevices are also handled like all other PCI devices by dmar_pci_bus_notifier(). However, when dmar_alloc_pci_notify_info() take records of such devices, it will truncate the domain ID to a u16 value (in info->seg). The

Re: [PATCH v12 2/4] uacce: add uacce driver

2020-02-11 Thread zhangfei
On 2020/2/11 上午7:37, Greg Kroah-Hartman wrote: On Wed, Jan 15, 2020 at 10:12:46PM +0800, Zhangfei Gao wrote: From: Kenneth Lee Uacce (Unified/User-space-access-intended Accelerator Framework) targets to provide Shared Virtual Addressing (SVA) between accelerators and processes. So accelerato