From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhRK-0007PT-RK for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYhRJ-0003XB-1Q for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:35:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhRI-0003VX-Ea for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:35:04 -0400 Message-ID: <4DFF76B1.8020509@redhat.com> Date: Mon, 20 Jun 2011 19:34:57 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1308577094-17551-1-git-send-email-gollub@b1-systems.de> <20110620153825.GH13042@redhat.com> <4DFF6B20.7090107@redhat.com> <201106201826.32975.gollub@b1-systems.de> In-Reply-To: <201106201826.32975.gollub@b1-systems.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] Introduce panic hypercall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Gollub Cc: qemu-devel , kvm@vger.kernel.org On 06/20/2011 07:26 PM, Daniel Gollub wrote: > > > > I agree. But let's do this via a device, this way kvm need not be changed. > > Is a device reliable enough if the guest kernel crashes? > Do you mean something like a hardware watchdog? I'm proposing a 1:1 equivalent. Instead of issuing a hypercall that tells the host about the panic, write to an I/O port that tells the host about the panic. > > > > Do ILO cards / IPMI support something like this? We could follow their > > lead in that case. > > The only two things which came to my mind are: > > * NMI (aka. ipmitool diag) - already available in qemu/kvm - but requires > in-guest kexec/kdump > * Hardware-Watchdog (also available in qemu/libvirt) A watchdog has the advantage that is also detects lockups. In fact you could implement the panic device via the existing watchdogs. Simply program the timer for the minimum interval and *don't* service the interrupt. This would work for non-virt setups as well as another way to issue a reset. > lguest and xen have something similar. They also have an hypercall which get > called by a function registered in the panic_notifier_list. Not quite sure if > you want to follow their lead. We could do the same, except s/hypercall/writel/. > Something I forgot to mention: This panic hypercall could also sit within an > external kernel module ... to support (legacy) distribution. Yes. > > > > > This series does need to introduce a QMP event notification upon > > > crash, so that the crash notification can be propagated to mgmt > > > layers above QEMU. > > > > Yes. > > Already done. I posted the QEMU relevant changes as a separated series to the > KVM list ... since the initial implementation is KVM specific (KVM hypercall) -- error compiling committee.c: too many arguments to function