From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB6FCC433E7 for ; Wed, 14 Oct 2020 22:21:09 +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 351D2221FF for ; Wed, 14 Oct 2020 22:21:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uk+useP8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mv4K9pQT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 351D2221FF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1O/cAh7oQTsQCcWFYVipLtOiI1F4xwi8eqmqG0CILSU=; b=uk+useP8f2YrJ/TlbyR0JSBvw wQFjzRb8b2Jl9BZENXggCAQ19SIRVVm6paHns5FYwE4EJOjZhjRxiBN/EW7KtcoHCM8qsdvNc5w+f qdy1JwjwpNeyO1ItwsKe678SI7iJtoNICreOy9TEKIfDDQB7EsBSeYL/LaQMw3RrdKKOMhbHeX2na hqmnAZskiV5xTPRXt1X+AKliSEJUMAeXmZdMvMFUeXNfVwCSKL+z3PPiIiXtJ0sFhuavFGyvdG8yy YUsgHYVfOCjng8EgsCUX1MeNUUo4Rp4lvZKwZ+2EgJ1Bk/SravvBA2PKpKOrgIZYuLCf7QkmY+3Gg 7pxjVRJRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSp7P-00021v-1V; Wed, 14 Oct 2020 22:19:35 +0000 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSp7K-00021W-MB for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 22:19:32 +0000 Received: by mail-ot1-x344.google.com with SMTP id e20so1114456otj.11 for ; Wed, 14 Oct 2020 15:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=RRjGeO/tlzjrZ9J3RrPGuGS/1yOeW5L71HWGM1q9PqM=; b=mv4K9pQTVn31rCM+RtELHJJEN9cJcDk1Vd6rueXFN+ur+DaBM9Qq6TK1m1WezBf4hr MQc4sM/fZNpoQKwJNk0jefV/29a2Gbpvzk8lFhkPydaWTLr63a2DTl1r3yhg6YPa/3X7 GMmiNAEf3/5wkoQNpNIufrrELvJm1hzUZ4d5PU3Jto2lwEFOoxAzKXsFath4PAacm8Rk ZlO1sQURY4EWIvlOqPlPAW3Y0R6KtQ9uEyAF0kwX1a/HsEDfF9f3sScPa4odkSIEPkkR oQt72Sd4vg9XkFEeqhqZrGx1AchS1N4vkcJYy7b4nnFinyY/IYoOdPvA8MVmt/JKcj4Z llKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=RRjGeO/tlzjrZ9J3RrPGuGS/1yOeW5L71HWGM1q9PqM=; b=o0PoVN4CXvP8L7QGMnE2ApU8HOM6iPWEc9CGmJDg4eY7ERmC7cqS8Q+ppH1SvsyBE7 N/4O3X0R0znEsS2Fz2Myug4VZfg+FQPQJB+pZ4uatmRjCSdgJ6Dv7Q2/vhI3dz6JHOJ3 ockhAVn97LcBqocO7w9NAFYGIsAB/XZQKWb/+wJuo12D4NPXdZK//9mg6AJl+lAyiThm ua5ceyS1RYHfItowrAycpS+ehcC06aYYo+2GQ5mwo6s+Af3vu4CGlLZiq4moHIJasKEp vLG/Ytjpa9BCBVJfy8s00nLssZ73GlSXk8sGF0NIPkayn7V6+4CkWe+qsm5mQ3KsZ04c BGSQ== X-Gm-Message-State: AOAM532rcNR90BlL6hzKAjHe7WdeHrSrCVClSOHSFt1N9q2T2mzcntbJ Bh4nlFlZsz5K/ijMRuYy0bcuRQ== X-Google-Smtp-Source: ABdhPJxDI9ig5Teru80krEOu8rMTShtx9klUW2MoC+kc1i2hN5KpLmX7EJYBnDsiZFyWnkmRIXuaHQ== X-Received: by 2002:a9d:6a55:: with SMTP id h21mr607071otn.297.1602713963840; Wed, 14 Oct 2020 15:19:23 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id q81sm337035oia.46.2020.10.14.15.19.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 15:19:23 -0700 (PDT) Date: Wed, 14 Oct 2020 17:14:40 -0500 From: Bjorn Andersson To: kholk11@gmail.com Subject: Re: [PATCH 8/8] iommu/arm-smmu-qcom: Add stream_mapping_reset detail to QCOM SMMUv2 Message-ID: <20201014221440.GA299663@builder.lan> References: <20200926130004.13528-1-kholk11@gmail.com> <20200926130004.13528-9-kholk11@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200926130004.13528-9-kholk11@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_181930_820452_AD072A09 X-CRM114-Status: GOOD ( 25.12 ) 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, will@kernel.org, joro@8bytes.org, konradybcio@gmail.com, linux-kernel@vger.kernel.org, martin.botka1@gmail.com, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat 26 Sep 08:00 CDT 2020, kholk11@gmail.com wrote: > 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, Wouldn't you run into the same problem when init_domain_context() later comes along and "accidentally" pick one of these context banks? Do we have any way of knowing which banks this is, so we can mark them as busy? > + * nor the relative S2CRs can be set as bypass, or a hyp-fault On platforms such as SDM845, SM8150, SM8250 etc, writing S2CR of type BYPASS is trapped by the hypervisor and FAULT is actually written to the hardware - resulting in a system reset when the associated hardware tries to perform a memory access. Is it the actual S2CR write that causes the problem you're seeing or the fact that it happens to be that you shoot down the display stream as soon as you touch these registers? Regards, Bjorn > + * 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, > }; > > -- > 2.28.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel