Re: [PATCH v2] iommu/vt-d: Fix broken device issue when using iommu=pt

2014-09-04 Thread Yijing Wang
>>> Could you also please send the me the FW version (output of "ethtool -i >> eth0") >> >> Hi Sathya, thanks for your help. FW version is 4.6.247.5 driver version is >> 4.4.161.0s > > Hi Wang, this issue (a FW bug) was fixed in the 4.9 FW series. > The HP qualified FW (ver 4.9.416.0) is availa

[PATCHv2 1/2] iommu/omap: Check for valid archdata in attach_dev

2014-09-04 Thread Suman Anna
Any device requiring to be attached to an iommu_domain must have valid archdata containing the necessary iommu information, which is SoC-specific. Add a check in the omap_iommu_attach_dev to make sure that the device has valid archdata before accessing different SoC-specific fields of the archdata.

[PATCHv2 2/2] iommu/omap: Fix iommu archdata name for DT-based devices

2014-09-04 Thread Suman Anna
A device is tied to an iommu through its archdata field. The archdata is allocated on the fly for DT-based devices automatically through the .add_device iommu ops. The current logic incorrectly assigned the name of the IOMMU user device, instead of the name of the IOMMU device as required by the at

[PATCHv2 0/2] OMAP IOMMU Fixes for DT-clients

2014-09-04 Thread Suman Anna
Hi, This is an updated series addressing Laurent's review comments on Patch1. Patch2 is unchanged from the previous series. Patches are based on 3.17-rc3. v1: http://marc.info/?l=linux-omap&m=140978874026176&w=2 Suman Anna (2): iommu/omap: Check for valid archdata in attach_dev iommu/omap:

Re: [PATCH 2/2] iommu/omap: Fix iommu archdata name for DT-based devices

2014-09-04 Thread Suman Anna
Hi Laurent, > > On Wednesday 03 September 2014 18:58:32 Suman Anna wrote: >> A device is tied to an iommu through its archdata field. The archdata >> is allocated on the fly for DT-based devices automatically through the >> .add_device iommu ops. The current logic incorrectly assigned the name >> o

Re: [PATCH v2] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Emil Medve
On 09/04/2014 06:38 AM, Varun Sethi wrote: > iommu_group_get_for_dev determines the iommu group for the PCI device and adds > the device to the group. > > In the PAMU driver we were again adding the device to the same group without > checking > if the device already had an iommu group. This resul

Re: [PATCH 1/2] iommu/omap: Check for valid archdata in attach_dev

2014-09-04 Thread Suman Anna
Hi Laurent, > On Wednesday 03 September 2014 18:58:31 Suman Anna wrote: >> Any device requiring to be attached to an iommu_domain must have >> valid archdata containing the necessary iommu information, which >> is SoC-specific. Add a check in the omap_iommu_attach_dev to make >> sure that the devi

[PATCH 5/7] iommu/arm-smmu: don't bother truncating the s1 output size to VA_BITS

2014-09-04 Thread Will Deacon
In order for nested translation to work correctly, we need to ensure that the maximum output address size from stage-1 is <= the maximum supported input address size to stage-2. The latter is currently defined by VA_BITS, since we make use of the CPU page table functions for allocating out tables a

[PATCH 7/7] iommu/arm-smmu: support MMU-401

2014-09-04 Thread Will Deacon
From: Robin Murphy MMU-401 is similar to MMU-400, but updated with limited ARMv8 support. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon --- Documentation/devicetree/bindings/iommu/arm,smmu.txt | 1 + drivers/iommu/arm-smmu.c | 1 + 2 files changed, 2 inser

[PATCH 3/7] iommu/arm-smmu: put iommu_domain pointer in dev->archdata.iommu

2014-09-04 Thread Will Deacon
In preparation for nested translation support, stick a pointer to the iommu_domain in dev->archdata.iommu. This makes it much easier to grab hold of the physical group configuration (e.g. cbndx) when dealing with vSMMU accesses from a guest. Signed-off-by: Will Deacon --- drivers/iommu/arm-smmu.

[PATCH 0/7] iommu/arm-smmu: misc. driver updates targetting 3.18

2014-09-04 Thread Will Deacon
Hi all, This series is a collection of ARM SMMU updates I have in my tree that I'd like to get merged for 3.18. This has mostly come out of the vSMMU work (which is still some way off, as proper testing is proving to be difficult), but Robin has also added minimal support for MMU-401. There are a

[PATCH 6/7] iommu/arm-smmu: fix architecture version detection

2014-09-04 Thread Will Deacon
From: Robin Murphy The SMMU driver was relying on a quirk of MMU-500 r2px to identify the correct architecture version. Since this does not apply to other implementations, make the architecture version for each supported implementation explicit. While we're at it, remove the unnecessary #ifdef s

[PATCH 1/7] iommu/arm-smmu: allow translation stage to be forced on the cmdline

2014-09-04 Thread Will Deacon
When debugging and testing code on an SMMU that supports nested translation, it can be useful to restrict the driver to a particular stage of translation. This patch adds a module parameter to the ARM SMMU driver to allow this by restricting the ability of the probe() code to detect support for on

[PATCH 4/7] iommu/arm-smmu: use page shift instead of page size to avoid division

2014-09-04 Thread Will Deacon
Arbitrary integer division is not available in all ARM CPUs, so the GCC may spit out calls to helper functions which are not implemented in the kernel. This patch avoids these problems in the SMMU driver by using page shift instead of page size, so that divisions by the page size (as required by t

[PATCH 2/7] iommu/arm-smmu: add support for multi-master iommu groups

2014-09-04 Thread Will Deacon
Whilst the driver currently creates one IOMMU group per device, this will soon change when we start supporting non-transparent PCI bridges which require all upstream masters to be assigned to the same address space. This patch reworks our IOMMU group code so that we can easily support multi-master

RE: [PATCH v2] iommu/vt-d: Fix broken device issue when using iommu=pt

2014-09-04 Thread Sathya Perla
> -Original Message- > From: Yijing Wang [mailto:wangyij...@huawei.com] > > [Adding the Emulex driver developers to Cc for some input on the > device, > and why it might use wrong request ids] > > On Mon, Aug 25, 2014 at 02:44:59PM +0800, Yijing Wang wrote: > >

[PATCH v2] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Varun Sethi
iommu_group_get_for_dev determines the iommu group for the PCI device and adds the device to the group. In the PAMU driver we were again adding the device to the same group without checking if the device already had an iommu group. This resulted in the following warning. sysfs: cannot create du

RE: [PATCH] iommu/fsl: Fix warning resulting from adding PCI device twice

2014-09-04 Thread Varun Sethi
> -Original Message- > From: Joerg Roedel [mailto:j...@8bytes.org] > Sent: Thursday, September 04, 2014 3:44 PM > To: Sethi Varun-B16395 > Cc: iommu@lists.linux-foundation.org; alex.william...@redhat.com; Medve > Emilian-EMMEDVE1; linuxppc-...@ozlabs.org; linux-ker...@vger.kernel.org > Su