All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 5/6] xen/hvm kexec: unregister timer interrupt during reboot
Date: Wed, 27 Jul 2011 16:05:12 +0200	[thread overview]
Message-ID: <20110727140512.GA17515@aepfle.de> (raw)
In-Reply-To: <20110726142223.GG5994@dumpdata.com>

On Tue, Jul 26, Konrad Rzeszutek Wilk wrote:

> On Tue, Jul 26, 2011 at 01:52:14PM +0200, Olaf Hering wrote:
> > The kexec kernel will crash because the timer interrupt is already
> > registerd with EVTCHNOP_bind_virq.  Unbind the event channel during
> > shutdown so that the kexec kernel can reregister the interrupt.
> > 
> > Signed-off-by: Olaf Hering <olaf@aepfle.de>
> > 
> > ---
> >  arch/x86/xen/time.c |   27 ++++++++++++++++++++++++---
> >  1 file changed, 24 insertions(+), 3 deletions(-)
> > 
> > Index: linux-3.0/arch/x86/xen/time.c
> > ===================================================================
> > --- linux-3.0.orig/arch/x86/xen/time.c
> > +++ linux-3.0/arch/x86/xen/time.c
> > @@ -14,6 +14,7 @@
> >  #include <linux/kernel_stat.h>
> >  #include <linux/math64.h>
> >  #include <linux/gfp.h>
> > +#include <linux/syscore_ops.h>
> >  
> >  #include <asm/pvclock.h>
> >  #include <asm/xen/hypervisor.h>
> > @@ -405,12 +406,20 @@ void xen_setup_timer(int cpu)
> >  	evt->irq = irq;
> >  }
> >  
> > -void xen_teardown_timer(int cpu)
> > +static void xen_unbind_timer(int cpu)
> >  {
> >  	struct clock_event_device *evt;
> > -	BUG_ON(cpu == 0);
> >  	evt = &per_cpu(xen_clock_events, cpu);
> > -	unbind_from_irqhandler(evt->irq, NULL);
> > +	if (evt->irq >= 0) {
> > +		unbind_from_irqhandler(evt->irq, NULL);
> > +		evt->irq = -1;
> > +	}
> > +}
> > +
> > +void xen_teardown_timer(int cpu)
> > +{
> > +	BUG_ON(cpu == 0);
> 
> Why the BUG? Ah you just copied it from xen_unbind_timer.
> Hm, I wonder if we actually need that BUG_ON.

A quick grep did not show up the place where
/sys/devices/system/cpu/cpu0/online would have been created. Since that
file is missing in my guest I think cpu0 can not be shutdown, So that
BUG_ON() can probably go.

Olaf

  reply	other threads:[~2011-07-27 14:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 11:52 [PATCH 0/6] misc changes for kexec in pv-on-hvm guests Olaf Hering
2011-07-26 11:52 ` [PATCH 1/6] xen: use static initializers in xen-balloon.c Olaf Hering
2011-07-26 14:16   ` Konrad Rzeszutek Wilk
2011-07-26 11:52 ` [PATCH 2/6] xen/hvm kexec: unregister shutdown+sysrq watches during reboot Olaf Hering
2011-07-26 14:17   ` Konrad Rzeszutek Wilk
2011-07-26 14:28     ` Olaf Hering
2011-07-26 11:52 ` [PATCH 3/6] xen/hvm kexec: unregister memory/target watch in xen-balloon.c Olaf Hering
2011-07-26 14:18   ` Konrad Rzeszutek Wilk
2011-07-26 11:52 ` [PATCH 4/6] xen/hvm kexec: unbind debugirq during reboot Olaf Hering
2011-07-26 14:19   ` Konrad Rzeszutek Wilk
2011-07-26 11:52 ` [PATCH 5/6] xen/hvm kexec: unregister timer interrupt " Olaf Hering
2011-07-26 14:22   ` Konrad Rzeszutek Wilk
2011-07-27 14:05     ` Olaf Hering [this message]
2011-07-27 14:38       ` Konrad Rzeszutek Wilk
2011-07-26 11:52 ` [PATCH 6/6] xen kexec: reset device state to Initializing " Olaf Hering
2011-07-26 14:27   ` Konrad Rzeszutek Wilk
2011-07-27 11:22   ` Stefano Stabellini
2011-07-27 12:14     ` Olaf Hering
2011-07-27 13:14       ` Stefano Stabellini

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=20110727140512.GA17515@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=konrad.wilk@oracle.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.