All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Daniel Gollub <gollub@b1-systems.de>,
	kvm@vger.kernel.org, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH 0/2] Introduce panic hypercall
Date: Mon, 20 Jun 2011 18:45:36 +0300	[thread overview]
Message-ID: <4DFF6B20.7090107@redhat.com> (raw)
In-Reply-To: <20110620153825.GH13042@redhat.com>

On 06/20/2011 06:38 PM, Daniel P. Berrange wrote:
> On Mon, Jun 20, 2011 at 06:31:23PM +0300, Avi Kivity wrote:
> >  On 06/20/2011 04:38 PM, Daniel Gollub wrote:
> >  >Introduce panic hypercall to enable the crashing guest to notify the
> >  >host. This enables the host to run some actions as soon a guest
> >  >crashed (kernel panic).
> >  >
> >  >This patch series introduces the panic hypercall at the host end.
> >  >As well as the hypercall for KVM paravirtuliazed Linux guests, by
> >  >registering the hypercall to the panic_notifier_list.
> >  >
> >  >The basic idea is to create KVM crashdump automatically as soon the
> >  >guest paniced and power-cycle the VM (e.g. libvirt<on_crash />).
> >
> >  This would be more easily done via a "panic device" (I/O port or
> >  memory-mapped address) that the guest hits.  It would be intercepted
> >  by qemu without any new code in kvm.\
> >
> >  However, I'm not sure I see the gain.  Most enterprisey guests
> >  already contain in-guest crash dumpers which provide more
> >  information than a qemu memory dump could, since they know exact
> >  load addresses etc. and are integrated with crash analysis tools.
> >  What do you have in mind?
>
> Well libvirt can capture a "core" file by doing 'virsh dump $GUESTNAME'.
> This actually uses the QEMU monitor migration command to capture the
> entire of QEMU memory. The 'crash' command line tool actually knows
> how to analyse this data format as it would a normal kernel crashdump.

Interesting.

> I think having a way for a guest OS to notify the host that is has
> crashed would be useful. libvirt could automatically do a crash
> dump of the QEMU memory, or at least pause the guest CPUs and notify
> the management app of the crash, which can then decide what todo.
> You can also use tools like 'virt-dmesg' which uses libvirt to peek
> into guest memory to extract the most recent kernel dmesg logs (even
> if the guest OS itself is crashed&  didn't manage to send them out
> via netconsole or something else).

I agree.  But let's do this via a device, this way kvm need not be changed.

Do ILO cards / IPMI support something like this?  We could follow their 
lead in that case.

> 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.

-- 
error compiling committee.c: too many arguments to function


WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Daniel Gollub <gollub@b1-systems.de>,
	qemu-devel <qemu-devel@nongnu.org>,
	kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 0/2] Introduce panic hypercall
Date: Mon, 20 Jun 2011 18:45:36 +0300	[thread overview]
Message-ID: <4DFF6B20.7090107@redhat.com> (raw)
In-Reply-To: <20110620153825.GH13042@redhat.com>

On 06/20/2011 06:38 PM, Daniel P. Berrange wrote:
> On Mon, Jun 20, 2011 at 06:31:23PM +0300, Avi Kivity wrote:
> >  On 06/20/2011 04:38 PM, Daniel Gollub wrote:
> >  >Introduce panic hypercall to enable the crashing guest to notify the
> >  >host. This enables the host to run some actions as soon a guest
> >  >crashed (kernel panic).
> >  >
> >  >This patch series introduces the panic hypercall at the host end.
> >  >As well as the hypercall for KVM paravirtuliazed Linux guests, by
> >  >registering the hypercall to the panic_notifier_list.
> >  >
> >  >The basic idea is to create KVM crashdump automatically as soon the
> >  >guest paniced and power-cycle the VM (e.g. libvirt<on_crash />).
> >
> >  This would be more easily done via a "panic device" (I/O port or
> >  memory-mapped address) that the guest hits.  It would be intercepted
> >  by qemu without any new code in kvm.\
> >
> >  However, I'm not sure I see the gain.  Most enterprisey guests
> >  already contain in-guest crash dumpers which provide more
> >  information than a qemu memory dump could, since they know exact
> >  load addresses etc. and are integrated with crash analysis tools.
> >  What do you have in mind?
>
> Well libvirt can capture a "core" file by doing 'virsh dump $GUESTNAME'.
> This actually uses the QEMU monitor migration command to capture the
> entire of QEMU memory. The 'crash' command line tool actually knows
> how to analyse this data format as it would a normal kernel crashdump.

