From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z08uq-0000ns-HJ for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:41:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z08um-0005bQ-Dc for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:41:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32814) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z08ul-0005bC-Vs for qemu-devel@nongnu.org; Wed, 03 Jun 2015 09:41:04 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 86E88312D30 for ; Wed, 3 Jun 2015 13:41:03 +0000 (UTC) Message-ID: <556F03EB.6000905@redhat.com> Date: Wed, 03 Jun 2015 15:40:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1432732141-33915-1-git-send-email-pbonzini@redhat.com> <87a8whszmv.fsf@blackfin.pond.sub.org> In-Reply-To: <87a8whszmv.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] watchdog: convert to QemuOpts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, rjones@redhat.com On 03/06/2015 15:14, Markus Armbruster wrote: >> 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-actio= n. >> (This is listed in our BiteSizedTasks wiki page). >=20 > You'd have to configure their watchdog action with -global, because > that's how we set onboard device properties. Right. That however doesn't work if the watchdog is a device but isn't qdevified, or the watchdog isn't a device and doesn't have a dummy device wrapper around it, aka the KVM_EXIT_WATCHDOG case. Also, it's very hard to discover (e.g. how is one supposed to find a watchdog_action property under ICH9_LPC---not yet upstream, but should be in 2.4). > This makes -watchdog available in configuration files, like this: >=20 > [watchdog] > model =3D "ib700" >=20 > "-balloon virtio -watchdog ib700 -writeconfig /dev/stdout" now > produces >=20 > [device] > driver =3D "virtio-balloon" >=20 > [watchdog] > model =3D "ib700" >=20 > Digs us deeper into the "alternative syntax" hole. True, but consistent with "-drive if=3Dvirtio" which doesn't produce a [device] stanza. > Of the three -watchdog behaviors "reject more than one watchdog", > "just add them all whether it makes sense or not" and "add at most > one, silently ignore the rest", this gives us the worst. True, but consistent with the handling of other merge_lists options: the last wins. > If the stated objective is all you want, why not convert > -watchdog-action instead of -watchdog? Should be simpler. Just make > sure to preserve "last option wins" behavior. Because I'm not sure that we won't have other watchdog options in the future. Also, [watchdog] action =3D "reset" is marginally nicer than any of [watchdog-action] action =3D "reset" and [machine] watchdog-action =3D "reset" Paolo