[RFC v1 3/7] iommu/arm-smmu-v3: Replace the device tree binding for hisilicon broken prefetch cmd with erratum id

2017-05-13 Thread shameer
Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu-v3.txt b/Documentation/devicetree/bindings/iommu/ar

[RFC v1 7/7] iommu/arm-smmu-v3: Enable ACPI based HiSilicon erratum 161010801

2017-05-13 Thread shameer
MSI reserve len. } ACPI_CSRT_RESOURCE_DESCRIPTOR; Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- arch/arm64/Kconfig | 10 ++ drivers/iommu/arm-smmu-v3.c | 75 + 2 files changed, 85 insertions(+) diff --git a/arch/arm64/Kconfig

[RFC v1 5/7] iommu/arm-smmu-v3: Enable ACPI based HiSilicon erratum 161010701

2017-05-13 Thread shameer
This uses the ACPI IORT model number to enable the erratum. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c

[RFC v1 4/7] iommu/arm-smmu-v3: Enable HiSilicon erratum 161010701

2017-05-13 Thread shameer
This replaces the existing broken_prefetch_cmd quirk using the new erratum framework. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- arch/arm64/Kconfig | 10 +- drivers/iommu/arm-smmu-v3.c | 36 ++-- 2 files chang

[RFC v1 6/7] iommu/arm-smmu-v3: Rearrange msi resv alloc functions

2017-05-13 Thread shameer
This moves the SW MSI reserve region allocation to probe fn. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/arm-smmu-

[RFC v1 2/7] iommu/arm-smmu-v3: Add erratum framework functions

2017-05-13 Thread shameer
This will provide a way to replace the existing skip_prefetch_cmd erratum using the new framework. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 58 + 1 file changed, 58 insertions(+) diff

[RFC v1 1/7] iommu/arm-smmu-v3: Add erratum framework structures

2017-05-13 Thread shameer
This is to introduce an erratum framework to smmu driver similar to the one in arm_arch_timer code. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/iommu/arm-smmu-

[RFC v1 0/7] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-05-13 Thread shameer
"acpica: iort: Update SMMU models for IORT rev. C". https://lkml.org/lkml/2017/5/12/211 Thanks, Shameer shameer (7): iommu/arm-smmu-v3: Add erratum framework structures iommu/arm-smmu-v3: Add erratum framework functions iommu/arm-smmu-v3: Replace the device tree binding for hisilicon

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

2017-06-19 Thread shameer
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 29 - 1 file changed, 24 insertions(+), 5 del