Interesting.

> I think having a way for a guest OS to notify the host that is has
> crashed would be useful. libvirt could automatically do a crash
> dump of the QEMU memory, or at least pause the guest CPUs and notify
> the management app of the crash, which can then decide what todo.
> You can also use tools like 'virt-dmesg' which uses libvirt to peek
> into guest memory to extract the most recent kernel dmesg logs (even
> if the guest OS itself is crashed&  didn't manage to send them out
> via netconsole or something else).

I agree.  But let's do this via a device, this way kvm need not be changed.

Do ILO cards / IPMI support something like this?  We could follow their 
lead in that case.

> 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.

-- 
error compiling committee.c: too many arguments to function

  reply	other threads:[~2011-06-20 15:45 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 13:38 [PATCH 0/2] Introduce panic hypercall Daniel Gollub
2011-06-20 13:38 ` [PATCH 1/2] Inroduce panic hypercall KVM_HC_PANIC (host) Daniel Gollub
2011-06-20 13:38 ` [PATCH 2/2] Call KVM_HC_PANIC if guest panics Daniel Gollub
2011-06-20 15:31 ` [PATCH 0/2] Introduce panic hypercall Avi Kivity
2011-06-20 15:38   ` Daniel P. Berrange
2011-06-20 15:45     ` Avi Kivity [this message]
2011-06-20 15:45       ` [Qemu-devel] " Avi Kivity
2011-06-20 15:59       ` Jan Kiszka
2011-06-20 15:59         ` [Qemu-devel] " Jan Kiszka
2011-06-20 16:26       ` Daniel Gollub
2011-06-20 16:26         ` [Qemu-devel] " Daniel Gollub
2011-06-20 16:34         ` Avi Kivity
2011-06-20 16:34           ` [Qemu-devel] " Avi Kivity
2011-06-20 17:13           ` Jan Kiszka
2011-06-20 17:13             ` [Qemu-devel] " Jan Kiszka
2011-06-20 17:23             ` Avi Kivity
2011-06-20 17:23               ` [Qemu-devel] " Avi Kivity
2011-06-21  6:04               ` Gleb Natapov
2011-06-21  6:04                 ` [Qemu-devel] " Gleb Natapov
2011-06-21  6:02           ` Gleb Natapov
2011-06-21  6:02             ` [Qemu-devel] " Gleb Natapov
2011-06-21  8:09             ` Avi Kivity
2011-06-21  8:09               ` [Qemu-devel] " Avi Kivity
2011-06-21  8:41               ` Gleb Natapov
2011-06-21  8:41                 ` [Qemu-devel] " Gleb Natapov
2011-06-21  8:56                 ` Avi Kivity
2011-06-21  8:56                   ` [Qemu-devel] " Avi Kivity
2011-06-21  9:03                   ` Gleb Natapov
2011-06-21  9:03                     ` [Qemu-devel] " Gleb Natapov
2011-06-21  9:07                     ` Avi Kivity
2011-06-21  9:07                       ` [Qemu-devel] " Avi Kivity
2011-06-21  9:30               ` shawn che
2011-06-21  9:30                 ` [Qemu-devel] " shawn che
2011-06-20 19:28   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DFF6B20.7090107@redhat.com \
    --to=avi@redhat.com \
    --cc=berrange@redhat.com \
    --cc=gollub@b1-systems.de \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.