All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel
Date: Mon, 1 Aug 2011 14:58:10 +0200	[thread overview]
Message-ID: <20110801125810.GA9956@aepfle.de> (raw)
In-Reply-To: <alpine.DEB.2.00.1107291539380.12963@kaball-desktop>

On Fri, Jul 29, Stefano Stabellini wrote:

> On Thu, 28 Jul 2011, Olaf Hering wrote:
> > (this is actually a forward port of rev 1079 from 2.6.18.hg, untested because
> > kdump just hangs before (or while) entering the crash kernel in 3.0)
> > 
> > After triggering a crash dump in a HVM guest, the PV backend drivers
> > will remain in connected state. When the kdump kernel starts the PV
> > drivers will skip such devices. As a result, no root device is found and
> > the vmcore cant be saved.
> > 
> > With this change all frontend devices with state XenbusStateConnected
> > will be reset by changing the state file to Closing/Closed/Initializing.
> > This will trigger a disconnect in the backend drivers. Now the frontend
> > drivers will find the backend drivers in state Initwait and can connect.
> > 
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > 
> > ---
> >  drivers/xen/xenbus/xenbus_comms.c          |    4 -
> >  drivers/xen/xenbus/xenbus_probe_frontend.c |   97 +++++++++++++++++++++++++++++
> >  2 files changed, 100 insertions(+), 1 deletion(-)
> > 
> > Index: linux-3.0/drivers/xen/xenbus/xenbus_comms.c
> > ===================================================================
> > --- linux-3.0.orig/drivers/xen/xenbus/xenbus_comms.c
> > +++ linux-3.0/drivers/xen/xenbus/xenbus_comms.c
> > @@ -212,7 +212,9 @@ int xb_init_comms(void)
> >  		printk(KERN_WARNING "XENBUS response ring is not quiescent "
> >  		       "(%08x:%08x): fixing up\n",
> >  		       intf->rsp_cons, intf->rsp_prod);
> > -		intf->rsp_cons = intf->rsp_prod;
> > +		/* breaks kdump */
> > +		if (!reset_devices)
> > +			intf->rsp_cons = intf->rsp_prod;
> >  	}
> 
> Where is reset_devices coming from?
> I hope is set only on a kexec reboot.

This is for a kdump boot, its added as additional kernel cmdline option
for the kdump kernel.

> Considering that all the other patches in this series follow the
> opposite strategy, that is closing stuff on shutdown, why are you trying
> to close xenbus connections on boot here?
> At this point I would rather be coherent and simply switch to
> XenbusStateClosing or XenbusStateClosed in the shutdown path if
> kexec_is_loaded.

To allow the kdump kernel to store the /proc/vmcore file somewhere, it
has to get either storage or network access.  But the kdump kernel finds
all devices in the Connected state, because the to-be-debugged kernel
just crashed. So it has to reset the connection to the backend.

Olaf

  reply	other threads:[~2011-08-01 12:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 13:23 [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Olaf Hering
2011-07-28 13:23 ` [PATCH 01/11] kexec: add kexec_is_loaded function Olaf Hering
2011-07-29 14:45   ` Stefano Stabellini
2011-07-29 17:34     ` Konrad Rzeszutek Wilk
2011-08-01 12:59       ` Olaf Hering
2011-07-28 13:23 ` [PATCH 02/11] xen: remove BUG_ON from xen_teardown_timer Olaf Hering
2011-07-28 13:23 ` [PATCH 03/11] xen: use static initializers in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 04/11] xen/hvm kexec: unregister timer interrupt during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 05/11] xen/hvm kexec: unregister debugirq " Olaf Hering
2011-07-29 17:45   ` Konrad Rzeszutek Wilk
2011-07-28 13:23 ` [PATCH 06/11] xen/hvm kexec: unregister shutdown+sysrq watches " Olaf Hering
2011-07-28 13:23 ` [PATCH 07/11] xen/hvm kexec: unregister memory/target watch in xen-balloon.c Olaf Hering
2011-07-28 13:23 ` [PATCH 08/11] xen/hvm kexec: unregister the watch of the "backend" node during reboot Olaf Hering
2011-07-28 13:23 ` [PATCH 09/11] xen/hvm kexec: unregister the watch of the "device" " Olaf Hering
2011-07-28 13:23 ` [PATCH 10/11] xen kexec: reset device state to Initializing " Olaf Hering
2011-07-28 13:23 ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Olaf Hering
2011-07-29 14:47   ` Stefano Stabellini
2011-08-01 12:58     ` Olaf Hering [this message]
2011-08-02 21:04       ` Stefano Stabellini
2011-08-02 22:20         ` Where can I find current (and up to date) documentation for xen 4.1.1? Mark Schneider
2011-08-02 22:42           ` xen 4.1.1 - errors in xend-debug.log: cat: /sys/bus/scsi/devices/host0/vendor: No such file or directory Mark Schneider
2011-08-02 22:48             ` [2011-08-02 20:54:36 2721] WARNING (XendAPI:708) API call: VBD.set_device not found Mark Schneider
2011-08-02 23:29               ` xen 4.1.1 - Error: Device 0 (vif) could not be connected. Hotplug scripts not working Mark Schneider
2011-08-03  1:02                 ` Boris Derzhavets
2011-08-03  8:14                   ` Mark Schneider
2011-08-03 16:43                     ` Pasi Kärkkäinen
2011-08-03  4:55           ` Where can I find current (and up to date) documentation for xen 4.1.1? Pasi Kärkkäinen
2011-08-09  9:07       ` [PATCH 11/11] xen/hvm kdump: reset PV devices in crash kernel Ian Campbell
2011-07-28 13:43 ` [PATCH 00/11] [v2] misc changes for kexec in pv-on-hvm guests Keir Fraser
2011-08-01 13:00   ` Olaf Hering
2011-07-29 17:35 ` Konrad Rzeszutek Wilk

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=20110801125810.GA9956@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.