Re: [PATCH v2 18/19] iommu/vt-d: Support flushing more translation cache types

2019-04-27 Thread Auger Eric
Hi Jacob, On 4/24/19 1:31 AM, Jacob Pan wrote: > When Shared Virtual Memory is exposed to a guest via vIOMMU, extended > IOTLB invalidation may be passed down from outside IOMMU subsystems. > This patch adds invalidation functions that can be used for additional > translation cache types. > >

[PATCH v2 1/9] soc/fsl/qman: fixup liodns only on ppc targets

2019-04-27 Thread laurentiu . tudor
From: Laurentiu Tudor ARM SoCs use SMMU so the liodn fixup done in the qman driver is no longer making sense and it also breaks the ICID settings inherited from u-boot. Do the fixups only for PPC targets. Signed-off-by: Laurentiu Tudor --- drivers/soc/fsl/qbman/qman_ccsr.c | 2 +-

Re: [PATCH v2 14/19] iommu: Add guest PASID bind function

2019-04-27 Thread Auger Eric
Hi Jacob, On 4/27/19 12:11 AM, Jacob Pan wrote: > On Fri, 26 Apr 2019 17:53:43 +0200 > Auger Eric wrote: > >> Hi Jacob, >> >> On 4/24/19 1:31 AM, Jacob Pan wrote: >>> Guest shared virtual address (SVA) may require host to shadow guest >>> PASID tables. Guest PASID can also be allocated from the

Re: [PATCH v2 11/19] iommu/vt-d: Replace Intel specific PASID allocator with IOASID

2019-04-27 Thread Auger Eric
On 4/26/19 11:01 PM, Jacob Pan wrote: > On Thu, 25 Apr 2019 12:04:01 +0200 > Auger Eric wrote: > >> Hi Jacob, >> >> On 4/24/19 1:31 AM, Jacob Pan wrote: >>> Make use of generic IOASID code to manage PASID allocation, >>> free, and lookup. >>> >>> Signed-off-by: Jacob Pan >>> --- >>>

[PATCH v2 2/9] soc/fsl/qbman_portals: add APIs to retrieve the probing status

2019-04-27 Thread laurentiu . tudor
From: Laurentiu Tudor Add a couple of new APIs to check the probing status of the required cpu bound qman and bman portals: 'int bman_portals_probed()' and 'int qman_portals_probed()'. They return the following values. * 1 if qman/bman portals were all probed correctly * 0 if qman/bman

[PATCH v2 5/9] dpaa_eth: defer probing after qbman

2019-04-27 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 v2 0/9] Prerequisites for NXP LS104xA SMMU enablement

2019-04-27 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

[PATCH v2 7/9] dpaa_eth: fix iova handling for contiguous frames

2019-04-27 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 v2 6/9] dpaa_eth: base dma mappings on the fman rx port

2019-04-27 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 v2 3/9] fsl/fman: backup and restore ICID registers

2019-04-27 Thread laurentiu . tudor
From: Laurentiu Tudor During probing, FMAN is reset thus losing all its register settings. Backup port ICID registers before reset and restore them after, similarly to how it's done on powerpc / PAMU based platforms. This also has the side effect of disabling the old code path (liodn

[PATCH v2 9/9] dpaa_eth: fix SG frame cleanup

2019-04-27 Thread laurentiu . tudor
From: Laurentiu Tudor Fix issue with the entry indexing in the sg frame cleanup code being off-by-1. This problem showed up when doing some basic iperf tests and manifested in traffic coming to a halt. Signed-off-by: Laurentiu Tudor Acked-by: Madalin Bucur ---

[PATCH v2 4/9] fsl/fman: add API to get the device behind a fman port

2019-04-27 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 v2 8/9] dpaa_eth: fix iova handling for sg frames

2019-04-27 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

Re: [PATCH v2 9/9] dpaa_eth: fix SG frame cleanup

2019-04-27 Thread Joakim Tjernlund
On Sat, 2019-04-27 at 10:10 +0300, laurentiu.tu...@nxp.com wrote: > From: Laurentiu Tudor > > Fix issue with the entry indexing in the sg frame cleanup code being > off-by-1. This problem showed up when doing some basic iperf tests and > manifested in traffic coming to a halt. > >

Re: [PATCH v2 7/9] dpaa_eth: fix iova handling for contiguous frames

2019-04-27 Thread Christoph Hellwig
On Sat, Apr 27, 2019 at 10:10:29AM +0300, laurentiu.tu...@nxp.com wrote: > 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

Re: [PATCH v1] iommu/amd: flush not present cache in iommu_map_page

2019-04-27 Thread Tom Murphy via iommu
> The iommu_map_page function is called once per physical page that is > mapped, so in the worst case for every 4k mapping established. So it is > not the right place to put this check in. Ah, you're right, that was careless of me. > From a quick glance this check belongs into the map_sg() and

Re: [PATCH v2 3/9] fsl/fman: backup and restore ICID registers

2019-04-27 Thread David Miller
From: laurentiu.tu...@nxp.com Date: Sat, 27 Apr 2019 10:10:25 +0300 > @@ -1914,7 +1936,10 @@ static int fman_reset(struct fman *fman) > static int fman_init(struct fman *fman) > { > struct fman_cfg *cfg = NULL; > - int err = 0, i, count; > + int err = 0, count; > +#ifdef