Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement

2019-05-30 Thread David Miller
From: laurentiu.tu...@nxp.com Date: Thu, 30 May 2019 17:19:45 +0300 > Depends on this pull request: > > http://lists.infradead.org/pipermail/linux-arm-kernel/2019-May/653554.html I'm not sure how you want me to handle this.

Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement

2019-05-30 Thread Li Yang
On Thu, May 30, 2019 at 5:09 PM David Miller wrote: > > From: laurentiu.tu...@nxp.com > Date: Thu, 30 May 2019 17:19:45 +0300 > > > Depends on this pull request: > > > > http://lists.infradead.org/pipermail/linux-arm-kernel/2019-May/653554.html > > I'm not sure how you want me to handle this.

Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-30 Thread Christoph Hellwig
Please don't add your private flag to page-flags.h. The whole point of the private flag is that you can use it in any way you want withou touching the common code.

Re: [PATCH v2 3/3] xen/swiotlb: remember having called xen_create_contiguous_region()

2019-05-30 Thread Boris Ostrovsky
On 5/30/19 5:04 AM, Christoph Hellwig wrote: > Please don't add your private flag to page-flags.h. The whole point of > the private flag is that you can use it in any way you want withou > touching the common code. There is already a bunch of aliases for various sub-components (including Xen)

[PATCH v3 5/6] dpaa_eth: fix iova handling for contiguous frames

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor The driver relies on the no longer valid assumption that dma addresses (iovas) are identical to physical addressees and uses phys_to_virt() to make iova -> vaddr conversions. Fix this by adding a function that does proper iova -> phys conversions using the iommu api and

[PATCH v3 6/6] dpaa_eth: fix iova handling for sg frames

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor The driver relies on the no longer valid assumption that dma addresses (iovas) are identical to physical addressees and uses phys_to_virt() to make iova -> vaddr conversions. Fix this also for scatter-gather frames using the iova -> phys conversion function added in the

[PATCH v3 1/6] fsl/fman: don't touch liodn base regs reserved on non-PAMU SoCs

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor liodn base registers are specific to PAMU based NXP systems and on SMMU based ones are reserved. Don't access them if PAMU is compiled in. Signed-off-by: Laurentiu Tudor --- drivers/net/ethernet/freescale/fman/fman.c | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH v3 4/6] dpaa_eth: base dma mappings on the fman rx port

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor The dma transactions initiator is the rx fman port so that's the device that the dma mappings should be done. Previously the mappings were done through the MAC device which makes no sense because it's neither dma-able nor connected in any way to smmu. Signed-off-by:

[PATCH v3 2/6] fsl/fman: add API to get the device behind a fman port

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor Add an API that retrieves the 'struct device' that the specified fman port probed against. The new API will be used in a subsequent iommu enablement related patch. Signed-off-by: Laurentiu Tudor Acked-by: Madalin Bucur --- drivers/net/ethernet/freescale/fman/fman_port.c

[PATCH v3 3/6] dpaa_eth: defer probing after qbman

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor Enabling SMMU altered the order of device probing causing the dpaa1 ethernet driver to get probed before qbman and causing a boot crash. Add predictability in the probing order by deferring the ethernet driver probe after qbman and portals by using the recently introduced

[PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement

2019-05-30 Thread laurentiu . tudor
From: Laurentiu Tudor This patch series contains several fixes in preparation for SMMU support on NXP LS1043A and LS1046A chips. Once these get picked up, I'll submit the actual SMMU enablement patches consisting in the required device tree changes. This patch series contains only part of the

Re: [PATCH v8 1/7] iommu: enhance IOMMU default DMA mode build options

2019-05-30 Thread John Garry
On 30/05/2019 04:48, Zhen Lei wrote: First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the opportunity to set {lazy|strict} mode as default at build time. Then put the three config options in an choice, make people can only choose one of the three at a time. Since this was

[PATCH v8 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2019-05-30 Thread Jean-Philippe Brucker
Some systems implement virtio-iommu as a PCI endpoint. The operating system needs to discover the relationship between IOMMU and masters long before the PCI endpoint gets probed. Add a PCI child node to describe the virtio-iommu device. The virtio-pci-iommu is conceptually split between a PCI

[PATCH v8 4/7] PCI: OF: Initialize dev->fwnode appropriately

2019-05-30 Thread Jean-Philippe Brucker
For PCI devices that have an OF node, set the fwnode as well. This way drivers that rely on fwnode don't need the special case described by commit f94277af03ea ("of/platform: Initialise dev->fwnode appropriately"). Acked-by: Bjorn Helgaas Signed-off-by: Jean-Philippe Brucker ---

[PATCH v8 5/7] iommu: Add virtio-iommu driver

2019-05-30 Thread Jean-Philippe Brucker
The virtio IOMMU is a para-virtualized device, allowing to send IOMMU requests such as map/unmap over virtio transport without emulating page tables. This implementation handles ATTACH, DETACH, MAP and UNMAP requests. The bulk of the code transforms calls coming from the IOMMU API into

[PATCH v8 6/7] iommu/virtio: Add probe request

2019-05-30 Thread Jean-Philippe Brucker
When the device offers the probe feature, send a probe request for each device managed by the IOMMU. Extract RESV_MEM information. When we encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region. This will tell other subsystems that there is no need to map the MSI doorbell in the

[PATCH v8 3/7] of: Allow the iommu-map property to omit untranslated devices

2019-05-30 Thread Jean-Philippe Brucker
In PCI root complex nodes, the iommu-map property describes the IOMMU that translates each endpoint. On some platforms, the IOMMU itself is presented as a PCI endpoint (e.g. AMD IOMMU and virtio-iommu). This isn't supported by the current OF driver, which expects all endpoints to have an IOMMU.

[PATCH v8 7/7] iommu/virtio: Add event queue

2019-05-30 Thread Jean-Philippe Brucker
The event queue offers a way for the device to report access faults from endpoints. It is implemented on virtqueue #1. Whenever the host needs to signal a fault, it fills one of the buffers offered by the guest and interrupts it. Acked-by: Joerg Roedel Reviewed-by: Eric Auger Signed-off-by:

[PATCH v8 1/7] dt-bindings: virtio-mmio: Add IOMMU description

2019-05-30 Thread Jean-Philippe Brucker
The nature of a virtio-mmio node is discovered by the virtio driver at probe time. However the DMA relation between devices must be described statically. When a virtio-mmio node is a virtio-iommu device, it needs an "#iommu-cells" property as specified by bindings/iommu/iommu.txt. Otherwise, the

[PATCH v8 0/7] Add virtio-iommu driver

2019-05-30 Thread Jean-Philippe Brucker
Implement the virtio-iommu driver, following specification v0.12 [1]. Since last version [2] we've worked on improving the specification, which resulted in the following changes to the interface: * Remove the EXEC flag. * Add feature bit for the MMIO flag. * Change domain_bits to domain_range.

Re: [PATCH v8 2/7] dt-bindings: virtio: Add virtio-pci-iommu node

2019-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2019 at 06:09:24PM +0100, Jean-Philippe Brucker wrote: > Some systems implement virtio-iommu as a PCI endpoint. The operating > system needs to discover the relationship between IOMMU and masters long > before the PCI endpoint gets probed. Add a PCI child node to describe the >