* [PATCH v2 0/3] arm64: dts: qcom: Mark RPM message RAM as no-memory-wc
@ 2026-11-23 6:18 Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 1/3] arm64: dts: qcom: shikra: " Vishnu Santhosh
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Vishnu Santhosh @ 2026-11-23 6:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Konrad Dybcio, Mukesh Ojha, Kumar Patro,
linux-arm-msm, devicetree, linux-kernel, Vishnu Santhosh
The RPM message RAM is shared with other subsystems, and parts of it
are not accessible to the APSS. On SoCs where it is described with the
"mmio-sram" compatible, the SRAM driver maps it as write-combined
(Normal Non-cacheable) memory. This allows speculative reads into the
protected parts, which results in XPU violations when Linux runs at
EL2 (KVM with VHE), where there is no stage-2 translation. When Linux
runs at EL1 under Gunyah, Gunyah maps the region as Device memory at
stage-2, and the stricter stage-2 memory type hides the issue.
Mark the region as no-memory-wc on the SoCs that describe it with
"mmio-sram": Shikra, Agatti and SM6375. The XPU violations were
observed on Shikra.
A similar issue was fixed for the Tegra SYSRAM in commit 61192a9d8a63
("arm64: tegra: Mark BPMP channels as no-memory-wc"):
https://lore.kernel.org/all/20220622132300.1746201-2-cyndis@kapsi.fi/
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
---
Changes in v2:
- Explain in the Shikra commit text why the issue is seen at EL2 and
not under Gunyah (Mukesh)
- Add the same fix for Agatti and SM6375 (Mukesh)
- Link to v1: https://lore.kernel.org/r/20261117-rpm-memory-non-wc-v1-1-e246fc6bc66c@oss.qualcomm.com
---
Vishnu Santhosh (3):
arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
arm64: dts: qcom: agatti: Mark RPM message RAM as no-memory-wc
arm64: dts: qcom: sm6375: Mark RPM message RAM as no-memory-wc
arch/arm64/boot/dts/qcom/agatti.dtsi | 3 +++
arch/arm64/boot/dts/qcom/shikra.dtsi | 2 ++
arch/arm64/boot/dts/qcom/sm6375.dtsi | 3 +++
3 files changed, 8 insertions(+)
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261117-rpm-memory-non-wc-c93a6ff3e432
Best regards,
--
Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 [PATCH v2 0/3] arm64: dts: qcom: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
@ 2026-11-23 6:18 ` Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
2026-11-23 6:18 ` [PATCH v2 2/3] arm64: dts: qcom: agatti: " Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375: " Vishnu Santhosh
2 siblings, 1 reply; 7+ messages in thread
From: Vishnu Santhosh @ 2026-11-23 6:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Konrad Dybcio, Mukesh Ojha, Kumar Patro,
linux-arm-msm, devicetree, linux-kernel, Vishnu Santhosh
The RPM message RAM is shared with other subsystems, and parts of it
are not accessible to the APSS. It is expected to be mapped as Device
memory.
The "mmio-sram" compatible makes the SRAM driver map the region as
write-combined (Normal Non-cacheable) memory instead, which allows
speculative reads into the protected parts and results in XPU
violations.
The violations are seen when Linux runs at EL2 (KVM with VHE), where
there is no stage-2 translation and the write-combined mapping takes
effect. When Linux runs at EL1 under Gunyah, Gunyah maps this region
as Device memory at stage-2, and the stricter stage-2 memory type
applies.
Add no-memory-wc so the region is mapped as Device memory.
Fixes: 66664b5701da ("arm64: dts: qcom: Introduce Shikra SoC base dtsi")
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/shikra.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
index 2623e139196f6398c57b616879a37f84b83d59ac..597aaf490519e605d50e24c090bbfb1e47b1f28c 100644
--- a/arch/arm64/boot/dts/qcom/shikra.dtsi
+++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
@@ -1347,6 +1347,8 @@ rpm_msg_ram: sram@45f0000 {
compatible = "qcom,rpm-msg-ram", "mmio-sram";
reg = <0x0 0x045f0000 0x0 0x7000>;
+ no-memory-wc;
+
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x0 0x045f0000 0x7000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] arm64: dts: qcom: agatti: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 [PATCH v2 0/3] arm64: dts: qcom: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 1/3] arm64: dts: qcom: shikra: " Vishnu Santhosh
@ 2026-11-23 6:18 ` Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
2026-11-23 6:18 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375: " Vishnu Santhosh
2 siblings, 1 reply; 7+ messages in thread
From: Vishnu Santhosh @ 2026-11-23 6:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Konrad Dybcio, Mukesh Ojha, Kumar Patro,
linux-arm-msm, devicetree, linux-kernel, Vishnu Santhosh
The RPM message RAM is shared with other subsystems, and parts of it
are not accessible to the APSS. It is expected to be mapped as Device
memory.
The "mmio-sram" compatible makes the SRAM driver map the region as
write-combined (Normal Non-cacheable) memory instead, which allows
speculative reads into the protected parts.
When Linux runs at EL2 (KVM with VHE), there is no stage-2 translation
and the write-combined mapping takes effect, so such reads can result
in XPU violations. When Linux runs at EL1 under a hypervisor such as
Gunyah, a Device mapping of the region at stage-2 hides the issue, as
the stricter memory type applies.
Add no-memory-wc so the region is mapped as Device memory.
Fixes: e3f6a6994041 ("arm64: dts: qcom: qcm2290: Hook up MPM")
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/agatti.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/agatti.dtsi b/arch/arm64/boot/dts/qcom/agatti.dtsi
index d9f4cbfd2861cdc3d9d48d6b5e7d3b7a3206970b..54499f96e88f4dfc2639ea19a6edd692684eec5c 100644
--- a/arch/arm64/boot/dts/qcom/agatti.dtsi
+++ b/arch/arm64/boot/dts/qcom/agatti.dtsi
@@ -1025,6 +1025,9 @@ bimc: interconnect@4480000 {
rpm_msg_ram: sram@45f0000 {
compatible = "qcom,rpm-msg-ram", "mmio-sram";
reg = <0x0 0x045f0000 0x0 0x7000>;
+
+ no-memory-wc;
+
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x0 0x045f0000 0x7000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] arm64: dts: qcom: sm6375: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 [PATCH v2 0/3] arm64: dts: qcom: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 1/3] arm64: dts: qcom: shikra: " Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 2/3] arm64: dts: qcom: agatti: " Vishnu Santhosh
@ 2026-11-23 6:18 ` Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
2 siblings, 1 reply; 7+ messages in thread
From: Vishnu Santhosh @ 2026-11-23 6:18 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Konrad Dybcio, Mukesh Ojha, Kumar Patro,
linux-arm-msm, devicetree, linux-kernel, Vishnu Santhosh
The RPM message RAM is shared with other subsystems, and parts of it
are not accessible to the APSS. It is expected to be mapped as Device
memory.
The "mmio-sram" compatible makes the SRAM driver map the region as
write-combined (Normal Non-cacheable) memory instead, which allows
speculative reads into the protected parts.
When Linux runs at EL2 (KVM with VHE), there is no stage-2 translation
and the write-combined mapping takes effect, so such reads can result
in XPU violations. When Linux runs at EL1 under a hypervisor such as
Gunyah, a Device mapping of the region at stage-2 hides the issue, as
the stricter memory type applies.
Add no-memory-wc so the region is mapped as Device memory.
Fixes: d3246a0cf43f ("arm64: dts: qcom: sm6375: Hook up MPM")
Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/sm6375.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 71a22859709398c969bedae3e0b931f664cdac97..fa66a34c0fe284579f728266e826fc22d8cb3438 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -1021,6 +1021,9 @@ tsens1: thermal-sensor@4413000 {
rpm_msg_ram: sram@45f0000 {
compatible = "qcom,rpm-msg-ram", "mmio-sram";
reg = <0 0x045f0000 0 0x7000>;
+
+ no-memory-wc;
+
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x0 0x045f0000 0x7000>;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 ` [PATCH v2 1/3] arm64: dts: qcom: shikra: " Vishnu Santhosh
@ 2026-11-23 15:23 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-11-23 15:23 UTC (permalink / raw)
To: Vishnu Santhosh, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Raviteja Laggyshetty,
Imran Shaik, Xueyao An, Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Mukesh Ojha, Kumar Patro, linux-arm-msm,
devicetree, linux-kernel
On 11/23/26 7:18 AM, Vishnu Santhosh wrote:
> The RPM message RAM is shared with other subsystems, and parts of it
> are not accessible to the APSS. It is expected to be mapped as Device
> memory.
>
> The "mmio-sram" compatible makes the SRAM driver map the region as
> write-combined (Normal Non-cacheable) memory instead, which allows
> speculative reads into the protected parts and results in XPU
> violations.
>
> The violations are seen when Linux runs at EL2 (KVM with VHE), where
> there is no stage-2 translation and the write-combined mapping takes
> effect. When Linux runs at EL1 under Gunyah, Gunyah maps this region
> as Device memory at stage-2, and the stricter stage-2 memory type
> applies.
>
> Add no-memory-wc so the region is mapped as Device memory.
>
> Fixes: 66664b5701da ("arm64: dts: qcom: Introduce Shikra SoC base dtsi")
> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] arm64: dts: qcom: agatti: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 ` [PATCH v2 2/3] arm64: dts: qcom: agatti: " Vishnu Santhosh
@ 2026-11-23 15:23 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-11-23 15:23 UTC (permalink / raw)
To: Vishnu Santhosh, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Raviteja Laggyshetty,
Imran Shaik, Xueyao An, Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Mukesh Ojha, Kumar Patro, linux-arm-msm,
devicetree, linux-kernel
On 11/23/26 7:18 AM, Vishnu Santhosh wrote:
> The RPM message RAM is shared with other subsystems, and parts of it
> are not accessible to the APSS. It is expected to be mapped as Device
> memory.
>
> The "mmio-sram" compatible makes the SRAM driver map the region as
> write-combined (Normal Non-cacheable) memory instead, which allows
> speculative reads into the protected parts.
>
> When Linux runs at EL2 (KVM with VHE), there is no stage-2 translation
> and the write-combined mapping takes effect, so such reads can result
> in XPU violations. When Linux runs at EL1 under a hypervisor such as
> Gunyah, a Device mapping of the region at stage-2 hides the issue, as
> the stricter memory type applies.
>
> Add no-memory-wc so the region is mapped as Device memory.
>
> Fixes: e3f6a6994041 ("arm64: dts: qcom: qcm2290: Hook up MPM")
> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 3/3] arm64: dts: qcom: sm6375: Mark RPM message RAM as no-memory-wc
2026-11-23 6:18 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375: " Vishnu Santhosh
@ 2026-11-23 15:23 ` Konrad Dybcio
0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-11-23 15:23 UTC (permalink / raw)
To: Vishnu Santhosh, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Raviteja Laggyshetty,
Imran Shaik, Xueyao An, Sneh Mankad, Monish Chunara, Abel Vesa
Cc: Komal Bajaj, Rakesh Kota, Mukesh Ojha, Kumar Patro, linux-arm-msm,
devicetree, linux-kernel
On 11/23/26 7:18 AM, Vishnu Santhosh wrote:
> The RPM message RAM is shared with other subsystems, and parts of it
> are not accessible to the APSS. It is expected to be mapped as Device
> memory.
>
> The "mmio-sram" compatible makes the SRAM driver map the region as
> write-combined (Normal Non-cacheable) memory instead, which allows
> speculative reads into the protected parts.
>
> When Linux runs at EL2 (KVM with VHE), there is no stage-2 translation
> and the write-combined mapping takes effect, so such reads can result
> in XPU violations. When Linux runs at EL1 under a hypervisor such as
> Gunyah, a Device mapping of the region at stage-2 hides the issue, as
> the stricter memory type applies.
>
> Add no-memory-wc so the region is mapped as Device memory.
>
> Fixes: d3246a0cf43f ("arm64: dts: qcom: sm6375: Hook up MPM")
> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-23 15:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 6:18 [PATCH v2 0/3] arm64: dts: qcom: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
2026-11-23 6:18 ` [PATCH v2 1/3] arm64: dts: qcom: shikra: " Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
2026-11-23 6:18 ` [PATCH v2 2/3] arm64: dts: qcom: agatti: " Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
2026-11-23 6:18 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375: " Vishnu Santhosh
2026-11-23 15:23 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox