linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFCv2 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI)
@ 2017-05-31 14:32 shameer
  2017-05-31 14:32 ` [RFCv2 1/2] acpi:iort: Add new helper function to retrieve ITS base addr from dev IORT node shameer
  2017-05-31 14:32 ` [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801 shameer
  0 siblings, 2 replies; 14+ messages in thread
From: shameer @ 2017-05-31 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

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 transactions.
On these platforms GICv3 ITS translator is presented with the deviceID
by extending the MSI payload data to 64 bits to include the deviceID.
Hence, the PCIe controller on this platforms has to differentiate the
MSI payload against other DMA payload and has to modify the MSI payload.
This basically makes it difficult for this platforms to have a SMMU
translation for MSI.

This patch implements a ACPI table based quirk to reserve the hw msi
regions in the smmu-v3 driver which means these address regions will
not be translated and will be excluded from iova allocations.

To implement this quirk, the following changes are incorporated:

1. Added a generic helper function to IORT code to retrieve the
   associated ITS base address from a device IORT node.
2. Added quirk to SMMUv3 to retrieve the HW ITS address and replace
   the default SW MSI reserve address based on the IORT 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 tables to retrieve the ITS base addr instead
         of vendor specific CSRT table.

shameer (2):
  acpi:iort: Add new helper function to retrieve ITS base addr from IORT
    node
  iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801

 drivers/acpi/arm64/iort.c        | 47 +++++++++++++++++++++++++++++++++++---
 drivers/iommu/arm-smmu-v3.c      | 49 +++++++++++++++++++++++++++++++++++++---
 drivers/irqchip/irq-gic-v3-its.c |  3 ++-
 include/linux/acpi_iort.h        |  8 ++++++-
 4 files changed, 99 insertions(+), 8 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-06-08 11:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-31 14:32 [RFCv2 0/2] iommu/smmu-v3: Workaround for hisilicon 161010801 erratum(reserve HW MSI) shameer
2017-05-31 14:32 ` [RFCv2 1/2] acpi:iort: Add new helper function to retrieve ITS base addr from dev IORT node shameer
2017-06-06 14:10   ` Lorenzo Pieralisi
2017-06-06 15:17     ` Shameerali Kolothum Thodi
     [not found]   ` <tencent_159A581A4E3E9E7D35F82179@qq.com>
2017-06-06 14:36     ` 回复: Alibaba-kernel Jacob Pan
2017-05-31 14:32 ` [RFCv2 2/2] iommu/arm-smmu-v3:Enable ACPI based HiSilicon erratum 161010801 shameer
2017-06-06 13:56   ` Lorenzo Pieralisi
2017-06-06 15:01     ` Shameerali Kolothum Thodi
2017-06-07 17:16       ` Lorenzo Pieralisi
2017-06-08  9:17         ` Shameerali Kolothum Thodi
2017-06-08  8:48       ` Lorenzo Pieralisi
2017-06-08  9:09         ` Shameerali Kolothum Thodi
2017-06-08 10:15           ` Lorenzo Pieralisi
2017-06-08 11:43             ` Shameerali Kolothum Thodi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).