Received: from eggs.gnu.org ([2001:4830:134:3::10]:58589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTS1-0000IG-2l for qemu-devel@nongnu.org; Wed, 29 Apr 2015 10:59:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnTRw-000440-UM for qemu-devel@nongnu.org; Wed, 29 Apr 2015 10:59:01 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:45053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnTRw-00043k-LK for qemu-devel@nongnu.org; Wed, 29 Apr 2015 10:58:56 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 Apr 2015 15:58:55 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4FD93219005C for ; Wed, 29 Apr 2015 15:58:35 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3TEwqnS2556180 for ; Wed, 29 Apr 2015 14:58:52 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3TEwq0A001489 for ; Wed, 29 Apr 2015 08:58:52 -0600 Date: Wed, 29 Apr 2015 16:58:51 +0200 From: Cornelia Huck Message-ID: <20150429165851.3ad0d3f2.cornelia.huck@de.ibm.com> In-Reply-To: <87iocf5ckz.fsf@blackfin.pond.sub.org> References: <1429257161-29597-1-git-send-email-cornelia.huck@de.ibm.com> <1429257161-29597-3-git-send-email-cornelia.huck@de.ibm.com> <87iocf5ckz.fsf@blackfin.pond.sub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] watchdog: Add watchdog device diag288 to the sysbus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-devel@nongnu.org, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, Xu Wang , lcapitulino@redhat.com On Wed, 29 Apr 2015 14:43:56 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > From: Xu Wang > > > > A new sysbus device for diag288 watchdog, it monitors the kvm guest > > status, and take corresponding actions when it detects that the guest > > is not responding. > > > > Signed-off-by: Xu Wang > > Reviewed-by: David Hildenbrand > > Signed-off-by: Cornelia Huck > > --- > > default-configs/s390x-softmmu.mak | 1 + > > hw/watchdog/Makefile.objs | 1 + > > hw/watchdog/wdt_diag288.c | 110 ++++++++++++++++++++++++++++++++++++++ > > include/hw/watchdog/wdt_diag288.h | 36 +++++++++++++ > > qemu-options.hx | 6 ++- > > 5 files changed, 152 insertions(+), 2 deletions(-) > > create mode 100644 hw/watchdog/wdt_diag288.c > > create mode 100644 include/hw/watchdog/wdt_diag288.h > > diff --git a/qemu-options.hx b/qemu-options.hx > > index 319d971..7ef8f50 100644 > > --- a/qemu-options.hx > > +++ b/qemu-options.hx > > @@ -3115,7 +3115,7 @@ when the shift value is high (how high depends on the host machine). > > ETEXI > > > > DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \ > > - "-watchdog i6300esb|ib700\n" \ > > + "-watchdog i6300esb|ib700|diag288\n" \ > > " enable virtual hardware watchdog [default=none]\n", > > QEMU_ARCH_ALL) > > STEXI > > Preexisting: the help text assumes that all these watchdogs are actually > compiled in. Generally not the case. Instead of adding another one > that's generally not available, please change the help text in a > preliminary patch to something like > > DEF("watchdog", HAS_ARG, QEMU_OPTION_watchdog, \ > "-watchdog model\n" \ > " enable virtual hardware watchdog [default none]\n", > QEMU_ARCH_ALL) > STEXI > @item -watchdog @var{model} > @findex -watchdog > Create a virtual hardware watchdog device. Once enabled (by a guest > action), the watchdog must be periodically polled by an agent inside > the guest or else the guest will be restarted. > > The @var{model} is the model of hardware watchdog to emulate. Use > @code{-watchdog help} to list available hardware models. Only one > watchdog can be enabled for a guest. Maybe keep "Choose a watchdog for which your guest has drivers."? > > The following models may be available: > @table @option > @item ib700 > iBASE 700 is a very simple ISA watchdog with a single timer. > @item i6300esb > Intel 6300ESB I/O controller hub is a much more featureful PCI-based > dual-timer watchdog. > @end table > ETEXI I like that. > > > @@ -3129,7 +3129,9 @@ The @var{model} is the model of hardware watchdog to emulate. Choices > > for model are: @code{ib700} (iBASE 700) which is a very simple ISA > > watchdog with a single timer, or @code{i6300esb} (Intel 6300ESB I/O > > controller hub) which is a much more featureful PCI-based dual-timer > > -watchdog. Choose a model for which your guest has drivers. > > +watchdog. @code{diag288} is a watchdog device only available on s390x > > +(for now only supported by KVM). Choose a model for which your guest > > +has drivers. Hm... let's make that @item diag288 A virtual watchdog for s390x backed by the diagnose 288 hypercall (currently KVM only). ? > > > > Use @code{-watchdog help} to list available hardware models. Only one > > watchdog can be enabled for a guest. > > Recommend to split this patch: one patch to add the device model, and > another one to wire up -watchdog. So we end up with three patches: - clean up help text - add device (probably as a plain device) - wire up -watchdog Sounds sensible.