[PATCH v2 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-06-19 Thread shameer
://patchwork.kernel.org/patch/9740733/ 2. https://patchwork.kernel.org/patch/9730491/ Thanks, Shameer Changelog: v1 --> v2 -patch 2/2: Invoke iort helper fn based on fwnode type(acpi). RFCv2 -->PATCH -Incorporated Lorenzo's review comments. RFC v1 --> RFC v2 Based on Robin's review

[PATCH v2 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-06-19 Thread shameer
The helper function retrieves ITS address regions through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. IOMMU drivers can use this to implement their .get_resv_regions callback. Signed-off-by: s

[PATCH v3 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-06-23 Thread shameer
://patchwork.kernel.org/patch/9740733/ 2. https://patchwork.kernel.org/patch/9730491/ Thanks, Shameer Changelog: v2 --> v3 Addressed comments from Lorenzo and Robin: -Removed dev_is_pci() check in smmuV3 driver. -Don't treat device not having an ITS mapping as an error in iort helper function.

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

2017-06-23 Thread shameer
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 30 ++ 1 file changed, 26 insertions(+), 4 del

[PATCH v3 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-06-23 Thread shameer
The helper function retrieves ITS address regions through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. IOMMU drivers can use this to implement their .get_resv_regions callback. Signed-off-by: s

[PATCH 1/2] acpi:iort: Add an IORT helper function to reserve HW ITS address regions for IOMMU drivers

2017-06-13 Thread shameer
The helper function retrieves ITS address regions through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. IOMMU drivers can use this to implement their .get_resv_regions callback. Signed-off-by: s

[PATCH 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-06-13 Thread shameer
://patchwork.kernel.org/patch/9740733/ 2. https://patchwork.kernel.org/patch/9730491/ Thanks, Shameer RFCv2 -->PATCH Incorporated Lorenzo's review comments. RFC v1 -->v2 Based on Robin's review comments, -Removed the generic erratum framework. -Using IORT/MADT tables to retrieve the IT

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

2017-06-13 Thread shameer
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 27 ++- 1 file changed, 22 insertions(+), 5 del

[RFCv2 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-05-31 Thread shameer
SMMU model. This is based on the following patches: 1. https://patchwork.kernel.org/patch/9740733/ 2. https://patchwork.kernel.org/patch/9730491/ Thanks, Shameer RFC v1 ---> v2 Based on Robin's review comments, :Removed the generic erratum framework. :Using IORT/MADT tab

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

2017-05-31 Thread shameer
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. The HW ITS address region associated with the dev is retrieved using a new helper function added in the IORT code. Signed-off-by: shameer <shameerali.kolothum.th...@huawei.

[RFCv2 1/2] acpi:iort: Add new helper function to retrieve ITS base addr from dev IORT node

2017-05-31 Thread shameer
This provides a helper function to find and retrieve the ITS base address from the ID mappings array reference of a device IORT node(if any). This is used in the subsequent patch to retrieve the ITS base address associated with a pci dev IORT node. Signed-off-by: shameer <shameerali.kolothum

[PATCH v4 2/2] iommu/dma: Add HW MSI address regions reservation for IOMMU drivers

2017-07-25 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include HW MSI (ARM GICv3 ITS MSI) specific reservations if available. Suggested-by: Robin Murphy <robin.mur...@arm.com> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 8 +++- 1 fil

[PATCH v4 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-07-25 Thread Shameer Kolothum
() to reserve the hw msi regions which means these address regions will not be translated and will be excluded from iova allocations. Thanks, Shameer Changelog: v3 --> v4 Rebased on 4.13-rc1. Addressed comments from Robin, Will and Lorenzo: -As suggested by Robin, moved the ITS msi reservat

[PATCH v6 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-08-09 Thread Shameer Kolothum
address regions based on IORT SMMUv3 model with the help of a generic iommu helper function. Thanks, Shameer Changelog: v5 --> v6 Addressed comments from Robin and Lorenzo: -No change to patch#1 . -Reverted v5 patch#2 as this might break the platforms where this quirk is not applica

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

2017-08-09 Thread Shameer Kolothum
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 27 ++- 1 file changed, 22 insertions

[PATCH v6 1/3] ACPI/IORT: Add ITS address regions reservation helper

2017-08-09 Thread Shameer Kolothum
device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [lorenzo.pieral...@arm.com: updated commit log/added comments] Signed-off

[PATCH v6 2/3] iommu/dma: Add a helper function to reserve HW MSI address regions for IOMMU drivers

2017-08-09 Thread Shameer Kolothum
IOMMU drivers can use this to implement their .get_resv_regions callback for HW MSI specific reservations(e.g. ARM GICv3 ITS MSI region). Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 19 +++ include/linux/dma-iommu.

[PATCH v5 1/2] ACPI/IORT: Add ITS address regions reservation helper

2017-08-01 Thread Shameer Kolothum
device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [lorenzo.pieral...@arm.com: updated commit log/added comments] Signed-off

[PATCH v5 2/2] iommu/dma: Add HW MSI address regions reservation

2017-08-01 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include HW MSI (ARM GICv3 ITS MSI) specific reservations if available. Suggested-by: Robin Murphy <robin.mur...@arm.com> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 8 +++- 1 fil

[PATCH v5 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-08-01 Thread Shameer Kolothum
() to reserve the hw msi regions which means these address regions will not be translated and will be excluded from iova allocations. Note: This requires patches [1] and [2] for vfio pass-through support on these platforms. Thanks, Shameer [1]: https://lkml.org/lkml/2017/7/27/388 [2]: https

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

2017-09-14 Thread Shameer Kolothum
driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [John: add DT support] Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/iommu/arm-sm

[PATCH v7 3/5] iommu/of: Add msi address regions reservation helper

2017-09-14 Thread Shameer Kolothum
helper function that retrieves msi address regions through device tree msi mapping, so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Shameer Kolothum <shameerali.kolothum.t

[PATCH v7 0/5] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-09-14 Thread Shameer Kolothum
v2 Based on Robin's review comments, -Removed the generic erratum framework. -Using IORT/MADT tables to retrieve the ITS base addr instead of vendor specific CSRT table. John Garry (2): Doc: iommu/arm-smmu-v3: Add workaround for HiSilicon erratum 161010801 iommu/of: Add msi address regions

[PATCH v7 4/5] iommu/dma: Add a helper function to reserve HW MSI address regions for IOMMU drivers

2017-09-14 Thread Shameer Kolothum
IOMMU drivers can use this to implement their .get_resv_regions callback for HW MSI specific reservations(e.g. ARM GICv3 ITS MSI region). Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [John: added DT support] Signed-off-by: John Garry <john.ga...@huawei.com>

[PATCH v7 2/5] ACPI/IORT: Add msi address regions reservation helper

2017-09-14 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [lorenzo.pieral...@arm.com: updated commit log/ad

[PATCH v7 1/5] Doc: iommu/arm-smmu-v3: Add workaround for HiSilicon erratum 161010801

2017-09-14 Thread Shameer Kolothum
inding to flag that the SMMU breaks msi translation at ITS. Also, the arm64 silicon errata is updated with this same erratum. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- Documentation/arm64/

[PATCH v9 1/4] ACPI/IORT: Add msi address regions reservation helper

2017-10-06 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [lorenzo.pieral...@arm.com: updated commit log/ad

[PATCH v9 3/4] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

2017-10-06 Thread Shameer Kolothum
in the smmu-v3 driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 27 ++- 1 file changed, 22 insertions

[PATCH v9 0/4] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-10-06 Thread Shameer Kolothum
n fwnode type(acpi). RFCv2 -->PATCH -Incorporated Lorenzo's review comments. RFC v1 --> RFC v2 Based on Robin's review comments, -Removed the generic erratum framework. -Using IORT/MADT tables to retrieve the ITS base addr instead of vendor specific CSRT table. Shameer Kolothum (4): A

[PATCH v9 2/4] iommu/dma: Add a helper function to reserve HW MSI address regions for IOMMU drivers

2017-10-06 Thread Shameer Kolothum
IOMMU drivers can use this to implement their .get_resv_regions callback for HW MSI specific reservations(e.g. ARM GICv3 ITS MSI region). Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 20 include/linux/dma-iommu.

[PATCH v8 1/5] Doc: iommu/arm-smmu-v3: Add workaround for HiSilicon erratum 161010801

2017-09-27 Thread Shameer Kolothum
string to implement this errata for HiSilicon Hi161x SMMUv3 model on hip06/hip07 platforms. Also, the arm64 silicon errata is updated with this same erratum. Signed-off-by: John Garry <john.ga...@huawei.com> [Shameer: Modified to use compatible string for errata] Signed-off-by: Sham

[PATCH v8 2/5] ACPI/IORT: Add msi address regions reservation helper

2017-09-27 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [lorenzo.pieral...@arm.com: updated commit log/ad

[PATCH v8 0/5] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-09-27 Thread Shameer Kolothum
of vendor specific CSRT table. John Garry (2): Doc: iommu/arm-smmu-v3: Add workaround for HiSilicon erratum 161010801 iommu/of: Add msi address regions reservation helper Shameer Kolothum (3): ACPI/IORT: Add msi address regions reservation helper iommu/dma: Add a helper function to

[PATCH v8 4/5] iommu/dma: Add a helper function to reserve HW MSI address regions for IOMMU drivers

2017-09-27 Thread Shameer Kolothum
IOMMU drivers can use this to implement their .get_resv_regions callback for HW MSI specific reservations(e.g. ARM GICv3 ITS MSI region). Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> [John: added DT support] Signed-off-by: John Garry <john.ga...@huawei.com>

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

2017-09-27 Thread Shameer Kolothum
driver which means these address regions will not be translated and will be excluded from iova allocations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/arm-smmu-v3.c | 41 +++-- 1 file changed, 35 insertions

[PATCH v8 3/5] iommu/of: Add msi address regions reservation helper

2017-09-27 Thread Shameer Kolothum
helper function that retrieves msi address regions through device tree msi mapping, so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. Signed-off-by: John Garry <john.ga...@huawei.com> [Shameer: Modified msi-parent retrieval logic] Signed-off-by: Sham

[PATCH v10 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-11-29 Thread Shameer Kolothum
omments. RFC v1 --> RFC v2 Based on Robin's review comments, -Removed the generic erratum framework. -Using IORT/MADT tables to retrieve the ITS base addr instead of vendor specific CSRT table. Shameer Kolothum (3): ACPI/IORT: Add msi address regions reservation helper iommu/dma: A

[PATCH v10 1/3] ACPI/IORT: Add msi address regions reservation helper

2017-11-29 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. The function checks for the smmu model number and only applies the msi reservation if the platform requires it. Signed-off-by: S

[PATCH v10 2/3] iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation

2017-11-29 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include GICv3 ITS region on ACPI based ARM platfiorms which may require HW MSI reservations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 8 +++- 1 file changed, 7 insertions(+), 1 de

[PATCH v10 3/3] arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07

2017-11-29 Thread Shameer Kolothum
. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Signed-off-by: Wei Xu <xuw...@hisilicon.com> --- arch/arm64/boot/dts/hisilicon/hip06.dtsi | 55 arch/arm64/boot/dts/hisilicon/hip07.dtsi | 24 ++ 2 files changed, 7

[PATCH v12 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-12-14 Thread Shameer Kolothum
bles to retrieve the ITS base addr instead of vendor specific CSRT table. Shameer Kolothum (3): ACPI/IORT: Add msi address regions reservation helper iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07 arch

[PATCH v12 1/3] ACPI/IORT: Add msi address regions reservation helper

2017-12-14 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. The function checks for the smmu model number and only applies the msi reservation if the platform requires it. Signed-off-by: S

[PATCH v12 2/3] iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation

2017-12-14 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include GICv3 ITS region on ACPI based ARM platfiorms which may require HW MSI reservations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma

[PATCH v12 3/3] arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07

2017-12-14 Thread Shameer Kolothum
. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Signed-off-by: Wei Xu <xuw...@hisilicon.com> --- arch/arm64/boot/dts/hisilicon/hip06.dtsi | 56 arch/arm64/boot/dts/hisilicon/hip07.dtsi | 25 ++ 2 files changed, 81 inserti

[PATCH v11 1/3] ACPI/IORT: Add msi address regions reservation helper

2017-12-13 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. The function checks for the smmu model number and only applies the msi reservation if the platform requires it. Signed-off-by: S

[PATCH v11 2/3] iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation

2017-12-13 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include GICv3 ITS region on ACPI based ARM platfiorms which may require HW MSI reservations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma

[PATCH v11 0/3] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2017-12-13 Thread Shameer Kolothum
rt helper fn based on fwnode type(acpi). RFCv2 -->PATCH -Incorporated Lorenzo's review comments. RFC v1 --> RFC v2 Based on Robin's review comments, -Removed the generic erratum framework. -Using IORT/MADT tables to retrieve the ITS base addr instead of vendor specific CSRT table. Sha

[PATCH v11 3/3] arm64:dts:hisilicon Disable hisilicon smmu node on hip06/hip07

2017-12-13 Thread Shameer Kolothum
. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Signed-off-by: Wei Xu <xuw...@hisilicon.com> --- arch/arm64/boot/dts/hisilicon/hip06.dtsi | 55 arch/arm64/boot/dts/hisilicon/hip07.dtsi | 24 ++ 2 files changed, 79 inserti

[PATCH v13 1/2] ACPI/IORT: Add msi address regions reservation helper

2018-02-13 Thread Shameer Kolothum
- the msi parent - through IORT device <-> ITS mappings and reserves it so that these regions will not be translated by IOMMU and will be excluded from IOVA allocations. The function checks for the smmu model number and only applies the msi reservation if the platform requires it. Signed-off-by: S

[PATCH v13 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)

2018-02-13 Thread Shameer Kolothum
On certain HiSilicon platforms (hip06/hip07) the GIC ITS and PCIe RC deviates from the standard implementation and this breaks PCIe MSI functionality when SMMU is enabled. The HiSilicon erratum 161010801 describes this limitation of certain HiSilicon platforms to support the SMMU mappings for MSI

[PATCH v13 2/2] iommu/dma: Add HW MSI(GICv3 ITS) address regions reservation

2018-02-13 Thread Shameer Kolothum
Modified iommu_dma_get_resv_regions() to include GICv3 ITS region on ACPI based ARM platfiorms which may require HW MSI reservations. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma

[PATCH v5 6/7] vfio/type1: remove duplicate retrieval of reserved regions

2018-03-15 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/d

[PATCH v5 5/7] vfio/type1: Add IOVA range capability support

2018-03-15 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v5 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-03-15 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v5 0/7] vfio/type1: Add support for valid iova list management

2018-03-15 Thread Shameer Kolothum
ttach/detach. Shameer Kolothum (2): vfio/type1: Add IOVA range capability support iommu/dma: Move PCI window region reservation back into dma specific path. Shameerali Kolothum Thodi (5): vfio/type1: Introduce iova list and add iommu aperture validity check vfio/type1: Check re

[PATCH v5 7/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-03-15 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Robin Murphy <robin.mur...@arm.com> Cc: Joerg Roedel <j...@8bytes.org> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/iommu/dma-iommu.c | 54 ++-

[PATCH v5 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-03-15 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v5 3/7] vfio/type1: Update iova list on detach

2018-03-15 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v5 4/7] vfio/type1: check dma map request is within a valid iova range

2018-03-15 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/d

[PATCH v6 3/7] vfio/type1: Update iova list on detach

2018-04-18 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v6 1/7] vfio/type1: Introduce iova list and add iommu aperture validity check

2018-04-18 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v6 5/7] vfio/type1: check dma map request is within a valid iova range

2018-04-18 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/d

[PATCH v6 6/7] vfio/type1: Add IOVA range capability support

2018-04-18 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_t

[PATCH v6 0/7] vfio/type1: Add support for valid iova list management

2018-04-18 Thread Shameer Kolothum
ents to make iova list management logic more clear. - Use of iova list copy so that original is not altered in case of failure. RFCv1 --> RFCv2 Addressed comments from Alex: -Introduced IOVA list management and added checks for conflicts with existing dma map entries during attach/detach. Sha

[PATCH v6 7/7] vfio/type1: remove duplicate retrieval of reserved regions

2018-04-18 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/d

[PATCH v6 2/7] vfio/type1: Check reserve region conflict and update iova list

2018-04-18 Thread Shameer Kolothum
This retrieves the reserved regions associated with dev group and checks for conflicts with any existing dma mappings. Also update the iova list excluding the reserved regions. Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> --- drivers/vfio/vfio_iommu_type1.

[PATCH v6 4/7] iommu/dma: Move PCI window region reservation back into dma specific path.

2018-04-18 Thread Shameer Kolothum
eport only iommu specific reserved regions to the user space. Cc: Joerg Roedel <j...@8bytes.org> Signed-off-by: Shameer Kolothum <shameerali.kolothum.th...@huawei.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- drivers/iommu/dma-iommu.c | 54 ++-

[PATCH v7 1/6] vfio/type1: Introduce iova list and add iommu aperture validity check

2019-06-26 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 181

[PATCH v7 2/6] vfio/type1: Check reserve region conflict and update iova list

2019-06-26 Thread Shameer Kolothum
mapped regions which are known to be relaxable. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 96 + 1 file changed, 96 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 970d1ec06aed

[PATCH v7 3/6] vfio/type1: Update iova list on detach

2019-06-26 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 91 + 1 file changed, 91

[PATCH v7 4/6] vfio/type1: check dma map request is within a valid iova range

2019-06-26 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum --- v6 --> v7 Addressed the case where a container with only an mdev device will have an empty list(Suggested by Alex). --- drivers/vfio/vfio_iommu_type1.c | 26 ++

[PATCH v7 5/6] vfio/type1: Add IOVA range capability support

2019-06-26 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum --- v6 --> v7 Addressed mdev case with empty iovas list(Suggested by A

[PATCH v7 6/6] vfio/type1: remove duplicate retrieval of reserved regions

2019-06-26 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers

[PATCH v8 6/6] vfio/type1: remove duplicate retrieval of reserved regions

2019-07-23 Thread Shameer Kolothum
As we now already have the reserved regions list, just pass that into vfio_iommu_has_sw_msi() fn. Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger --- drivers/vfio/vfio_iommu_type1.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/vfio

[PATCH v8 2/6] vfio/type1: Check reserved region conflict and update iova list

2019-07-23 Thread Shameer Kolothum
mapped regions which are known to be relaxable. Signed-off-by: Shameer Kolothum --- v7-->v8 -Added check for iommu_get_group_resv_regions() error ret. --- drivers/vfio/vfio_iommu_type1.c | 98 + 1 file changed, 98 insertions(+) diff --git a/drivers/v

[PATCH v8 1/6] vfio/type1: Introduce iova list and add iommu aperture validity check

2019-07-23 Thread Shameer Kolothum
This introduces an iova list that is valid for dma mappings. Make sure the new iommu aperture window doesn't conflict with the current one or with any existing dma mappings during attach. Signed-off-by: Shameer Kolothum --- v7-->v8 -Addressed suggestions by Eric to update comments. --- driv

[PATCH v8 3/6] vfio/type1: Update iova list on detach

2019-07-23 Thread Shameer Kolothum
Get a copy of iova list on _group_detach and try to update the list. On success replace the current one with the copy. Leave the list as it is if update fails. Signed-off-by: Shameer Kolothum --- v7 --> v8 -Fixed possible invalid holes in iova list if there are no more reserved regi

[PATCH v8 4/6] vfio/type1: check dma map request is within a valid iova range

2019-07-23 Thread Shameer Kolothum
This checks and rejects any dma map request outside valid iova range. Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger --- drivers/vfio/vfio_iommu_type1.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio

[PATCH v8 5/6] vfio/type1: Add IOVA range capability support

2019-07-23 Thread Shameer Kolothum
This allows the user-space to retrieve the supported IOVA range(s), excluding any non-relaxable reserved regions. The implementation is based on capability chains, added to VFIO_IOMMU_GET_INFO ioctl. Signed-off-by: Shameer Kolothum Reviewed-by: Eric Auger --- drivers/vfio/vfio_iommu_type1.c

[PATCH v8 0/6] vfio/type1: Add support for valid iova list management

2019-07-23 Thread Shameer Kolothum
and this respin make use of that. Please note that I don't have a platform to verify the reported RMRR issue and appreciate testing on those platforms. Thanks, Shameer [1] https://lkml.org/lkml/2018/6/5/760 [2] https://lore.kernel.org/patchwork/cover/1083072/ v7-->v8 -Rebased to 5.3-rc1 -Addres

[PATCH] iommu/arm-smmu-v3: Populate VMID field for CMDQ_OP_TLBI_NH_VA

2019-11-13 Thread Shameer Kolothum
CMDQ_OP_TLBI_NH_VA requires VMID and this was missing since commit 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TLBI_S2_IPA"). Add it back. Fixes: 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TLBI_S2_IPA") Signed-off-by: Shameer Kol

[RFC PATCH 3/4] ACPI/IORT: Add RMR memory regions reservation helper

2020-10-27 Thread Shameer Kolothum
Add a helper function that retrieves RMR memory descriptors associated with a given endpoint dev. These memory regions should have a unity mapping in the SMMU. So reserve them as IOMMU_RESV_DIRECT. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 56

[RFC PATCH 1/4] ACPICA: IORT: Update for revision E

2020-10-27 Thread Shameer Kolothum
in SMMU. -Introduced a flag in the RC node to express support for PRI. Signed-off-by: Shameer Kolothum --- -This should be updated through acpica git. I have sent out a pull request for the same here, https://github.com/acpica/acpica/pull/638 Please help to review. --- include/acpi

[RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node

2020-10-27 Thread Shameer Kolothum
, Shameer [0]. https://developer.arm.com/documentation/den0049/latest/ [1]. https://github.com/acpica/acpica/pull/638 Shameer Kolothum (4): ACPICA: IORT: Update for revision E ACPI/IORT: Add support for RMR node parsing ACPI/IORT: Add RMR memory regions reservation helper iommu/dma: Reserve

[RFC PATCH 2/4] ACPI/IORT: Add support for RMR node parsing

2020-10-27 Thread Shameer Kolothum
Add support for parsing RMR node information from ACPI. Find associated stream ids and smmu node info from the RMR node and populate a linked list with RMR memory descriptors. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 119 +- 1 file

[RFC PATCH 4/4] iommu/dma: Reserve any RMR regions associated with a dev

2020-10-27 Thread Shameer Kolothum
Added support to get RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/dma-iommu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers

[PATCH] iommu: Check return of __iommu_attach_device()

2020-11-19 Thread Shameer Kolothum
evice()") Signed-off-by: Shameer Kolothum --- Crash log: [ 31.353605] hns3 :7d:00.3: Adding to iommu group 10 [ 31.358822] Unable to handle kernel NULL pointer dereference at virtual address 0018 [ 31.367567] Mem abort info: [ 31.370350] ESR = 0x9604 [ 31.373391] EC =

[RFC PATCH v2 8/8] iommu/arm-smmu-v3: Reserve any RMR regions associated with a dev

2020-11-19 Thread Shameer Kolothum
Get RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 38 + 1 file changed, 38 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3

[RFC PATCH v2 6/8] iommu/arm-smmu-v3: Add bypass flag to arm_smmu_write_strtab_ent()

2020-11-19 Thread Shameer Kolothum
MR related SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 1953b317d814..5f366d5a9

[RFC PATCH v2 4/8] ACPI/IORT: Add RMR memory regions reservation helper

2020-11-19 Thread Shameer Kolothum
Add a helper function that retrieves RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to setup necessary mappings. Now that we have this, invoke this from the generic helper interface. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 60

[RFC PATCH v2 2/8] ACPI/IORT: Add support for RMR node parsing

2020-11-19 Thread Shameer Kolothum
Add support for parsing RMR node information from ACPI. Find associated stream ids and smmu node info from the RMR node and populate a linked list with RMR memory descriptors. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 122 +- 1 file

  1   2   3   >