Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Christoph Hellwig
On Mon, Feb 04, 2019 at 04:38:21PM -0500, Michael S. Tsirkin wrote: > It was designed to make, when set, as many guests as we can work > correctly, and it seems to be successful in doing exactly that. > > Unfortunately there could be legacy guests that do work correctly but > become slow. Whether

[PATCH v2 0/2] Add IPROC PCIe new features

2019-02-04 Thread Srinath Mannam via iommu
This patch set extends support of new IPROC PCIe host controller features - Add CRS state check using controller register status flags - Add 32bit outbound window mapping configuration This patch set is based on Linux-5.0-rc2. Changes from v1: - Addressed Bjorn Helgaas comments. - Removed

[PATCH v2 2/2] PCI: iproc: Add PCIe 32bit outbound memory configuration

2019-02-04 Thread Srinath Mannam via iommu
Add configuration to support IPROC PCIe host controller outbound memory window mapping with SOC address range inside 4GB boundary, which is 32 bit AXI address. Signed-off-by: Srinath Mannam Signed-off-by: Abhishek Shah Signed-off-by: Ray Jui Reviewed-by: Scott Branden Reviewed-by: Vikram

[PATCH v2 1/2] PCI: iproc: Add CRS check in config read

2019-02-04 Thread Srinath Mannam via iommu
In the current implementation, config read output data 0x0001 is assumed as CRS completion. But sometimes 0x0001 can be a valid data. IPROC PCIe host controller has a register to show config read request status flags like SC, UR, CRS and CA. So that extra check is added to confirm the CRS

[PATCH v2 0/2] Add IPROC PCIe new features

2019-02-04 Thread Srinath Mannam via iommu
This patch set extends support of new IPROC PCIe host controller features - Add CRS check using controller register status flags - Add 32bit outbound window mapping configuration This patch set is based on Linux-5.0-rc2. Changes from v1: - Addressed Bjorn Helgaas comments. - Removed set

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Michael S. Tsirkin
On Mon, Feb 04, 2019 at 04:15:41PM -0200, Thiago Jung Bauermann wrote: > > Christoph Hellwig writes: > > > On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: > >> This has been discussed ad nauseum. virtio is all about compatibility. > >> Losing a couple of lines of code isn't

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Michael S. Tsirkin
On Mon, Feb 04, 2019 at 04:14:20PM -0200, Thiago Jung Bauermann wrote: > > Hello Michael, > > Michael S. Tsirkin writes: > > > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > >> > >> Fixing address of powerpc mailing list. > >> > >> Thiago Jung Bauermann writes: > >>

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Thiago Jung Bauermann
Christoph Hellwig writes: > On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: >> This has been discussed ad nauseum. virtio is all about compatibility. >> Losing a couple of lines of code isn't worth breaking working setups. >> People that want "just use DMA API no tricks"

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Thiago Jung Bauermann
Hello Michael, Michael S. Tsirkin writes: > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: >> >> Fixing address of powerpc mailing list. >> >> Thiago Jung Bauermann writes: >> >> > Hello, >> > >> > With Christoph's rework of the DMA API that recently landed, the patch

Re: use generic DMA mapping code in powerpc V4

2019-02-04 Thread Christoph Hellwig
On Mon, Feb 04, 2019 at 01:13:54PM +0100, Christian Zigotzky wrote: >>> Results: The X1000 and X5000 boot but unfortunately the P.A. Semi Ethernet >>> doesn't work. >> Are there any interesting messages in the boot log? Can you send me >> the dmesg? >> > Here you are:

Re: use generic DMA mapping code in powerpc V4

2019-02-04 Thread Christian Zigotzky
On 04 February 2019 at 08:56AM, Christoph Hellwig wrote: On Sun, Feb 03, 2019 at 05:49:02PM +0100, Christian Zigotzky wrote: OK, next step: b50f42f0fe12965ead395c76bcb6a14f00cdf65b (powerpc/dma: use the dma_direct mapping routines) git clone git://git.infradead.org/users/hch/misc.git -b

Re: [PATCH] ARM: dma-mapping: Clear DMA ops on teardown

2019-02-04 Thread Marek Szyprowski
Hi Robin, On 2019-01-21 15:52, Robin Murphy wrote: > Installing the appropriate non-IOMMU DMA ops in arm_iommu_detch_device() > serves the case where IOMMU-aware drivers choose to control their own > mapping but still make DMA API calls, however it also affects the case > when the arch code

Re: [PATCH v2] dma-direct: do not allocate a single page from CMA area

2019-02-04 Thread Christoph Hellwig
On Tue, Jan 15, 2019 at 01:51:40PM -0800, Nicolin Chen wrote: > The addresses within a single page are always contiguous, so it's > not so necessary to allocate one single page from CMA area. Since > the CMA area has a limited predefined size of space, it might run > out of space in some heavy use

[PATCH 1/2] dma-mapping: add a kconfig symbol for arch_setup_dma_ops availability

2019-02-04 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/arc/Kconfig | 1 + arch/arc/include/asm/Kbuild | 1 + arch/arc/include/asm/dma-mapping.h | 13 - arch/arm/Kconfig | 1 + arch/arm/include/asm/dma-mapping.h | 4 arch/arm64/Kconfig

[PATCH 2/2] dma-mapping: add a kconfig symbol for arch_teardown_dma_ops availability

2019-02-04 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- arch/arm/Kconfig | 1 + arch/arm/include/asm/dma-mapping.h | 5 - arch/arm64/Kconfig | 1 + arch/arm64/include/asm/dma-mapping.h | 5 - include/linux/dma-mapping.h | 10 +++---

add config symbols for arch_{setup,teardown}_dma_ops

2019-02-04 Thread Christoph Hellwig
Hi all, this series adds kconfig symbols to indicate that the architecture provides the arch_setup_dma_ops and arch_teardown_dma_ops hooks. This avoids polluting dma-mapping.h which is included by just about every driver with implementation details, and also removes some clutter.