mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
@ 2026-11-17  8:05 Vishnu Santhosh
  2026-11-17 16:19 ` Mukesh Ojha
  0 siblings, 1 reply; 3+ messages in thread
From: Vishnu Santhosh @ 2026-11-17  8:05 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
	Sneh Mankad, Monish Chunara
  Cc: Komal Bajaj, Rakesh Kota, Konrad Dybcio, linux-arm-msm,
	devicetree, linux-kernel, bibek.patro, 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.

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>
---
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/
---
 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>;

---
base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
change-id: 20261117-rpm-memory-non-wc-c93a6ff3e432

Best regards,
-- 
Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
  2026-11-17  8:05 [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
@ 2026-11-17 16:19 ` Mukesh Ojha
  2026-11-18 11:05   ` Vishnu Santhosh
  0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Ojha @ 2026-11-17 16:19 UTC (permalink / raw)
  To: Vishnu Santhosh
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
	Sneh Mankad, Monish Chunara, Komal Bajaj, Rakesh Kota,
	Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
	bibek.patro

On Tue, Nov 17, 2026 at 01:35:50PM +0530, 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.
> 
> 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>

Why only for 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/
> ---
>  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>;
> 
> ---
> base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
> change-id: 20261117-rpm-memory-non-wc-c93a6ff3e432
> 
> Best regards,
> -- 
> Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> 

-- 
-Mukesh Ojha

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
  2026-11-17 16:19 ` Mukesh Ojha
@ 2026-11-18 11:05   ` Vishnu Santhosh
  0 siblings, 0 replies; 3+ messages in thread
From: Vishnu Santhosh @ 2026-11-18 11:05 UTC (permalink / raw)
  To: Mukesh Ojha
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Raviteja Laggyshetty, Imran Shaik, Xueyao An,
	Sneh Mankad, Monish Chunara, Komal Bajaj, Rakesh Kota,
	Konrad Dybcio, linux-arm-msm, devicetree, linux-kernel,
	bibek.patro


On 17-11-2026 09:49 pm, Mukesh Ojha wrote:
> On Tue, Nov 17, 2026 at 01:35:50PM +0530, 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.
>>
>> 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>
> Why only for Shikra ?

This XPU violation was seen only on Shikra, and only with Linux
running at EL2 (KVM). It is not seen on Shikra when Linux runs at
EL1 under Gunyah. So, I kept the change to Shikra.

Thanks,
Vishnu

>
>> ---
>> 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/
>> ---
>>   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>;
>>
>> ---
>> base-commit: 666539eecdf4db623f5e3c3e55cf9f2dfad24aa4
>> change-id: 20261117-rpm-memory-non-wc-c93a6ff3e432
>>
>> Best regards,
>> -- 
>> Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-18 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-17  8:05 [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc Vishnu Santhosh
2026-11-17 16:19 ` Mukesh Ojha
2026-11-18 11:05   ` Vishnu Santhosh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®