From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F31793815E2 for ; Mon, 20 Apr 2026 08:06:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776672363; cv=none; b=vDDvz2REYDl9k37SHk2LspszQBx5TUAW5Pyt20zQbkwAsXoZeFRgbX4hRBkAu82k4kBiI/2TNGolrqBISqkQ+LKu5MfKRANIeDMAgTWsMHfHuIgVjHcKtcwbzArmXmr0nGeG5rrwWgLhdpcLIgk9jMbWqLjPkyHnk75tSeKwRVQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776672363; c=relaxed/simple; bh=txWTYpu9LvB1Jo9JfaqRGAVwewz/x0Y+VLCDe+rsCe8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rdvpfFPqa43YI0BAY/2n1d5sk7ZWyplB6LUXmkGNqgLNBtZNJzpvKj+5jJGkBoHgVLZ+NSJEr+uXaKU8NBUeNuAezBb162Yueovvd75Wit+nsLolQ0j+uNEsE7C3crGOicgsafx6NLFR5A5PjHOqwYjPhMyrHC4ho1eeo/SlDqg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=JJl5C4ai; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=AqRvqqwR; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="JJl5C4ai"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="AqRvqqwR" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63K7Ymlt3454948 for ; Mon, 20 Apr 2026 08:06:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= GYwCDlWBymVYKNSYIRfmXGr0gWM+WgtL1s/ILUpH/N4=; b=JJl5C4aiTxDhs92P xc0ixS99JxFRq1BpnUX55w31AIoquqnrVoez/PkWgQQFc4Ed2zxIkjUI4LhAHglC Cp7H+0kCuYnTtijrLj0y/fF+gFamrWJ36nfcZ5x+iY81zMXJ64eJFpKXNYvvxgPT Jc7resEqRpoeXJZ7NjmXd3qOVf9jEDcW6prbfgfQ30nRM79QE/fc99LvnYPNN+Sq 28gqhzEFP5nuJ6JHioyreKcQ/+7WkxGyc1r7I8d2oIdLH+at8AmRERSXaohOX/kL dWroS4svQONCI2iR1Y/aYlGbgIKRQ3yneKvHgvQjZrnB7rUCFlQmOOEkoUOdpUSE Z84tOQ== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dnfvjr3rg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Apr 2026 08:06:00 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2b465bf993cso28328475ad.1 for ; Mon, 20 Apr 2026 01:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776672360; x=1777277160; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=GYwCDlWBymVYKNSYIRfmXGr0gWM+WgtL1s/ILUpH/N4=; b=AqRvqqwRM/CLuQ2riXZul0MFU+l4BLcLdCAf31x3jq7zK8kkjhjpVafih6CWWSQc7/ JG8SOyL2Kw9BdnmLjS4QGHBV5ijF9O9xo1PMgIrNT6xy3hSo3AxcjRJLecYjYm0sYj6D QDsmNPzDS/taHYTJk0aWQYSPJ3uk9jKOV6mz8USSoR5BSaNcxYAH4WlhYYzKdC4+0kpi nEPeB8MZUzmOmz6bvfJoyA1ck5yX5asDkdQ9+IRo88dnCzUjXcKS1KRkNVTr/OHevHrv IDfP/BTmjWzY+eCvrjMsTQbtGqXgGqZDONpMpI3L+r9Oremq55lLk/4D6OggSJdFx09d yxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776672360; x=1777277160; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GYwCDlWBymVYKNSYIRfmXGr0gWM+WgtL1s/ILUpH/N4=; b=ZBAZr40RLDm3uJ5/GjbS4h23U+YoKVeGidntNlztJPDxmN+iDgsR9+UKIkiBv1bNru GRkNigCTvYQF8CfVgpQLT6ob50lGPb4X8KE72qsgeRDam8Z9T1yW6g+1C1bC9ZeR1KwY XRCMovXkF+7edxbM4y7tY24bw4OSLrRlssmPdJr25/dbK5ChIFODLf406F1ZkmeESVxP gfyXWB1b3O2g+lYMvjoERvZx2mXJJk47c0iz8896V70tePtE2QL/6cSwAi9/IcF15SBV rFQmhlJ6fBj2pzJm7gTggHFqW7JOVJu4aNtQ1q8h1sdxIOXNL9EkSgWG8rrYwYUIz+TA J/Jg== X-Forwarded-Encrypted: i=1; AFNElJ9V7EybqvIH+vDTRRul42pcJomanopRobq2BzvJ95wa/X+FNIuM2hl+jof9hOG5Wt4NyH9eI4yQM9p/2V8=@vger.kernel.org X-Gm-Message-State: AOJu0Yxvnimmz85ne02U/0nqg7V4xL74i4KMSXkW9ntY12AkitqcNt1T x1HKfjJMWSP+Klk7ztaJPECAovdVq+D4MBoiHbsYGCcINtjBq2fuFGb8bd0QH2vQRyAOQqOabzU xDUWw5SjSmmM8c3IO20/FEeNMzt/Zga1D6chrR72lzXmNkmxhO8nXo2lnvFnPJjY9Vcc= X-Gm-Gg: AeBDieunxyqOXUwSCeVZHMM56iWoFLQ1qjWPbm/PGfESOujByV4B24PWwz0F1D+1v/6 MqIRvwnD74X1a6Kv8+16Qfg7S2jXEs02AT+6Pg9xvbAlnvmRWgAwv0WjkIrk2uLdajrmm9ceFNW wnQkyWo9/xJ0WPfjayG4217t7h9DMubBUTV465oQLx/bmlMS2O5uLOeyRqWN0Dw8R+tz3JwvNfU +JSaeV9LDWV2noQoU10tip4mYvaD4dhGn4lDoYXPHyJtWzX+XbiguL27/1GKr+6eLAhhzNUeOgL TwB8KnonrH3mKKjZtlq6Tw7CF1fgRpJGYXUopuNu1QLb2pXKwyqLvlh8V+bSK9enah0UgSTMUgm pjR4d9onGjRGWMVlgC4Xq4epDvlb4r4xOUq+YV7GXqyfrbk2u2oSDYxf8VpSXJA== X-Received: by 2002:a17:902:7c0f:b0:2b0:663f:6b53 with SMTP id d9443c01a7336-2b5f9eb2b36mr93181325ad.13.1776672359734; Mon, 20 Apr 2026 01:05:59 -0700 (PDT) X-Received: by 2002:a17:902:7c0f:b0:2b0:663f:6b53 with SMTP id d9443c01a7336-2b5f9eb2b36mr93180915ad.13.1776672359159; Mon, 20 Apr 2026 01:05:59 -0700 (PDT) Received: from [10.217.223.121] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fab4bf7bsm94671725ad.81.2026.04.20.01.05.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2026 01:05:58 -0700 (PDT) Message-ID: <840133b0-6e6e-4fec-bb00-822bcf43b351@oss.qualcomm.com> Date: Mon, 20 Apr 2026 13:35:52 +0530 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 2/2] arm64: dts: qcom: glymur: Add crypto engine To: johannes.goede@oss.qualcomm.com, Konrad Dybcio , Thara Gopinath , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov Cc: Neeraj Soni , Kuldeep Singh , Abel Vesa , linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , Udit Tiwari References: <20260416-glymur_crypto_enablement-v1-0-75e768c1417c@oss.qualcomm.com> <20260416-glymur_crypto_enablement-v1-2-75e768c1417c@oss.qualcomm.com> <653fc8bb-295f-4f1d-b9ac-a33e0d8a933b@oss.qualcomm.com> <82e0d347-9ac9-497c-bc67-0db9206c5dd2@oss.qualcomm.com> <0d5bf2bd-b90c-4814-bd2e-126a9bcb82ce@oss.qualcomm.com> Content-Language: en-US From: Harshal Dev In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: tyZRBSAQHsfPZfPkD1lPnd2yrvbJEL8D X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIwMDA3NyBTYWx0ZWRfX9AOSbFS243li sPi8VbTN3e3sSddPhFUQ0G/5gJ3GeMWG2eDlRRovDCSsmtCFEMw2Fz+2QdznRxu+0VE2Xv2Qr1H puvaBZWT4ropVVdtmvtHBnXnONMkWSJ6RZIQhrE1zT74XJgZu0CtVPC/rYsOhEw+qmNVDrPx6EU zcJR5Nq3J4Bj14/q0lzrKd4ryWBZWqhhALSG2UZHBWYAOs47q2pWXEagwBH9RBuixckFUzxhrzi M5I2vQQJAoaQeVqaMXhdDILhPm1K1f+6X3JjW9HMLFlhe+miKdvgnDBP/FweYQ4e1zIV3lGkZif bZrfP20KziMX/fpto4egvx+V5WxB7f1EMxVR9sF3iMxmuDSRjMYrdY8EUVa2qUcJmSYpv8jc6UT PXX0jinWjH0Orld0kF7hOAMo8N4CwYC60qFB3o3+vjtM1lUV68rZUB/dTDRZ0GoZqKrjB/ReGdH FgpkIpNW14u4IwLl0qQ== X-Authority-Analysis: v=2.4 cv=XNMAjwhE c=1 sm=1 tr=0 ts=69e5de68 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=ZLGELXoPAAAA:8 a=EUspDBNiAAAA:8 a=WqXSJLEMAAAA:8 a=9QHSPmZLdci2C_p0ZdMA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 a=CFiPc5v16LZhaT-MVE1c:22 a=XN9CkKUvUZsNBwEnh_OE:22 X-Proofpoint-GUID: tyZRBSAQHsfPZfPkD1lPnd2yrvbJEL8D X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-20_01,2026-04-17_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 clxscore=1015 phishscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604200077 +Udit, +Bartoz Hello Hans, On 4/17/2026 8:00 PM, johannes.goede@oss.qualcomm.com wrote: > Hi, > > On 17-Apr-26 15:38, Harshal Dev wrote: >> >> >> On 4/17/2026 4:36 PM, Konrad Dybcio wrote: >>> On 4/17/26 11:22 AM, Harshal Dev wrote: >>>> Hi, >>>> >>>> On 4/16/2026 7:10 PM, Konrad Dybcio wrote: >>>>> On 4/16/26 3:07 PM, Harshal Dev wrote: >>>>>> On Glymur, there is a crypto engine IP block similar to the ones found on >>>>>> SM8x50 platforms. >>>>>> >>>>>> Describe the crypto engine and its BAM. >>>>>> >>>>>> Signed-off-by: Harshal Dev >>>>>> --- >>>>>> arch/arm64/boot/dts/qcom/glymur.dtsi | 26 ++++++++++++++++++++++++++ >>>>>> 1 file changed, 26 insertions(+) >>>>>> >>>>>> diff --git a/arch/arm64/boot/dts/qcom/glymur.dtsi b/arch/arm64/boot/dts/qcom/glymur.dtsi >>>>>> index f23cf81ddb77..e8c796f2c572 100644 >>>>>> --- a/arch/arm64/boot/dts/qcom/glymur.dtsi >>>>>> +++ b/arch/arm64/boot/dts/qcom/glymur.dtsi >>>>>> @@ -3675,6 +3675,32 @@ pcie3b_phy: phy@f10000 { >>>>>> status = "disabled"; >>>>>> }; >>>>>> >>>>>> + cryptobam: dma-controller@1dc4000 { >>>>>> + compatible = "qcom,bam-v1.7.4", "qcom,bam-v1.7.0"; >>>>>> + reg = <0x0 0x01dc4000 0x0 0x28000>; >>>>>> + interrupts = ; >>>>>> + #dma-cells = <1>; >>>>>> + iommus = <&apps_smmu 0x480 0x0>, >>>>>> + <&apps_smmu 0x481 0x0>; >>>>> >>>>> It seems like these aren't the right SIDs on this platform.. Have you >>>>> tested this patch on hw? >>>> >>>> Thanks a lot for catching this Konrad. The correct SID pairs are <0x80 0x0> and <0x81 0x0>. >>>> (I hope I don't need to pad them?) >>> >>> No, you don't >> >> Ack. >> >>> >>>> >>>> Unfortunately, I could only validate driver probe on my limited ramdisk environment: >>>> >>>> [ 4.583802] qcrypto 1dfa000.crypto: Crypto device found, version 5.9.1 >>>> >>>> I was waiting for Wenjia to run the full crypto user-space test suite once. I'll update the >>>> SIDs and wait for a Tested-by from him. >>> >>> Thanks >>> >>> I think you should be able to get some life out of the crypto engine >>> via CONFIG_EXPERT=y && CONFIG_CRYPTO_SELFTESTS=y (which btw +Hans >>> mentioned reports a failure on Hamoa) >> >> Sure, I'll try this, could you also point me to the bug report? > > No bug report yet, I was asking around internally who I should > talk to about his. > > I'm seeing 7.0-rc# QCE crypto selftest failures on a Lenovo ThinkPad > T14s gen 6 (Hamoa x1e78100): > > [ 1.357020] alg: skcipher: xts-aes-qce setkey failed on test vector 0; expected_error=0, actual_error=-126, flags=0x1 > [ 1.369951] alg: skcipher: ctr-aes-qce encryption test failed (wrong output IV) on test vector 4, cfg="in-place (one sglist)" > [ 1.443143] alg: aead: rfc4309-ccm-aes-qce decryption failed on test vector 1; expected_error=0, actual_error=-6, cfg="misaligned splits crossing pages, inplace" > > This is with manually compiled 7.0-rc# using Fedora's default kernel > config which includes: CONFIG_EXPERT=y && CONFIG_CRYPTO_SELFTESTS=y > with the latter being hidden behind CONFIG_EXPERT for some reason. > > This is a regression compared to 6.19.y where CONFIG_CRYPTO_SELFTESTS=y > is also enabled by Fedora and it works fine. Our Crypto Engine enablement for Hamoa (x1e80100) was merged as part of the 7.0 kernel https://lore.kernel.org/all/a9a6b840-5a4f-4d27-8b34-da82657e5c9d@app.fastmail.com/ I did not run the CRYPTO_SELF_TESTS for these, so I am not sure if they were passing for 7.0 with the Crypto Engine enablement changes. I also do not know if we have been running the self-tests for other Qualcomm targets which have support for the Crypto Engine. Maybe Bartoz can help answer this, since he has been involved from the beginning. But it is worthwhile to check if something else introduced this regression or simply the enablement of Crypto Engine on Hamoa. If you have a manually compiled 7.0-rc build could you perhaps check reproduction after reverting this commit? 7d1974ce80fc386834e5667b0f579c2c766c4faa ("arm64: dts: qcom: x1e80100: Add crypto engine") > > I've not looked further into this yet, other then a message to fellow > OSTT team arm64-laptop users asking for tips / whom to report this to. > > I would be happy to send create a kernel.bugzilla.org bug-report > about this to, or report to email somewhere, or ... > > Please let met know where you want a bug-report to be filed and > also what information to add on top of the above info ? > > E.g. these failures trigger a WARN() and thus log a backtrace, > do you want those backtraces and if yes I presume I should run > them through addr2line ? > Please send an email to me, Neeraj, Udit and Bartoz for a separate discussion on this. Please provide information which can help us reproduce this on our setup, and also the the dmesg and backtrace logs which you are mentioning here apart from any other information which you feel is relevant. Thank you very much for your efforts on this! Regards, Harshal > Regards, > > Hans > >