From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxaxA-0002CG-JZ for qemu-devel@nongnu.org; Wed, 27 May 2015 09:01:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxax6-0001Ev-6F for qemu-devel@nongnu.org; Wed, 27 May 2015 09:01:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxax5-0001Em-W2 for qemu-devel@nongnu.org; Wed, 27 May 2015 09:00:56 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4RD0ssd016397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 27 May 2015 09:00:55 -0400 Message-ID: <5565C005.4040705@redhat.com> Date: Wed, 27 May 2015 07:00:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432730126-33400-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1432730126-33400-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t4PHPrwRrIXWpgA1xroCDw5MBQbIDn3iX" Subject: Re: [Qemu-devel] [PATCH] watchdog: convert to QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: rjones@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --t4PHPrwRrIXWpgA1xroCDw5MBQbIDn3iX Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/27/2015 06:35 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) "-watchd= og > model" suboption. This is already more or less obsolete, since it is p= ossible > to achieve the same effect with "-device", but "-watchdog-action does n= ot have > an equivalent. >=20 > One alternative implementation is possible, namely to add an "action" > property to the 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= =2E > (This is listed in our BiteSizedTasks wiki page). >=20 > For these boards, "-watchdog action=3Dfoo" has two advantages: >=20 > 1) it is much easier to use than a "-global" option, and can be > configured globally for all boards. >=20 > 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 conversi= on > happening then would basically be zero if one had to add a property as > a prerequisite. >=20 > Signed-off-by: Paolo Bonzini > --- > docs/qdev-device-use.txt | 4 ++++ > qemu-options.hx | 36 ++++++++++++++-------------- > vl.c | 61 +++++++++++++++++++++++++++++++++++-----= -------- > 3 files changed, 68 insertions(+), 33 deletions(-) >=20 > +++ b/qemu-options.hx > @@ -3115,12 +3115,19 @@ when the shift value is high (how high depends = on the host machine). > ETEXI > =20 > DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \ > - "-watchdog i6300esb|ib700\n" \ > - " enable virtual hardware watchdog [default=3Dnone]= \n", > + "-watchdog [model=3D]i6300esb|ib700,action=3Dreset|shutdown|powero= ff|pause|debug|none\n" \ Should this be -watchdog [model=3D]i6300esb|ib700[,action=3D...none] to make it obvious that ,action=3D is optional for back-compat with old u= sage? > + " enable virtual hardware watchdog (default: model=3D= none,action=3Dreset)\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=3D]@var{model},action=3D@var{action} same here. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --t4PHPrwRrIXWpgA1xroCDw5MBQbIDn3iX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVZcAFAAoJEKeha0olJ0NqMBEIAJuf3bV/SEZNleekWy4E8am6 PLZLcq4UA3YhQVTyyM/2hQy/iroV4oe/b7hFQcDEi7a/XRpiFubDgcDqKqQxvtDe Gb+lDUxjc4cuTYFnYtZ6tUXs7Ga3sAKn9ok1agJg74ND4v9+YFlUOT4TsFHpNLUs xAskxEm0UYq8VdT+ZzOd6ABCDzdGIBpj9Q42JpKWXptwEZOEVXJNb/tdTm2Lda4g Iv8aKQn7zurlwOqeqU5Z9Q7hC+mxDmiHXw+giOp5z8OZPY5f4dtfAfGZ0v0+UyA1 fU9Z0Ul6QHKhcyOs2tkdJyD1f6r4otR+1naTxCrY+EQPfvEo5uBRlbtzHSMaPqg= =lRas -----END PGP SIGNATURE----- --t4PHPrwRrIXWpgA1xroCDw5MBQbIDn3iX--