qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* spapr watchdog vs watchdog_perform_action() / QMP watchdog-set-action
@ 2024-01-26 15:23 Peter Maydell
  2024-01-26 20:49 ` Markus Armbruster
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2024-01-26 15:23 UTC (permalink / raw)
  To: QEMU Developers
  Cc: Nicholas Piggin, Daniel Henrique Barboza, Cédric Le Goater,
	David Gibson, Harsh Prateek Bora, qemu-ppc, Markus Armbruster,
	Paolo Bonzini

Hi; one of the "bitesized tasks" we have listed is to convert
watchdog timers which directly call qemu_system_reset_request() on
watchdog timeout to call watchdog_perform_action() instead. This
means they honour the QMP commands that let the user specifiy
the behaviour on watchdog expiry:
https://www.qemu.org/docs/master/interop/qemu-qmp-ref.html#qapidoc-141
https://www.qemu.org/docs/master/interop/qemu-qmp-ref.html#qapidoc-129
(choices include reset, power off the system, do nothing, etc).

There are only a few remaining watchdogs that don't use the
watchdog_perform_action() function. In most cases the change
is obvious and easy: just make them do that instead of calling
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET).

However, the hw/watchdog/spapr_watchdog.c case is trickier. As
far as I can tell from the sources, this is a watchdog set up via
a hypercall, and the guest makes a choice of "power off, restart,
or dump and restart" for its on-expiry action.

What should this watchdog's interaction with the watchdog-set-action
QMP command be? If the user says "do X" and the guest says "do Y",
which do we do? (With the current code, we always honour what
the guest asks for and ignore what the user asks for.)

(The bitesized task for watchdog_perform_action() is
https://gitlab.com/qemu-project/qemu/-/issues/2124 . For the
purposes of this email thread I'm only after a concrete decision
about what we think the right thing is, not for any code. Then
I can write that up in the bug for potential new contributors.)

thanks
-- PMM


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

end of thread, other threads:[~2024-02-22 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 15:23 spapr watchdog vs watchdog_perform_action() / QMP watchdog-set-action Peter Maydell
2024-01-26 20:49 ` Markus Armbruster
2024-01-27 13:08   ` Peter Maydell
2024-01-29  3:58     ` David Gibson
2024-02-22 14:47       ` Peter Maydell

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