[PATCH v4 1/1] iommu/arm-smmu: Do not access non-existing S2CR registers

2014-08-22 Thread Olav Haugan
The number of S2CR registers is not properly set when stream matching is not supported. Fix this and add check that we do not try to access outside of the number of S2CR regisrers. Signed-off-by: Olav Haugan --- drivers/iommu/arm-smmu.c | 28 1 file changed, 20 inser

Re: [PATCH v3 1/1] iommu/arm-smmu: Do not access non-existing S2CR registers

2014-08-22 Thread Olav Haugan
On 8/22/2014 8:22 AM, Will Deacon wrote: > Hi Olav, > > Some really minor comments, but this looks good. > > On Tue, Aug 19, 2014 at 12:17:38AM +0100, Olav Haugan wrote: >> The number of S2CR registers is not properly set when stream >> matching is not supported. Fix this and add check that we do

Re: [PATCH v5] devicetree: Add generic IOMMU device tree bindings

2014-08-22 Thread Will Deacon
Hi Varun, On Tue, Aug 19, 2014 at 01:11:43PM +0100, Varun Sethi wrote: > > I think there's some confusion here. The ARM architected SMMU does not > > perform any StreamID translation -- it sees an incoming ID and uses that to > > lookup a set of translation tables. > > I don't completely agree w

Re: [PATCH v3 1/1] iommu/arm-smmu: Do not access non-existing S2CR registers

2014-08-22 Thread Will Deacon
Hi Olav, Some really minor comments, but this looks good. On Tue, Aug 19, 2014 at 12:17:38AM +0100, Olav Haugan wrote: > The number of S2CR registers is not properly set when stream > matching is not supported. Fix this and add check that we do not try to > access outside of the number of S2CR re

[RFC 2/5] vfio: platform: decouple code probing devices from the platform bus

2014-08-22 Thread Antonios Motakis
Hide functionality related to discovering Linux platform device resources in separate callback functions. This will allow us to implement AMBA support while reusing a lot of the code. Signed-off-by: Antonios Motakis --- drivers/vfio/platform/vfio_platform.c | 28 +++--

[RFC 3/5] vfio: platform: move code that can be shared with AMBA to a common file

2014-08-22 Thread Antonios Motakis
Having decoupled a portion of the VFIO_PLATFORM code from platform bus specific resource discovery code, we can now move that code separate file. This will allow us to implement discovering AMBA devices and their resources, but reuse the a large part of the VFIO_PLATFORM implementation. Signed-off

[RFC 5/5] vfio: amba: add the VFIO for AMBA devices module to Kconfig

2014-08-22 Thread Antonios Motakis
Enable building the VFIO AMBA driver. VFIO_AMBA depends on VFIO_PLATFORM, since it is sharing a portion of the code, and it is essentially implemented as a platform device whose resources are discovered via AMBA specific APIs in the kernel. Signed-off-by: Antonios Motakis --- drivers/vfio/platfo

[RFC 4/5] vfio: amba: VFIO support for AMBA devices

2014-08-22 Thread Antonios Motakis
Add support for discovering AMBA devices with VFIO and handle them similarly to Linux platform devices. Signed-off-by: Antonios Motakis --- drivers/vfio/platform/vfio_amba.c | 129 ++ 1 file changed, 129 insertions(+) create mode 100644 drivers/vfio/platform/

[RFC 1/5] driver core: amba: add device binding path 'driver_override'

2014-08-22 Thread Antonios Motakis
As already demonstrated with PCI [1] and the platform bus [2], a driver_override property in sysfs can be used to bypass the id matching of a device to a AMBA driver. This can be used by VFIO to bind to any AMBA device requested by the user. [1] http://lists-archives.com/linux-kernel/28030441-pci

[RFC 0/5] vfio: AMBA devices support

2014-08-22 Thread Antonios Motakis
This patch series depends on the VFIO for PLATFORM devices patch series, and implements AMBA device support for VFIO. This can be used for example with the PL330 DMA Controller, which is an AMBA device and not a proper platform device. By using the VFIO AMBA driver introduced here, one can bind VF