[PATCH v2 2/2] vfio: platform: reset: Add Broadcom FlexRM reset module

2017-07-19 Thread Anup Patel via iommu
This patch adds Broadcom FlexRM low-level reset for VFIO platform. It will do the following: 1. Disable/Deactivate each FlexRM ring 2. Flush each FlexRM ring The cleanup sequence for FlexRM rings is adapted from Broadcom FlexRM mailbox driver. Signed-off-by: Anup Patel

[PATCH v2 1/2] vfio: Allow No-IOMMU mode without checking iommu_present()

2017-07-19 Thread Anup Patel via iommu
Not allowing No-IOMMU mode for devices already having iommu_ops on their bus is very conservative. We now have IOMMU (such as ARM SMMU) which can bypass transcations when IOMMU is not configured for a given device. In addition, it is not necessary to have all devices on bus to be upstream to an

[PATCH v2 0/2] FlexRM support in VFIO platform

2017-07-19 Thread Anup Patel via iommu
This patchset primarily adds Broadcom FlexRM reset module for VFIO platform driver. We also have minor improvments in IOMMU and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. The patches are based on Linux-4.13-rc1 and can also be found at flexrm-vfio-v2 branch of

Re: [PATCH 5/5] vfio: platform: reset: Add Broadcom FlexRM reset module

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 10:20 PM, Scott Branden wrote: > Hi Anup, > > NAK - as indicated in internal review please use unmodified Broadcom legal > header in its own comment block. I had addressed your internal review comments and used standard GLPv2 header (also

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 5:23 PM, Will Deacon wrote: > On Wed, Jul 19, 2017 at 05:09:05PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 5:03 PM, Will Deacon wrote: >> > On Wed, Jul 19, 2017 at 05:01:11PM +0530, Anup Patel wrote: >> >> On Wed, Jul

Re: [PATCH 4/4] iommu/iova: Make dma_32bit_pfn implicit

2017-07-19 Thread Leizhen (ThunderTown)
://github.com/0day-ci/linux/commits/Robin-Murphy/Optimise-64-bit-IOVA-allocations/20170719-060847 > base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next > config: arm-multi_v7_defconfig (attached as .config) > compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-19 Thread Jacob Pan
On Wed, 19 Jul 2017 18:45:43 +0800 "Liu, Yi L" wrote: > On Mon, Jul 17, 2017 at 04:45:15PM -0600, Alex Williamson wrote: > > On Mon, 17 Jul 2017 10:58:41 + > > "Liu, Yi L" wrote: > > > > > Hi Alex, > > > > > > Pls refer to the response

Re: [PATCH 5/5] vfio: platform: reset: Add Broadcom FlexRM reset module

2017-07-19 Thread Scott Branden via iommu
Hi Anup, NAK - as indicated in internal review please use unmodified Broadcom legal header in its own comment block. On 17-07-19 02:33 AM, Anup Patel wrote: This patch adds low-level reset for Broadcom FlexRM to VFIO platform. It will do the following: 1. Disable/Deactivate each FlexRM

Re: [PATCH v3 03/12] intel-ipu3: Add DMA API implementation

2017-07-19 Thread Robin Murphy
On 19/07/17 04:12, Yong Zhi wrote: > From: Tomasz Figa > > This patch adds support for the IPU3 DMA mapping API. > > Signed-off-by: Tomasz Figa > Signed-off-by: Yong Zhi > --- > drivers/media/pci/intel/ipu3/Kconfig | 8 + >

Re: [PATCH 4/4] iommu/iova: Make dma_32bit_pfn implicit

2017-07-19 Thread kbuild test robot
Hi Zhen, [auto build test WARNING on iommu/next] [also build test WARNING on v4.13-rc1] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Robin-Murphy/Optimise-64-bit-IOVA-allocations/20170719

Re: [PATCH v3 02/12] intel-ipu3: mmu: implement driver

2017-07-19 Thread Robin Murphy
On 19/07/17 04:12, Yong Zhi wrote: > From: Tomasz Figa > > This driver translates Intel IPU3 internal virtual > address to physical address. > > Signed-off-by: Tomasz Figa > Signed-off-by: Yong Zhi > --- >

Re: [PATCH v7 3/3] IOMMU/PCI: Reserve IOVA for inbound memory for PCI masters

2017-07-19 Thread Oza Oza via iommu
Hi Robin, My apology for noise. I have taken care of your comments. but these whole patch-set, (specially PCI patch-set) inbound memory addition depends on Lorenzo's patch-set . So I will be posting version 8 patches for IOVA reservation soon after Lorenzo's patches are made in. Regards, Oza.

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 05:09:05PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 5:03 PM, Will Deacon wrote: > > On Wed, Jul 19, 2017 at 05:01:11PM +0530, Anup Patel wrote: > >> On Wed, Jul 19, 2017 at 4:55 PM, Will Deacon wrote: > >> > On Wed, Jul

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 5:03 PM, Will Deacon wrote: > On Wed, Jul 19, 2017 at 05:01:11PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:55 PM, Will Deacon wrote: >> > On Wed, Jul 19, 2017 at 04:53:04PM +0530, Anup Patel wrote: >> >> On Wed, Jul

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 05:01:11PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:55 PM, Will Deacon wrote: > > On Wed, Jul 19, 2017 at 04:53:04PM +0530, Anup Patel wrote: > >> On Wed, Jul 19, 2017 at 4:30 PM, Robin Murphy wrote: > >> > On

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 5:00 PM, Will Deacon wrote: > On Wed, Jul 19, 2017 at 04:56:38PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon wrote: >> > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >> >> On Wed, Jul

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:55 PM, Will Deacon wrote: > On Wed, Jul 19, 2017 at 04:53:04PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:30 PM, Robin Murphy wrote: >> > On 19/07/17 10:33, Anup Patel wrote: >> >> The ARM SMMUv3 support bypassing

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 04:56:38PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon wrote: > > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: > >> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy wrote: > >> > On

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Robin Murphy
On 19/07/17 12:26, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon wrote: >> On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >>> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy wrote: On 19/07/17 10:33, Anup Patel wrote:

Re: [PATCH 0/5] FlexRM support in VFIO platform

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:55 PM, Robin Murphy wrote: > On 19/07/17 12:17, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy wrote: >>> On 19/07/17 10:33, Anup Patel wrote: This patchset primarily adds Broadcom FlexRM reset module

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon wrote: > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy wrote: >> > On 19/07/17 10:33, Anup Patel wrote: >> >> Some of the IOMMUs (such as ARM

Re: [PATCH 0/5] FlexRM support in VFIO platform

2017-07-19 Thread Robin Murphy
On 19/07/17 12:17, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy wrote: >> On 19/07/17 10:33, Anup Patel wrote: >>> This patchset primarily adds Broadcom FlexRM reset module for >>> VFIO platform driver. We also have minor improvments in IOMMU >>> and

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 04:53:04PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:30 PM, Robin Murphy wrote: > > On 19/07/17 10:33, Anup Patel wrote: > >> The ARM SMMUv3 support bypassing transactions for which domain > >> is not configured. The patch adds

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Will Deacon
On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy wrote: > > On 19/07/17 10:33, Anup Patel wrote: > >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing > >> transactions for which no IOMMU domain is

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:30 PM, Robin Murphy wrote: > On 19/07/17 10:33, Anup Patel wrote: >> The ARM SMMUv3 support bypassing transactions for which domain >> is not configured. The patch adds corresponding IOMMU capability >> to advertise this fact. >> >> Signed-off-by:

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy wrote: > On 19/07/17 10:33, Anup Patel wrote: >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing >> transactions for which no IOMMU domain is configured. >> >> This patch adds IOMMU_CAP_BYPASS which can be used by

Re: [PATCH 0/5] FlexRM support in VFIO platform

2017-07-19 Thread Anup Patel via iommu
On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy wrote: > On 19/07/17 10:33, Anup Patel wrote: >> This patchset primarily adds Broadcom FlexRM reset module for >> VFIO platform driver. We also have minor improvments in IOMMU >> and VFIO driver to allow VFIO no-IOMMU mode access

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-07-19 Thread Liu, Yi L
On Mon, Jul 17, 2017 at 04:45:15PM -0600, Alex Williamson wrote: > On Mon, 17 Jul 2017 10:58:41 + > "Liu, Yi L" wrote: > > > Hi Alex, > > > > Pls refer to the response inline. > > > > > -Original Message- > > > From: kvm-ow...@vger.kernel.org

Re: [PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Robin Murphy
On 19/07/17 10:33, Anup Patel wrote: > The ARM SMMUv3 support bypassing transactions for which domain > is not configured. The patch adds corresponding IOMMU capability > to advertise this fact. > > Signed-off-by: Anup Patel > --- > drivers/iommu/arm-smmu-v3.c | 2 ++ >

Re: [PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver

2017-07-19 Thread Robin Murphy
On 19/07/17 10:33, Anup Patel wrote: > The ARM SMMUv1 and SMMUv2 support bypassing transactions for > which domain is not configured. The patch adds corresponding > IOMMU capability to advertise this fact. > > Signed-off-by: Anup Patel > --- > drivers/iommu/arm-smmu.c |

Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Robin Murphy
On 19/07/17 10:33, Anup Patel wrote: > Some of the IOMMUs (such as ARM SMMU) are capable of bypassing > transactions for which no IOMMU domain is configured. > > This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU > drivers to advertise transation bypass capability of an IOMMU. Whatever

Re: [PATCH 0/5] FlexRM support in VFIO platform

2017-07-19 Thread Robin Murphy
On 19/07/17 10:33, Anup Patel wrote: > This patchset primarily adds Broadcom FlexRM reset module for > VFIO platform driver. We also have minor improvments in IOMMU > and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. I'm struggling to understand the IOMMU changes here - what's the

RE: [PATCH v3 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-07-19 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Will Deacon [mailto:will.dea...@arm.com] > Sent: Friday, July 14, 2017 8:33 PM > To: Shameerali Kolothum Thodi > Cc: lorenzo.pieral...@arm.com; marc.zyng...@arm.com; > sudeep.ho...@arm.com; robin.mur...@arm.com; hanjun@linaro.org; > Gabriele Paoloni; John

Re: [PATCH 0/4] Optimise 64-bit IOVA allocations

2017-07-19 Thread Robin Murphy
On 19/07/17 09:37, Ard Biesheuvel wrote: > On 18 July 2017 at 17:57, Robin Murphy wrote: >> Hi all, >> >> In the wake of the ARM SMMU optimisation efforts, it seems that certain >> workloads (e.g. storage I/O with large scatterlists) probably remain quite >> heavily

Re: [PATCH 1/2] iommu/arm-smmu: Track context bank state

2017-07-19 Thread Robin Murphy
On 19/07/17 03:40, Sricharan R wrote: > Hi Robin, > > On 7/18/2017 6:14 PM, Robin Murphy wrote: >> Echoing what we do for Stream Map Entries, maintain a software shadow >> state for context bank configuration. With this in place, we are mere >> moments away from blissfully easy suspend/resume

Re: [PATCH kernel v4 4/6] iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization

2017-07-19 Thread Alexey Kardashevskiy
On 11/07/17 05:23, Bjorn Helgaas wrote: > [+cc Joerg, iommu] > > On Fri, Jun 30, 2017 at 12:24 AM, Alexey Kardashevskiy wrote: >> From: Yongji Xie >> >> Some iommu drivers would be initialized after PCI device >> enumeration. So PCI_BUS_FLAGS_MSI_REMAP would

[PATCH 5/5] vfio: platform: reset: Add Broadcom FlexRM reset module

2017-07-19 Thread Anup Patel via iommu
This patch adds low-level reset for Broadcom FlexRM to VFIO platform. It will do the following: 1. Disable/Deactivate each FlexRM ring 2. Flush each FlexRM ring The cleanup sequence for FlexRM rings is adapted from Broadcom FlexRM mailbox driver. Signed-off-by: Anup Patel

[PATCH 4/5] vfio: Allow No-IOMMU mode for IOMMUs with bypass capability

2017-07-19 Thread Anup Patel via iommu
Not allowing No-IOMMU mode for devices already having iommu_ops on their bus is little conservative. We now have IOMMU (such as ARM SMMU) which can bypass transcations for which IOMMU domain is not configured hence No-IOMMU mode should not be allowed when iommu_ops are available and

[PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver

2017-07-19 Thread Anup Patel via iommu
The ARM SMMUv1 and SMMUv2 support bypassing transactions for which domain is not configured. The patch adds corresponding IOMMU capability to advertise this fact. Signed-off-by: Anup Patel --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 3/5] iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver

2017-07-19 Thread Anup Patel via iommu
The ARM SMMUv3 support bypassing transactions for which domain is not configured. The patch adds corresponding IOMMU capability to advertise this fact. Signed-off-by: Anup Patel --- drivers/iommu/arm-smmu-v3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS

2017-07-19 Thread Anup Patel via iommu
Some of the IOMMUs (such as ARM SMMU) are capable of bypassing transactions for which no IOMMU domain is configured. This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU drivers to advertise transation bypass capability of an IOMMU. Signed-off-by: Anup Patel ---

[PATCH 0/5] FlexRM support in VFIO platform

2017-07-19 Thread Anup Patel via iommu
This patchset primarily adds Broadcom FlexRM reset module for VFIO platform driver. We also have minor improvments in IOMMU and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. The patches are based on Linux-4.13-rc1 and can also be found at flexrm-vfio-v1 branch of

Re: [PATCH 0/4] Optimise 64-bit IOVA allocations

2017-07-19 Thread Ard Biesheuvel
On 18 July 2017 at 17:57, Robin Murphy wrote: > Hi all, > > In the wake of the ARM SMMU optimisation efforts, it seems that certain > workloads (e.g. storage I/O with large scatterlists) probably remain quite > heavily influenced by IOVA allocation performance. Separately,

Re: [PATCH kernel v4 4/6] iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization

2017-07-19 Thread Benjamin Herrenschmidt
On Tue, 2017-07-11 at 11:39 +0100, Robin Murphy wrote: > I have no idea what the context is here, but this flag looks wrong > generally. IRQ remapping is a property of the irqchip and has nothing to > do with PCI, so pretending it's a property of PCI buses looks like a > massive hack around...

Re: [PATCH v3 03/12] intel-ipu3: Add DMA API implementation

2017-07-19 Thread Arnd Bergmann
On Wed, Jul 19, 2017 at 5:12 AM, Yong Zhi wrote: > From: Tomasz Figa > > This patch adds support for the IPU3 DMA mapping API. > > Signed-off-by: Tomasz Figa > Signed-off-by: Yong Zhi This needs some explanation