* [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; 6+ 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] 6+ 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; 6+ 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] 6+ 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
2026-11-18 12:55 ` Mukesh Ojha
0 siblings, 1 reply; 6+ 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] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
2026-11-18 11:05 ` Vishnu Santhosh
@ 2026-11-18 12:55 ` Mukesh Ojha
2026-11-20 9:36 ` Vishnu Santhosh
0 siblings, 1 reply; 6+ messages in thread
From: Mukesh Ojha @ 2026-11-18 12:55 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 Wed, Nov 18, 2026 at 04:35:55PM +0530, Vishnu Santhosh wrote:
>
> 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.
Thats not explained in this commit, why this issue not seen under
Gunyah ?
--
-Mukesh Ojha
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
2026-11-18 12:55 ` Mukesh Ojha
@ 2026-11-20 9:36 ` Vishnu Santhosh
2026-11-20 10:26 ` Mukesh Ojha
0 siblings, 1 reply; 6+ messages in thread
From: Vishnu Santhosh @ 2026-11-20 9:36 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 18-11-2026 06:25 pm, Mukesh Ojha wrote:
> On Wed, Nov 18, 2026 at 04:35:55PM +0530, Vishnu Santhosh wrote:
>> 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.
> Thats not explained in this commit, why this issue not seen under
> Gunyah ?
Under Gunyah, Linux runs at EL1 and Gunyah maps this region as Device
memory at stage-2. The stricter stage-2 type applies, so the
write-combined mapping from the SRAM driver has no effect.
With KVM, Linux runs at EL2 (VHE) and there is no stage-2, so the
write-combined mapping takes effect and speculative reads reach the
protected regions.
The region is expected to be mapped non-write-combined regardless of
the exception level, so I kept the commit message to that. I can add
the EL2 detail in v2 if you prefer.
Vishnu
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] arm64: dts: qcom: shikra: Mark RPM message RAM as no-memory-wc
2026-11-20 9:36 ` Vishnu Santhosh
@ 2026-11-20 10:26 ` Mukesh Ojha
0 siblings, 0 replies; 6+ messages in thread
From: Mukesh Ojha @ 2026-11-20 10:26 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 Fri, Nov 20, 2026 at 03:06:50PM +0530, Vishnu Santhosh wrote:
>
> On 18-11-2026 06:25 pm, Mukesh Ojha wrote:
> > On Wed, Nov 18, 2026 at 04:35:55PM +0530, Vishnu Santhosh wrote:
> > > 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.
> > Thats not explained in this commit, why this issue not seen under
> > Gunyah ?
>
> Under Gunyah, Linux runs at EL1 and Gunyah maps this region as Device
> memory at stage-2. The stricter stage-2 type applies, so the
> write-combined mapping from the SRAM driver has no effect.
>
> With KVM, Linux runs at EL2 (VHE) and there is no stage-2, so the
> write-combined mapping takes effect and speculative reads reach the
> protected regions.
>
> The region is expected to be mapped non-write-combined regardless of
> the exception level, so I kept the commit message to that. I can add
> the EL2 detail in v2 if you prefer.
Thank you! Please add this in the commit text. Also, I think this is
applicable to all such Qcom SoCs.
>
> Vishnu
>
> >
> >
--
-Mukesh Ojha
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-20 10:27 UTC | newest]
Thread overview: 6+ 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
2026-11-18 12:55 ` Mukesh Ojha
2026-11-20 9:36 ` Vishnu Santhosh
2026-11-20 10:26 ` Mukesh Ojha
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®