Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
From: kholk11@gmail.com
To: will@kernel.org
Cc: robin.murphy@arm.com, joro@8bytes.org,
	bjorn.andersson@linaro.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, kholk11@gmail.com,
	marijns95@gmail.com, konradybcio@gmail.com,
	martin.botka1@gmail.com, linux-arm-msm@vger.kernel.org,
	phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/8] Implement firmware quirks for Qualcomm ARM-SMMUv2
Date: Sat, 26 Sep 2020 14:59:56 +0200
Message-ID: <20200926130004.13528-1-kholk11@gmail.com> (raw)

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

In this patch series, I'm implementing some quirks for firmware issues
happening on various Qualcomm SoCs, including SDM630, SDM636, SDM660,
their SDA variants and, most probably, other MSM/APQs.

In the specific case of the 630/660 family of SoCs, failing to apply
all of these quirks means complete havoc when enabling the IOMMUs,
as the firmware that is running on (almost?) all of the commercial
boards (smartphones) is set to give us a "nice" hypervisor fault,
resulting in either a system hang or a reboot.

The actual implementation of these quirks in downstream kernels is
done through reading some DT property and varying code paths, while
here it's done through the implementation details for ARM-SMMU instead.

In short, the quirks that are proposed in this patch series are the
ones relative to the following downstream properties:
 - qcom,use-3-lvl-tables (39-bit VA size)
 - qcom,skip-init        (avoid stream mapping reset for secure CBs)
 - qcom,no-smr-check     (manually set correct streamid/smr masks)

This patch series has been tested on the following devices:
 - Sony Xperia XA2 Ultra (SDM630 Nile Discovery)
 - Sony Xperia 10        (SDM630 Ganges Kirin)
 - Sony Xperia 10 Plus   (SDM636 Ganges Mermaid)

AngeloGioacchino Del Regno (8):
  iommu/arm-smmu-qcom: Rename qcom_smmu_impl to qcom_smmu500_impl
  iommu/arm-smmu-qcom: Add QC SMMUv2 VA Size quirk for SDM660
  dt-bindings: arm-smmu: add binding for SMMUv2 on Qualcomm SDM660
  iommu/arm-smmu: Support test_smr_masks implementation detail deviation
  iommu/arm-smmu-qcom: Add test_smr_masks detail to QCOM SMMUv2
  iommu/arm-smmu: Move stream mapping reset to separate function
  iommu/arm-smmu: Support stream_mapping_reset implementation detail
  iommu/arm-smmu-qcom: Add stream_mapping_reset detail to QCOM SMMUv2

 .../devicetree/bindings/iommu/arm,smmu.yaml   |  1 +
 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c    |  3 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c    | 59 ++++++++++++++++++-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         | 28 +++++++--
 drivers/iommu/arm/arm-smmu/arm-smmu.h         |  2 +
 5 files changed, 85 insertions(+), 8 deletions(-)

-- 
2.28.0


             reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-26 12:59 kholk11 [this message]
2020-09-26 12:59 ` [PATCH 1/8] iommu/arm-smmu-qcom: Rename qcom_smmu_impl to qcom_smmu500_impl kholk11
2020-09-26 12:59 ` [PATCH 2/8] iommu/arm-smmu-qcom: Add QC SMMUv2 VA Size quirk for SDM660 kholk11
2020-10-14 15:43   ` Robin Murphy
2020-09-26 12:59 ` [PATCH 3/8] dt-bindings: arm-smmu: add binding for SMMUv2 on Qualcomm SDM660 kholk11
2020-09-29 19:10   ` Rob Herring
2020-09-26 13:00 ` [PATCH 4/8] iommu/arm-smmu: Support test_smr_masks implementation detail deviation kholk11
2020-10-14 15:52   ` Robin Murphy
2020-09-26 13:00 ` [PATCH 5/8] iommu/arm-smmu-qcom: Add test_smr_masks detail to QCOM SMMUv2 kholk11
2020-09-26 13:00 ` [PATCH 6/8] iommu/arm-smmu: Move stream mapping reset to separate function kholk11
2020-10-14 15:56   ` Robin Murphy
2020-09-26 13:00 ` [PATCH 7/8] iommu/arm-smmu: Support stream_mapping_reset implementation detail kholk11
2020-09-26 13:00 ` [PATCH 8/8] iommu/arm-smmu-qcom: Add stream_mapping_reset detail to QCOM SMMUv2 kholk11
2020-10-14 22:14   ` Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200926130004.13528-1-kholk11@gmail.com \
    --to=kholk11@gmail.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joro@8bytes.org \
    --cc=konradybcio@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijns95@gmail.com \
    --cc=martin.botka1@gmail.com \
    --cc=phone-devel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git