From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxc8x-0002kH-IB for qemu-devel@nongnu.org; Wed, 27 May 2015 10:17:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxc8s-0006Oo-Fw for qemu-devel@nongnu.org; Wed, 27 May 2015 10:17:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47516) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxc8s-0006OA-93 for qemu-devel@nongnu.org; Wed, 27 May 2015 10:17:10 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4REH9VU004447 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 27 May 2015 10:17:09 -0400 Message-ID: <5565D1E4.7050607@redhat.com> Date: Wed, 27 May 2015 08:17:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432732141-33915-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1432732141-33915-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Hr8ELFV16G5EJvHBm7DeRQt23jTPjDpkg" Subject: Re: [Qemu-devel] [PATCH v2] 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) --Hr8ELFV16G5EJvHBm7DeRQt23jTPjDpkg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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) "-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 = not have > an equivalent. >=20 > 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= =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 > --- > 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(-) > =20 > DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \ > - "-watchdog i6300esb|ib700\n" \ > - " enable virtual hardware watchdog [default=3Dnone]= \n", > + "-watchdog [[model=3D]i6300esb|ib700]\n" \ > + " [,action=3Dreset|shutdown|poweroff|pause|debug|none]\n"= \ > + " 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}] Bikeshedding here: Hmm - this says I can supply -watchdog with no arguments. It also implies that '-watchdog ,action=3D...' would work. Maybe we split it int= o two lines: -watchdog [model=3D]@var{model} -watchdog [[model=3D]@var{model},]action=3D@var{action} But that gets more verbose than necessary. I can live with it as-is. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Hr8ELFV16G5EJvHBm7DeRQt23jTPjDpkg 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/ iQEcBAEBCAAGBQJVZdHkAAoJEKeha0olJ0NqP3cH/ArOwGz185Piut/a3a/vm6K4 TmE8X2nyLgpN+hsSUmsYko/QMzZjpc/awrv9sN64SaCxcSoDaXvVXc47R4F5J9wb W2SKX715B3w7hVsxemjCMl9O7oacKW7nJyXipqcNvPsbL8Epqfk0fjM41q7YICQe nXeNwRFce5SsPIhfFhwY2NHaaxlcWudiU7XzexIPB7kd1FZZU4XE4wHQitlQ59Fe 06BWMdu0tp40xLt89BgsCEo3soKYclnmBLRwvHHFZ7t2PvTR+oNvNMBuis7E5rcF IQRz4uw7PLu1anoQG/fk4mZxX7Gc2phwpgJRCMr2Zs9pbtwZS+rD7o6a9CnWXzI= =ho0+ -----END PGP SIGNATURE----- --Hr8ELFV16G5EJvHBm7DeRQt23jTPjDpkg--