Thread (29 messages) 29 messages, 8 authors, 2025-09-12

Re: [PATCH 0/2] Add support for Gunyah Watchdog

From: Konrad Dybcio <hidden>
Date: 2025-09-12 11:16:57
Also in: linux-arm-msm, linux-watchdog, lkml

On 9/8/25 7:49 AM, Pavan Kondeti wrote:
On Fri, Sep 05, 2025 at 12:18:06PM +0200, Konrad Dybcio wrote:
quoted
On 9/5/25 2:00 AM, Pavan Kondeti wrote:
quoted
On Thu, Sep 04, 2025 at 05:51:24PM -0500, Rob Herring wrote:
quoted
quoted
quoted
Why can't you probe by trying to see if watchdog smc call succeeds to
see if there is a watchdog? Then you don't need DT for it.
There apparently isn't a good way to tell from a running system whether
Gunyah is present, unless you make a smc call (which could in theory be
parsed by something else, say a different hypervisor..), but then this
patch only introduces the watchdog interface, without all the cruft that
would actually let us identify the hypervisor, get its version ID and
perform sanity checks..
IIRC, last time we got just a gunyah node. Now it's that plus a
watchdog. What's next? I'm not really a fan of $soc_vendor hypervisor
interfaces. I doubt anyone else is either. We have all sorts of
standard interfaces already between virtio, vfio, EFI, SCMI, PSCI,
etc. Can we please not abuse DT with $soc_vendor hypervisor devices.
We are trying to make the watchdog work with existing SoCs, so we are
sticking with the existing interfaces. The newer devices will not
necessarily need DT to probe hypervisor interfaces.

To answer your question on why can't you probe watchdog smc call to see
if there is a watchdog. Yes, we can do that. It is just that we won't be
able to support pre-timeout IRQ. This IRQ is optional for watchdog
functionality, so this is something we can explore.
FWIW Rob, we moved on to SBSA watchdog on newer Gunyah releases..
Which is not ideal as it's still over MMIO, but there's some
progress
Gunyah running in Latest SoCs do support SoC watchdog emulation, so
Linux does not need to worry about if it is running under Gunyah or bare
metal.
quoted
I'm not a fan of including the hypervisor in the picture, but as
Pavan said above, we're trying to squeeze the least amount of hacks
necessary to get the most out of existing platforms (i.e. ones which
will not get newer Gunyah).
Thanks for enumerating our goal here. we plan to support watchdog (hence
collecting dumps) on existing platform where Linux has only access to
this SMCC interface.
I think you didn't explain it clearly - do we need the wdog to bite to
enter crashdump at all on these platforms?
quoted
Perhaps we could extend the MSM KPSS watchdog driver (which pokes at
the physical watchdog on the SoC and whose DT node represents
"reality") and have it attempt to make the SMC call early during probe,
making way for both physical and virt configurations without additional
dt alterations..
We have to be careful here. I am told that SMCC interface might not fail
even when Gunyah is emulating SoC watchdog. We can do something like
this.
"not failling when gunyah is emulating the watchdog" is sort of what we
want, no? Unless you meant that if MMIO access is allowed, the SMC
interface may still report no errors, even though the calls don't
actually end up doing anything useful
If we don't find "qcom,kpss-wdt" compatible device, then we can add a
fallback to Gunyah based SMCC.
Matching on "not compatible" is tricky, especially since the arm64
kernel builds must support all platforms at once

Konrad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help