Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp29125lqh; Wed, 27 Mar 2024 13:46:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpaS1/HYRoc45l9J6HXZ42zRQvKJYf4Ga6fNDVUdlufBqey5glA+GWUsSpWVxlsDtrh7b+yrqe7Fc7sTQ/KZzEULIvjjXFYktuTpQ8rA== X-Google-Smtp-Source: AGHT+IERdINcLTxWolEYY8dAh/2iMq75t85UaOowg7rPcXSG4nZ49Z1aWX+rT0Ca6Awr7CvKIemH X-Received: by 2002:a0c:e805:0:b0:696:8234:3ab with SMTP id y5-20020a0ce805000000b00696823403abmr635999qvn.49.1711572369410; Wed, 27 Mar 2024 13:46:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711572369; cv=pass; d=google.com; s=arc-20160816; b=a+GdR7v/mEPvJH47dQs1W0flxgaUDhWMUaDLI2SJMf4KSdsZHRKa6ymd6MJHY4Abkj K1hrErtSJuXv93VhGwDRrBkXzgPbTvbKHW2qWD0p1srsZZHXh1mtDigD1XpKayBgzeF1 b/V8TEuOJM9h/pEXA+hw3wTi0pMQ6rk7iPXZy8yo8/ujG3JxEtkbGzEA3/CykxHVt+z0 QopyEx4VL82+Cxe4eAtYC2SR+cRc2IatDtUPrXg4lTKcIjquqknFJit01XMnPOksxycg xmeRhiqTrnQ56xh4A7OuO8sNlo4707lSnRKdDDSua8hF1h5r98V/dbf2zvATx5A1VkSm uA0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=+2J9nLYy8J8+z61AU5rT+2SBf2QX560BYXoYuI1hBjk=; fh=xzqM3zQnGv30DHnOjaZgmyNZe0A2rN87sk9UY6wdkOI=; b=e1Ox8lMPUrEdmSqN7WJnFwTGykyWcb1Hxgyf/w9D4tHhMtirh1j0l25iV3BlcWopGN uFDSbLWO1v/bAFTJoYkumd07Pr0keJTVt40SPH1lPLbUK2X2jeLHaDrPc5u7g7HCFKCU WyALixEjLd8KyT89itMOQ1QbpcvU99gtX+PtOgttFL4iCMmRp3wJuP3zBc6DCU1Cf/u3 ZNLTfA3Z5Bv73+xqni7FeZBwLSG0pFV6oEkGbsVMADHxTldTPPxBjqYGHpF/yiyqU61c 4IlvR9Ha+WxUvY1ZSzZsYWy9PrLN/puNvYerHPE+7qS0jn8ilg3I52Q0uavoCH1bc8Ug t4dQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pc2TFeKJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-121993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121993-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t15-20020a05621421af00b0069685170207si9122019qvc.440.2024.03.27.13.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 13:46:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pc2TFeKJ; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-121993-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121993-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2968C1C3032B for ; Wed, 27 Mar 2024 20:46:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4451F153501; Wed, 27 Mar 2024 20:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Pc2TFeKJ" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72899153825 for ; Wed, 27 Mar 2024 20:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711572309; cv=none; b=lFk+LcAH/Jm9Lz00CWEDHDSKPdKkB3JDZdDqtcn45ngW4Dkb4Zy+x72ZUDvE+YrtvkhtRldlZbuCQgQurn6WQ0ZCF1ciBD1sTqWi3r5us3rP4LmQopTx9GKa/nPoRgMiWqchwqPLRnc9E66c10N8T8M8aw1Li3iYW1QN2Byf1FA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711572309; c=relaxed/simple; bh=ixlQO8RhdhUN1tbGRAkp9VE+RvI6opNhiyfhNSwEC3w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JIs2KKGh9WvdvWPWnwIlLqPxrfXelN2KW39+wOLIskEbQFVclmSeWfQ7Jvf3gEVNabgelrnLnAiD+b/YA7LGHiMlWaLMgTfLvG3lbgbLI+26CHmLq91pbjLwGIcyIET05TNq3PUcXl+gb+AoYYIMmwhxX6Q0sZSoxNvlIWsltwM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Pc2TFeKJ; arc=none smtp.client-ip=209.85.167.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-51381021af1so331526e87.0 for ; Wed, 27 Mar 2024 13:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711572306; x=1712177106; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=+2J9nLYy8J8+z61AU5rT+2SBf2QX560BYXoYuI1hBjk=; b=Pc2TFeKJ8ldJaZ9+SyMk56f3LWeLcI/ARtIM0ws89r1/Sg0dsMmATfxIW7oSiZdgaI o+GQAWBuLQ8c7TxsSK9wllF0OATlljvkxFEKQ2o5FeXK9nbl3JoQdHBxfWRerz3mXGBE 2lYtFgujAbYcWeLqqXVYIQCSt+5YTfAI2YN5p+llH51BzQELyi9nzLd5UITbWCAMn2x0 FOwJ1U7nUVhFiUmCZZHcSRLRnTe8W3xyHPriS7q5checZI0N4Zwl2UZ0q8Ltc0wwL62S A9qwAAvnTVHVe151EmNF+Dt3APYSlhVaZx5R/4cq4deZ+Aspi/9dNlZjLpWuznW1eHTU FsnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711572306; x=1712177106; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+2J9nLYy8J8+z61AU5rT+2SBf2QX560BYXoYuI1hBjk=; b=kKyy9hTFr9Mrmy6FfGtl0Ghgxh1a/Wx8iHnSRW3IXmo3MTqiF3/LcLnI0ijrTOUdH7 Xjp09qOftnLTFRI/XKKZC50VMjIOkSzYRcIcSPxf/7efSI6IxbngawwxxotHnKUIhvbw 7svKfKWA1WkT5yAQtBIdzU/ACKMebe7OvO4S8D4VwfxBsximCgaGlQA3hkEX32oab8BS ut9zDPsMohFlhsiXMs2eCEdBCnxsqWhGSLbpn/Oc7An/wI26e41bUA7jeJTbjWtcwoDW Vunoro34NkMvPsmhf1AVs0AEZtrDFJeGOGPLzUR8uOQ/0gqWSXMYKTgs+S00+bhWWXEb 5LCg== X-Forwarded-Encrypted: i=1; AJvYcCWZ6ueUJbR7lNBza4oHntQDLySZFqg2FYhhsAkT5OkUQVDTJUU3uBp0KQOU+KyFMcZS9qxenv/JGW9/q184cPOEMcCwvMTlRKJtgaEF X-Gm-Message-State: AOJu0YxbpTMVWwnubxrzRELcnBj6udT042jw0Nn+QUfQOxrnq16XvtLD 9/Wd/Ngo8kiSDl8XDRUWxr0+T1x6MhDiqJ6eYEG2dSqbTZ0IVktBuxY7ihHb50s= X-Received: by 2002:ac2:4983:0:b0:515:ad80:c227 with SMTP id f3-20020ac24983000000b00515ad80c227mr524205lfl.56.1711572305575; Wed, 27 Mar 2024 13:45:05 -0700 (PDT) Received: from [192.168.92.47] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id q16-20020a170906389000b00a46a643b6fbsm5940969ejd.15.2024.03.27.13.45.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Mar 2024 13:45:05 -0700 (PDT) Message-ID: Date: Wed, 27 Mar 2024 21:45:03 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB To: Volodymyr Babchuk Cc: Caleb Connolly , Bjorn Andersson , "linux-arm-msm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Douglas Anderson , Rob Clark References: <20240327200917.2576034-1-volodymyr_babchuk@epam.com> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb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mI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240327200917.2576034-1-volodymyr_babchuk@epam.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 27.03.2024 9:09 PM, Volodymyr Babchuk wrote: > It appears that hardware does not like cacheable accesses to this > region. Trying to access this shared memory region as Normal Memory > leads to secure interrupt which causes an endless loop somewhere in > Trust Zone. > > The only reason it is working right now is because Qualcomm Hypervisor > maps the same region as Non-Cacheable memory in Stage 2 translation > tables. The issue manifests if we want to use another hypervisor (like > Xen or KVM), which does not know anything about those specific > mappings. This patch fixes the issue by mapping the shared memory as > Write-Through. This removes dependency on correct mappings in Stage 2 > tables. > > I tested this on SA8155P with Xen. > > Signed-off-by: Volodymyr Babchuk > --- Interesting.. +Doug, Rob have you ever seen this on Chrome? (FYI, Volodymyr, chromebooks ship with no qcom hypervisor)