From: Peter Maydell <peter.maydell@linaro.org>
To: Abhiram Tilak <atp.exp@gmail.com>
Cc: qemu-devel@nongnu.org, clg@kaod.org, david@gibson.dropbear.id.au,
harshpb@linux.ibm.com
Subject: Re: [PATCH 1/3] misc: m48t59: replace qemu_system_reset_request() call with watchdog_perform_action()
Date: Fri, 16 Feb 2024 14:49:37 +0000 [thread overview]
Message-ID: <CAFEAcA_D+rJys-YP3W3UkGM+RFkv+GsrXymqUDGEgOdSu+KKMg@mail.gmail.com> (raw)
In-Reply-To: <20240216135137.8668-4-atp.exp@gmail.com>
On Fri, 16 Feb 2024 at 13:56, Abhiram Tilak <atp.exp@gmail.com> wrote:
>
> A few watchdog devices use qemu_system_reset_request(). This is not ideal since
> behaviour of watchdog-expiry can't be changed by QMP using `watchdog_action`.
> As stated in BiteSizedTasks wiki page, instead of using qemu_system_reset_request()
> to reset when a watchdog timer expires, let watchdog_perform_action() decide
> what to do.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2124
> Signed-off-by: Abhiram Tilak <atp.exp@gmail.com>
> ---
> hw/rtc/m48t59.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c
> index aa44c4b20c..ebda084478 100644
> --- a/hw/rtc/m48t59.c
> +++ b/hw/rtc/m48t59.c
> @@ -36,6 +36,7 @@
> #include "qemu/bcd.h"
> #include "qemu/module.h"
> #include "trace.h"
> +#include "sysemu/watchdog.h"
>
> #include "m48t59-internal.h"
> #include "migration/vmstate.h"
> @@ -163,8 +164,7 @@ static void watchdog_cb (void *opaque)
> if (NVRAM->buffer[0x1FF7] & 0x80) {
> NVRAM->buffer[0x1FF7] = 0x00;
> NVRAM->buffer[0x1FFC] &= ~0x40;
> - /* May it be a hw CPU Reset instead ? */
> - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
> + watchdog_perform_action(); /* watchdog-expired action */
> } else {
I don't think we need the comment, it's clear enough from the
name of the function.
Otherwise
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
thanks
-- PMM
next prev parent reply other threads:[~2024-02-16 14:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 13:51 [PATCH 0/3] Misc: Make watchdog devices using qemu_system_reset_request() use watchdog_perfom_action() Abhiram Tilak
2024-02-16 13:51 ` [PATCH 1/3] misc: m48t59: replace qemu_system_reset_request() call with watchdog_perform_action() Abhiram Tilak
2024-02-16 14:49 ` Peter Maydell [this message]
2024-02-16 18:27 ` atp exp
2024-02-16 13:51 ` [PATCH 2/3] misc: pxa2xx_timer: " Abhiram Tilak
2024-02-16 14:50 ` Peter Maydell
2024-02-16 13:51 ` [PATCH 3/3] misc: ppc/spapr: replace qemu_system_reset_request() calls " Abhiram Tilak
2024-02-16 14:54 ` Peter Maydell
2024-02-16 18:03 ` atp exp
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=CAFEAcA_D+rJys-YP3W3UkGM+RFkv+GsrXymqUDGEgOdSu+KKMg@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=atp.exp@gmail.com \
--cc=clg@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=harshpb@linux.ibm.com \
--cc=qemu-devel@nongnu.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).