qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>,
	qemu-devel@nongnu.org
Cc: david.edmondson@oracle.com
Subject: Re: [PATCH v2 2/4] vl: Add option to avoid stopping VM upon guest panic
Date: Thu, 10 Dec 2020 03:43:18 +0100	[thread overview]
Message-ID: <2441c06b-82b0-5b27-39fb-ee4889346049@redhat.com> (raw)
In-Reply-To: <1607536336-24701-3-git-send-email-alejandro.j.jimenez@oracle.com>

On 09/12/20 18:52, Alejandro Jimenez wrote:
> -    vm_stop(RUN_STATE_GUEST_PANICKED);
> +
> +    if (pause_on_panic) {
> +        qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_PAUSE,
> +                                        !!info, info);
> +        vm_stop(RUN_STATE_GUEST_PANICKED);
> +    } else {
> +        qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_RUN,
> +                                        !!info, info);
> +    }
> +
>       if (!no_shutdown) {
>           qapi_event_send_guest_panicked(GUEST_PANIC_ACTION_POWEROFF,
>                                          !!info, info);

The "if" below suggests making -action panic's argument a tri-state 
(none/pause/poweroff; default is poweroff and -no-shutdown becomes 
equivalent to -action shutdown=pause,panic=pause).

In principle debug and reset could be supported as well, so maybe add a 
TODO comment.

Paolo



  reply	other threads:[~2020-12-10  2:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 17:52 [PATCH v2 0/4] Add a new -action parameter Alejandro Jimenez
2020-12-09 17:52 ` [PATCH v2 1/4] vl: Add an -action option to respond to guest events Alejandro Jimenez
2020-12-09 21:44   ` Paolo Bonzini
2020-12-09 17:52 ` [PATCH v2 2/4] vl: Add option to avoid stopping VM upon guest panic Alejandro Jimenez
2020-12-10  2:43   ` Paolo Bonzini [this message]
2020-12-09 17:52 ` [PATCH v2 3/4] qmp: Allow setting -action parameters on the fly Alejandro Jimenez
2020-12-09 21:43   ` Paolo Bonzini
2020-12-10  3:21     ` Alejandro Jimenez
2020-12-10 18:00       ` Paolo Bonzini
2020-12-09 17:52 ` [PATCH v2 4/4] qtest/pvpanic: Test panic option that allows VM to continue Alejandro Jimenez

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=2441c06b-82b0-5b27-39fb-ee4889346049@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=alejandro.j.jimenez@oracle.com \
    --cc=david.edmondson@oracle.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).