qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: rjones@redhat.com, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts
Date: Wed, 27 May 2015 08:17:08 -0600	[thread overview]
Message-ID: <5565D1E4.7050607@redhat.com> (raw)
In-Reply-To: <1432732141-33915-1-git-send-email-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2853 bytes --]

On 05/27/2015 07:09 AM, Paolo Bonzini wrote:
> This makes it possible to specify a watchdog action in a configuration file.
> The previous behavior of "-watchdog" is moved to the (implied) "-watchdog
> model" suboption.  This is already more or less obsolete, since it is possible
> to achieve the same effect with "-device", but "-watchdog-action" does not have
> an equivalent.
> 
> One alternative implementation is possible, namely to add an "action"
> property to each watchdog device.  However, boards often have embedded
> watchdog devices; even if they currently don't, these should call
> watchdog_perform_action() so that they are affected by -watchdog-action.
> (This is listed in our BiteSizedTasks wiki page).
> 
> For these boards, "-watchdog action=foo" has two advantages:
> 
> 1) it is much easier to use than a "-global" option, and can be
> configured globally for all boards.
> 
> 2) it is harder to add a property to a device than it is to just
> s/qemu_system_reset_request/watchdog_perform_action/; in some cases,
> the devices are not even qdev-ified at all.  The chance of the conversion
> happening then would basically be zero if one had to add a property as
> a prerequisite.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 	tweak brackets in help messages [Eric]
> 	fix missing error message for -watchdog action [Richard]
> ---
>  docs/qdev-device-use.txt |  4 ++++
>  qemu-options.hx          | 37 +++++++++++++++--------------
>  vl.c                     | 61 +++++++++++++++++++++++++++++++++++-------------
>  3 files changed, 69 insertions(+), 33 deletions(-)

>  
>  DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \
> -    "-watchdog i6300esb|ib700\n" \
> -    "                enable virtual hardware watchdog [default=none]\n",
> +    "-watchdog [[model=]i6300esb|ib700]\n" \
> +    "          [,action=reset|shutdown|poweroff|pause|debug|none]\n" \
> +    "                enable virtual hardware watchdog (default: model=none,action=reset)\n",
> +    QEMU_ARCH_ALL)
> +DEF("watchdog-action", HAS_ARG, QEMU_OPTION_watchdog_action, \
> +    "-watchdog-action reset|shutdown|poweroff|pause|debug|none\n" \
> +    "                action when watchdog fires (default: reset)\n",
>      QEMU_ARCH_ALL)
>  STEXI
> -@item -watchdog @var{model}
> +@item -watchdog [[model=]@var{model}][,action=@var{action}]

Bikeshedding here:

Hmm - this says I can supply -watchdog with no arguments.  It also
implies that '-watchdog ,action=...' would work.  Maybe we split it into
two lines:

-watchdog [model=]@var{model}
-watchdog [[model=]@var{model},]action=@var{action}

But that gets more verbose than necessary.  I can live with it as-is.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  parent reply	other threads:[~2015-05-27 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 13:09 [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts Paolo Bonzini
2015-05-27 14:06 ` Richard W.M. Jones
2015-05-27 14:17 ` Eric Blake [this message]
2015-05-27 14:40   ` Paolo Bonzini
2015-06-03 13:14 ` Markus Armbruster
2015-06-03 13:40   ` Paolo Bonzini
2015-06-03 15:27     ` Markus Armbruster
2015-06-03 15:38       ` 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=5565D1E4.7050607@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    /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).