WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 5/6] xen/hvm kexec: unregister timer interrupt du

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 5/6] xen/hvm kexec: unregister timer interrupt during reboot
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 27 Jul 2011 16:05:12 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 27 Jul 2011 07:07:44 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1311775574; l=1801; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=QrcAlcKthCsjrQtYavYCPxBoa/g=; b=k0s1I9SGn4Q7g+YZPH0x1XPQ5FmJsTCVqpeo1JxJB+zIWwYF3N3pdTQe+mkpfPGsqm+ aLJCAfjz637PXLvhpPlFU2rVGspf77NF3Ar9/WQ2zoOPx8Grx8tViLEU4tgGuz2g+Mh0D afHTlewqayr0XqLOXLpWxAICL28GWVZPVwk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110726142223.GG5994@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110726115209.655568638@xxxxxxxxx> <20110726115211.204484318@xxxxxxxxx> <20110726142223.GG5994@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
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@xxxxxxxxx>
> > 
> > ---
> >  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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>