devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Rob Herring <robh@kernel.org>,
	Hrishabh Rajput <hrishabh.rajput@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-watchdog@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] Add support for Gunyah Watchdog
Date: Thu, 4 Sep 2025 13:31:34 +0200	[thread overview]
Message-ID: <a547ecce-31c7-4627-ac6f-aeeef81bd0ff@oss.qualcomm.com> (raw)
In-Reply-To: <20250904001014.GA3405605-robh@kernel.org>

On 9/4/25 2:10 AM, Rob Herring wrote:
> On Wed, Sep 03, 2025 at 07:33:58PM +0000, Hrishabh Rajput wrote:
>> Gunyah is a Type-I hypervisor which was introduced in the patch series
>> [1]. It is an open source hypervisor. The source repo is available at
>> [2].
>>
>> The Gunyah Hypervisor doesn't allow its Virtual Machines to directly
>> access the MMIO watchdog. It either provides the fully emulated MMIO
>> based watchdog interface or the SMC-based watchdog interface depending
>> on the hypervisor configuration.
> 
> EFI provides a standard watchdog interface. Why can't you use that?

The use of UEFI at Qualcomm is not exactly what you would expect..

> 
>> The SMC-based watchdog follows ARM's SMC Calling Convention (SMCCC)
>> version 1.1 and uses Vendor Specific Hypervisor Service Calls space.
> 
> Is a watchdog really a hypervisor service? Couldn't a non-virtualized 
> OS want to call a watchdog (in secure mode) as well? But I don't know 
> how the SMCCC call space is divided up...

Gunyah traps SMC calls and acts on a subset of them, passing others
to TZ

>> This patch series adds support for the SMC-based watchdog interface
>> provided by the Gunyah Hypervisor. The driver supports start/stop
>> operations, timeout and pretimeout configuration, pretimeout interrupt
>> handling and system restart via watchdog.
> 
> Shouldn't system restart be handled by PSCI?

I believe the author is trying to say that the watchdog is not
configurable from Linux at present, and if the platform hangs, there
are some indeterminate default settings in place

> 
> 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..

I would expect that Gunyah has the necessary provisions to inject its
nodes as necessary, at least I recall there was some talk of it in
early revisions of Elliot's aforementioned patches:

https://lore.kernel.org/all/20220811214107.1074343-4-quic_eberman@quicinc.com/

Konrad

  reply	other threads:[~2025-09-04 11:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 19:33 [PATCH 0/2] Add support for Gunyah Watchdog Hrishabh Rajput via B4 Relay
2025-09-03 19:33 ` [PATCH 1/2] dt-bindings: Add binding for gunyah watchdog Hrishabh Rajput via B4 Relay
2025-09-03 23:27   ` Rob Herring (Arm)
2025-09-04  9:52   ` Krzysztof Kozlowski
2025-09-04 10:16     ` Pavan Kondeti
2025-09-04 10:49       ` Krzysztof Kozlowski
2025-09-04 10:59         ` Krzysztof Kozlowski
2025-09-04 12:29           ` Pavan Kondeti
2025-09-04 13:07     ` Hrishabh Rajput
2025-09-04 13:17       ` Krzysztof Kozlowski
2025-09-04 19:03         ` Hrishabh Rajput
2025-09-03 19:34 ` [PATCH 2/2] watchdog: Add driver for Gunyah Watchdog Hrishabh Rajput via B4 Relay
2025-09-03 20:13   ` Bjorn Andersson
2025-09-04 11:40     ` Hrishabh Rajput
2025-09-04 13:47       ` Bjorn Andersson
2025-09-04 17:11   ` Pavan Kondeti
2025-09-05  9:19     ` Konrad Dybcio
2025-09-04  0:10 ` [PATCH 0/2] Add support " Rob Herring
2025-09-04 11:31   ` Konrad Dybcio [this message]
2025-09-04 22:51     ` Rob Herring
2025-09-05  0:00       ` Pavan Kondeti
2025-09-05 10:18         ` Konrad Dybcio
2025-09-08  5:49           ` Pavan Kondeti
2025-09-12 11:16             ` Konrad Dybcio
2025-09-04 14:39   ` Hrishabh Rajput
2025-09-04  7:13 ` Neil Armstrong
2025-09-04  9:18   ` Pavan Kondeti
2025-09-04 13:53     ` Bjorn Andersson
2025-09-04 17:05       ` Pavan Kondeti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a547ecce-31c7-4627-ac6f-aeeef81bd0ff@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hrishabh.rajput@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh@kernel.org \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).