From patchwork Sat Sep 26 13:00:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 11801401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABA98112E for ; Sat, 26 Sep 2020 13:02:25 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A731206D4 for ; Sat, 26 Sep 2020 13:02:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NBNU9mf6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="n/LlruLX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A731206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EQHMCDHhuVubLfwVMH06Joh2FpLiPvP15nE6JNS+5Zg=; b=NBNU9mf6sCFJqmW6BlxZirzXN Yl1PkhHUNydnADxX76teoIsa66W0Bi4tEV4SfkCEcsk5RH8/XMaLYef6qcK98MsKXFvEz84FRwj76 0iZj5Xvu13g1prYJJzj/d2xFY/xl2NgPBI9vpPZOa0P4GArpE1f/kcbRDz5qNgyNO0lJKpHBrZuBm UNcjqtov5JCqfpk+1e7CPi9/DJbYeKFhTsAQNFklMj2N4ISmZakKnjbnsxu6UOJDHLD53RJCTT4km VULrSCNYT/Kr+MrjlptjclL/wjhKhJz0qASc4+/pDLKI8xPXxAmOOtxqrW7F6LgCQ22t0J2NkLbAA yAd2qq77Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kM9p2-00009S-0O; Sat, 26 Sep 2020 13:01:04 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kM9oI-0008OK-5z for linux-arm-kernel@lists.infradead.org; Sat, 26 Sep 2020 13:00:20 +0000 Received: by mail-wr1-x444.google.com with SMTP id t10so6908217wrv.1 for ; Sat, 26 Sep 2020 06:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=POwNz31ZN3LOQvK8MbPorXqI52RXX9/Ai5jo+kx6R5E=; b=n/LlruLXp5eS3hUv4JVlIQ1RePSbyLXxeXGV+9PARKUxGojZ93WfkBuzL+BjVrKxdU CtbQiP2nnjvnhIZVM+gmIH+oePtSMU6/RNATnAbo4x9/mtvdLD3kmw8sjQl7mUwWdvSN cY7k5e+9GIPJ0M9tyStdj9TVC2TN6K39aZ+56rr5Y+fBU66cuN8+1GNutQzhw7bXAOLT 4cN/soOvcCIf1vhp410SEB27vmGidsDYm4NiVn3IJkaDUv1El+vL0GZhftJXpILrC+2K twtk6ycSorMIjJ3/B38bvdjGeeZtSIPr2NIWh1MhPaXBIu1wUNrHhtUasdldNHtFSEyK iWSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=POwNz31ZN3LOQvK8MbPorXqI52RXX9/Ai5jo+kx6R5E=; b=m1cEMzD4ONq2Ip9XKExYhbNEcN+w2JJLyMq7FTBRwq7YIW5LFjTy9erL8/XubGgcYs HNXr9uoCyfpOjLyW6seXPWh2aHik60dIrtikbR0/W/bez4bnGkPFsIIjBIOM9xaigmPO 9iOxBRSnfd5T8e4aCVCtSjinHc+eRpr3zJETAkgdWcBXi55kIWAZNeCx6ujm8Oba7zBQ lTIrV6axC0OaRw1JIYD0efuWr/LllRsCLwLlp6ca/X5QS6raxMlY66zxqvEE1gsldaSe IjA42WymzgWS+smoEsd+G2lUVuEIoxaXVQcSZsfWKVEP1yAo8eLgHXim+rJXvWmwLHgK sW8w== X-Gm-Message-State: AOAM53080GhaISrbYGjaqGKCCtHaziUNVVs7WXXyIinnrI4oeJgrZgyF aHn5VPfZYcNLe/OIAjAVrfY= X-Google-Smtp-Source: ABdhPJxKO7cz2KLjIhwJxFhZR3eStWHED3pAB8ByU4QPl9SSq0oDXBVFVySh0V+586xr+M/Jh7mSWg== X-Received: by 2002:adf:e5c8:: with SMTP id a8mr9728962wrn.5.1601125217236; Sat, 26 Sep 2020 06:00:17 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu ([2.237.20.237]) by smtp.gmail.com with ESMTPSA id b11sm6462896wrt.38.2020.09.26.06.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Sep 2020 06:00:16 -0700 (PDT) From: kholk11@gmail.com To: will@kernel.org Subject: [PATCH 8/8] iommu/arm-smmu-qcom: Add stream_mapping_reset detail to QCOM SMMUv2 Date: Sat, 26 Sep 2020 15:00:04 +0200 Message-Id: <20200926130004.13528-9-kholk11@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200926130004.13528-1-kholk11@gmail.com> References: <20200926130004.13528-1-kholk11@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200926_090018_258975_4E8C0261 X-CRM114-Status: GOOD ( 15.05 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [kholk11[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [kholk11[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, marijns95@gmail.com, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, joro@8bytes.org, konradybcio@gmail.com, bjorn.andersson@linaro.org, martin.botka1@gmail.com, kholk11@gmail.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: AngeloGioacchino Del Regno On some Qualcomm SoCs with certain hypervisor configurations, some context banks are hyp-protected and cannot be disabled, nor the relative S2CRs can be set as bypass, or a hyp-fault will be triggered and the system will hang. This is seen on at least Qualcomm SDM630, SDM636 and SDM660. Signed-off-by: AngeloGioacchino Del Regno --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index b18e70bddf29..364908cc2adf 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c @@ -85,6 +85,18 @@ static int qcom_smmuv2_cfg_probe(struct arm_smmu_device *smmu) return 0; } +static void qcom_smmuv2_stream_mapping_reset(struct arm_smmu_device *smmu) +{ + /* + * Broken firmware quirk: + * On some Qualcomm SoCs with certain hypervisor configurations, + * some context banks are hyp-protected and cannot be disabled, + * nor the relative S2CRs can be set as bypass, or a hyp-fault + * will be triggered and the system will hang. + */ + return; +} + static void qcom_smmuv2_test_smr_masks(struct arm_smmu_device *smmu) { /* @@ -99,6 +111,7 @@ static void qcom_smmuv2_test_smr_masks(struct arm_smmu_device *smmu) static const struct arm_smmu_impl qcom_smmuv2_impl = { .cfg_probe = qcom_smmuv2_cfg_probe, + .stream_mapping_reset = qcom_smmuv2_stream_mapping_reset, .test_smr_masks = qcom_smmuv2_test_smr_masks, };