Skip to content

Qcom 6.18.y: remoteproc: qcom: pas: Map/unmap subsystem region before auth_and_reset#386

Open
mukeshojha-linux wants to merge 3 commits intoqualcomm-linux:qcom-6.18.yfrom
mukeshojha-linux:qcom-6.18.y
Open

Qcom 6.18.y: remoteproc: qcom: pas: Map/unmap subsystem region before auth_and_reset#386
mukeshojha-linux wants to merge 3 commits intoqualcomm-linux:qcom-6.18.yfrom
mukeshojha-linux:qcom-6.18.y

Conversation

DTB PAS context creation should be done only for subsystems that support
a DTB firmware binary; otherwise, memory is wasted. Move the context
creation to the appropriate location and, while at it, fix the place
where the DTB PAS context was being released unconditionally.

Link: https://lore.kernel.org/lkml/20260325191301.164579-1-mukesh.ojha@oss.qualcomm.com/
Fixes: b13d8ba ("remoteproc: pas: Replace metadata context with PAS context structure")
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
…th_and_reset

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.

Link: https://lore.kernel.org/lkml/20260325191301.164579-2-mukesh.ojha@oss.qualcomm.com/
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
dtb_mem_region is no longer referenced after the ioremap was moved
to respective places where mapping is required. Remove it from
struct qcom_pas.

Link: https://lore.kernel.org/lkml/20260325191301.164579-3-mukesh.ojha@oss.qualcomm.com/
Signed-off-by: Mukesh Ojha <mukesh.ojha@oss.qualcomm.com>
@mukeshojha-linux mukeshojha-linux requested a review from a team March 26, 2026 15:40
@qcomlnxci
Copy link

Test Matrix

Test Case lemans-evk monaco-evk qcs615-ride qcs6490-rb3gen2 qcs8300-ride qcs9100-ride-r3 sm8750-mtp
0_qcom-next-ci-premerge-tests ◻️ ◻️ ◻️ ◻️ ◻️ ◻️ ❌ Fail
BT_FW_KMD_Service ❌ Fail ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail
BT_ON_OFF ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ⚠️ skip
BT_SCAN ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
CPUFreq_Validation ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
CPU_affinity ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
DSP_AudioPD ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
Ethernet ✅ Pass ◻️ ⚠️ skip ⚠️ skip ⚠️ skip ◻️ ⚠️ skip
Freq_Scaling ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail
GIC ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
IPA ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
Interrupts ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
OpenCV ⚠️ skip ◻️ ⚠️ skip ⚠️ skip ⚠️ skip ◻️ ◻️
PCIe ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
Probe_Failure_Check ❌ Fail ◻️ ✅ Pass ❌ Fail ❌ Fail ◻️ ❌ Fail
RMNET ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
UFS_Validation ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
USBHost ✅ Pass ◻️ ✅ Pass ❌ Fail ✅ Pass ◻️ ❌ Fail
WiFi_Firmware_Driver ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
WiFi_OnOff ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
cdsp_remoteproc ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ❌ Fail
hotplug ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
irq ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
kaslr ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
pinctrl ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
qcom_hwrng ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
remoteproc ✅ Pass ◻️ ✅ Pass ✅ Pass ❌ Fail ◻️ ❌ Fail
rngtest ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
shmbridge ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
smmu ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass
watchdog ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ◻️
wpss_remoteproc ✅ Pass ◻️ ✅ Pass ✅ Pass ✅ Pass ◻️ ✅ Pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants