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 08A082E228D for ; Wed, 24 Jun 2026 11:45:52 +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=1782301555; cv=none; b=fQuVkt0APshtnMuHmNqNn+Uu8GU9NEGFDgkHe1vdRyX8Uznxm67U01oIxLAxWQ6cBpSILClIoOLmoasvF7ILDuOzzRIaJ0X/YI8K28uCtOIDxR/yroRCpYFU5nrZ1H70nibSUHH02HgguABZK86NV/xizAixQf8lzGQS8uXXaUQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782301555; c=relaxed/simple; bh=Ng7sARmYi7p+GV9I8JUofY1Xk/cSGFYDUMv6MjUCXEo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=czWKb3nNiNHtjX8qq6MxQywd4lZ/RCaR0QweiZNdoGnvwYfVQrt9gnhRod7giS6wHgksDHBK/p+J8KP3QVB7B2fp98L6XP9eC4pkFdGTLd4K0ArNMe9eTgLuwUY9p8r1eZ5aJE9Pq+IlVj7LK7EMEgYQqjyjZYHrZkJycIyrb+I= 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=AueMYbaO; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Cm4WFsvS; 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="AueMYbaO"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Cm4WFsvS" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65OANbNa2869062 for ; Wed, 24 Jun 2026 11:45:51 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= kjBLKK8bycZEhlSfsBuPgqxUUunAmuUeS+oktbJQUFo=; b=AueMYbaOtvtN9fQk neSYjVycOh1E1xMdLX7665SYaaU9OVYHFbKdehLJjzDYuvgrbuBglB98nJj8xR/3 50LOF+kB4iITwUWYK70G4EQZ+/7AvmlBpzoCU+HXSg2vJlC/iyo9dv7ntcYA3vHU kHpF0a1YdJO5d1jdUJk0H7fRhz5mIhA5+E7yYe40X2z8yc31iK8+H5+3sEckdT2r 9CsKtfgj9b7PnQ4ldbCQOMGLdZsH7jI4uiG/rPqE+UrR1gaWEkubGjUffP4MG4yb lm0FQNxpD2B8bdayUBcdGp36K3uLEgcvQpaY4osmpfTUnQ5SvYI3MmkDAybAK66p seTWpg== Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f0apq1009-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 24 Jun 2026 11:45:50 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-8de715f6ebfso2300246d6.2 for ; Wed, 24 Jun 2026 04:45:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782301550; x=1782906350; 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=kjBLKK8bycZEhlSfsBuPgqxUUunAmuUeS+oktbJQUFo=; b=Cm4WFsvSt7zD1CouqHXAP8HODFGTh7eImWhlmlGvHCxco6oe54vL238J+kXleqPHIu sn6Dqfr48Uw/C0hyahzKnHjhy4L16cazb88p/h7szD8miFf+zxXPzPpZBdGRzTCo9B4z SEIGUx1E45ess05JD44dqG1KDPuCpY22uPUW+mWiRxHxur6CQ2r3Ns97TcgK6cdpCriL Oj/t4/FxhdR2ir1OkjqtRLrek+y+a6kZOrlu4zjR4srixsFuARFD5jV8t61ZvVqEcQFO aXLIJKW0udWfWn4eZnM9woGHfoZSqYf1VBYwqWh2CFAgCqLAbnzBC9EH+ndvYR25Jtfg eJKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782301550; x=1782906350; 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=kjBLKK8bycZEhlSfsBuPgqxUUunAmuUeS+oktbJQUFo=; b=nqs1ClWkgqU6Vat5Lj/N+Ymki3E5DFIly+gb+psGnsGfUFt4KHxOuIVdyGDDkiM9VV b+gtKV931oDr38RK8OTsZ6Pr4TtLVvsxMhxQHF5rAqV1p817lUvsl3D4GdX+QKup10SP qtY6UQj5AVoYJTlTAylywRFvupvt65l2LOy0XOfQXTUP/7dB4kVbqYzZBbdAzvlrHoKn 7+Z3z0erU4028H1fxJmDKEhAzMO6qJfJ+5zSnEaM7ndVV4vH9Tz4aK52LAoPRa+/t+wI JzXwrg8ZNVpII58XrhflxAyM2kv6ktDt0CmeuocvkoqjTFyWzbpmDtIGqeGdK0yWHoZR 8kLw== X-Forwarded-Encrypted: i=1; AFNElJ9eCl3wKDJBqMULYjoEFK+rBM9fbMDpJHmkV/dKwbfu7uSDZ038Q8Zrv9Z5um/lQ5VQDhCUem10wUh80Co=@vger.kernel.org X-Gm-Message-State: AOJu0YzHpSR7ECgP98nQQqJLTrWFaSyhITcnCWI74oGwvxOeJjt061S6 pkOqT8NLFFx4CxgtKJ/iyxbdDM1TGLVf3S16A3/YCU8+7m8+G2Vuk5JWHZE6N8xoXh/Ra4HF+Zl QHNCWyADIGgOacFJlS+Tx8l0EQ91aQnpXUlfL/W0RPfhQxoUjSL3lC/LJfbEe+nrEPj0= X-Gm-Gg: AfdE7cl3p9kAfiZJVo1stjrAvjrs0B1i1UoelmBUINzWTRfAgagRJLjLuQ3TqDvvhWB pkznFkERCzIGfwahCX1L6oFfHGchszsn1Lxtlzh9Qg+3GjbfJWfzBAhpJ/hXuIcCn68d+IH3QMt RdHI6OZIUBJcuCLMJRU4XUtQ4oN8BYKGhjmT6Iw7EdnUpBaSWnr1YjAHvvpORLGjB25VWQHzRua YZ2rAYlqh4E5vt6W59INmSxdEVcbsnLBjAwf7hX+S6IYLUmPb83gBaIb8L/hGsgNf+aEGV4d3uS 2IZbZYQ4rASVS9/ubemp/mGtTdTx13e49tWgaO69TRusRFoDU65fGIqL38gAbV9OwGHpguS4fK5 2NvS2ng7FW3sjsqFxz+yLAGwCDjwVusFtFGU= X-Received: by 2002:a05:620a:1a1f:b0:914:ea37:6f14 with SMTP id af79cd13be357-925c6576fd1mr912772585a.1.1782301549941; Wed, 24 Jun 2026 04:45:49 -0700 (PDT) X-Received: by 2002:a05:620a:1a1f:b0:914:ea37:6f14 with SMTP id af79cd13be357-925c6576fd1mr912769585a.1.1782301549508; Wed, 24 Jun 2026 04:45:49 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c0c610e5280sm655824766b.53.2026.06.24.04.45.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2026 04:45:48 -0700 (PDT) Message-ID: Date: Wed, 24 Jun 2026 13:45:46 +0200 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 v4 4/6] remoteproc: qcom: pas: Map/unmap subsystem region before auth_and_reset To: Mukesh Ojha , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org References: <20260430191253.4052025-1-mukesh.ojha@oss.qualcomm.com> <20260430191253.4052025-5-mukesh.ojha@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260430191253.4052025-5-mukesh.ojha@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjI0MDA5NyBTYWx0ZWRfX8A3acYyu5KMP 0qAA5gwh2m0zeZC6RJDzOhcyUlm+WBpv+wUc9t8eD2Mx/VMW/zk6N2B+G3wANh6MPC05aHzu1vz 2LTe8MLA346CfdXpsQLQAllhmN/ezwA= X-Proofpoint-GUID: WbxghIgYr9kR39qIDswTNCSgCMOd-Z4O X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjI0MDA5NyBTYWx0ZWRfX7TTwP7k5Sl8I yxmVAzS0n5bzWl9TdBgQL8lxqT48n0dAuG3C3PF8+PGeHm2ROuX9cYeIiX2u7MgBymkJm7HsHvS 3v8nHCe0lEmsR7pH79X8xQ6yCEt2pP8muaBRXxEafXEVNyGtRZJ+cgNuWXxuMCWquJz1VoWMu1c lSiFPth6nTkyGdVvP4Cq/PMtKXmDsPIbmXNNEj824Hln7W85p747GrsXYZ3OTaxZRhZeV6yt01X NoQC+kASxW/9ENW6q+BKtQBokpk+Ig/VITARJuGjjKfMeKlTn6Hcd7xw1Pcv14XBETec0qls4dY uB//xYJORyZLvJ6o6ZwYw4QuZONL9LQJOHCJBZeU891s6E/ejvNxaeJGoUzH3dKNXBnk7SFPoAj +isgq+bkEJ9TdGdjNLFvrL18Sf6wlg== X-Authority-Analysis: v=2.4 cv=NpbhtcdJ c=1 sm=1 tr=0 ts=6a3bc36e cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=h9zVLhnXF9m6a8bq9Z4A:9 a=QEXdDO2ut3YA:10 a=1HOtulTD9v-eNWfpl4qZ:22 X-Proofpoint-ORIG-GUID: WbxghIgYr9kR39qIDswTNCSgCMOd-Z4O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-24_03,2026-06-23_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606240097 On 4/30/26 9:12 PM, Mukesh Ojha wrote: > Qualcomm remoteproc drivers such as qcom_q6v5_mss, which do not use the > Peripheral Authentication Service (PAS), always map the MBA region before > use and unmap it once the usage is complete. This behavior was introduced > to avoid issues seen in the past where speculative accesses from the > application processor to the MBA region after it was assigned to the remote > Q6 led to an XPU violation. The issue was mitigated by unmapping the region > before handing control to the remote Q6. > > Currently, most Qualcomm SoCs using the PAS driver run either with a > standalone QHEE or the Gunyah hypervisor. In these environments, the > hypervisor unmaps the Q6 memory from HLOS Stage-2 and remaps it into the > Q6 Stage-2 page table. As a result, speculative accesses from HLOS cannot > reach the region even if it remains mapped in HLOS Stage-1; therefore, XPU > violations cannot occur. > > However, when the same SoC runs Linux at EL2, Linux itself must perform the > unmapping to avoid such issues. It is still correct to apply this mapping/ > unmapping sequence even for SoCs that run under Gunyah, so this behavior > should not be conditional. > > Signed-off-by: Mukesh Ojha > --- Reviewed-by: Konrad Dybcio Konrad