qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
To: qemu-devel@nongnu.org
Cc: david.edmondson@oracle.com, pbonzini@redhat.com,
	mihai.carabas@oracle.com
Subject: [PATCH v3 0/4] Add a new -action parameter
Date: Fri, 11 Dec 2020 11:52:40 -0500	[thread overview]
Message-ID: <1607705564-26264-1-git-send-email-alejandro.j.jimenez@oracle.com> (raw)

v3:
- Replaced the no_reboot and no_shutdown internal flags with enumerations that hold the current action
selected in case of reboot or shutdown events. The same approach is used for panic and watchdog events.
- Ensured that -no-shutdown option overrides any previously issued action panic=poweroff setting.
- Added TODO comment to add more panic actions if viable (debug, reset).
- Modified QMP command to take multiple optional args specifying actions for each event type,
and added 'allow-preconfig': true

v2:
- Replaced the individual qmp commands in patch 3/4 for a generic set-action
command that takes a RunStateAction parameter, specifying an event|action pair.
- Removed qmp_ prefix from X_set_action() functions in runstate-action.c

***

This is a follow up to the proposal to add a "-no-panicstop" option to QEMU that would allow us to
control whether the VM is paused or allowed to continue running without intervention from a management layer
when a guest panic occurs. See the inital thread and replies for details:

https://lore.kernel.org/qemu-devel/1601606494-1154-1-git-send-email-alejandro.j.jimenez@oracle.com/

From that discussion came a request for a generic mechanism to group options like -no-shutdown, -no-reboot, etc,
that specify an action taken by QEMU in response to a guest event (reboot, shutdown, panic, and watchdog
expiration are the current options). The existing options would translate to the new option, like:

* -no-reboot --> "-action reboot=shutdown"
* -no-shutdown --> "-action shutdown=pause"

Please share any questions or comments.

Regards,
Alejandro

Alejandro Jimenez (4):
  vl: Add an -action option to respond to guest events
  vl: Add option to avoid stopping VM upon guest panic
  qmp: Allow setting -action parameters on the fly
  qtest/pvpanic: Test panic option that allows VM to continue

 MAINTAINERS                      |   2 +
 include/sysemu/runstate-action.h |  22 ++++++
 include/sysemu/sysemu.h          |   1 -
 monitor/qmp-cmds.c               |   3 +-
 qapi/run-state.json              | 149 +++++++++++++++++++++++++++++++++++++++
 qemu-options.hx                  |  25 +++++++
 softmmu/meson.build              |   1 +
 softmmu/runstate-action.c        | 142 +++++++++++++++++++++++++++++++++++++
 softmmu/vl.c                     |  64 ++++++++++++++---
 tests/qtest/pvpanic-test.c       |  26 ++++++-
 ui/sdl2.c                        |   5 +-
 11 files changed, 424 insertions(+), 16 deletions(-)
 create mode 100644 include/sysemu/runstate-action.h
 create mode 100644 softmmu/runstate-action.c

-- 
1.8.3.1



             reply	other threads:[~2020-12-11 17:01 UTC|newest]

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

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=1607705564-26264-1-git-send-email-alejandro.j.jimenez@oracle.com \
    --to=alejandro.j.jimenez@oracle.com \
    --cc=david.edmondson@oracle.com \
    --cc=mihai.carabas@oracle.com \
    --cc=pbonzini@redhat.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).