All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 05/11] xen/hvm kexec: unregister debugirq during reboot
Date: Fri, 29 Jul 2011 13:45:54 -0400	[thread overview]
Message-ID: <20110729174553.GC7745@dumpdata.com> (raw)
In-Reply-To: <20110728132301.858005961@aepfle.de>

On Thu, Jul 28, 2011 at 03:23:05PM +0200, Olaf Hering wrote:
> Unregister the debugirq during kexec, otherwise the kexec kernel will
> run into the BUG() in bind_virq_to_irq() when trying to bind to the
> still registered virq.
> 
> v2:
>  use kexec_is_loaded() function

Is that really neccessary? I mean can you just do it without checking for
that? As in, if you don't have a kexec kernel loaded what will happend to
the guest?

> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> 
> ---
>  arch/x86/xen/smp.c |   22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> Index: linux-3.0/arch/x86/xen/smp.c
> ===================================================================
> --- linux-3.0.orig/arch/x86/xen/smp.c
> +++ linux-3.0/arch/x86/xen/smp.c
> @@ -16,6 +16,8 @@
>  #include <linux/err.h>
>  #include <linux/slab.h>
>  #include <linux/smp.h>
> +#include <linux/kexec.h>
> +#include <linux/syscore_ops.h>
>  
>  #include <asm/paravirt.h>
>  #include <asm/desc.h>
> @@ -45,6 +47,25 @@ static DEFINE_PER_CPU(int, xen_debug_irq
>  static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id);
>  static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id);
>  
> +static void xen_hvn_smp_shutdown(void)
> +{
> +	int cpu;
> +
> +	if (!kexec_is_loaded())
> +		return;
> +
> +	for_each_online_cpu(cpu) {
> +		if (per_cpu(xen_debug_irq, cpu) < 0)
> +			continue;
> +		unbind_from_irqhandler(per_cpu(xen_debug_irq, cpu), NULL);
> +		per_cpu(xen_debug_irq, cpu) = -1;
> +	}
> +}
> +
> +static struct syscore_ops xen_hvn_smp_syscore_ops = {
> +	.shutdown = xen_hvn_smp_shutdown,
> +};
> +
>  /*
>   * Reschedule call back.
>   */
> @@ -525,6 +546,7 @@ static void __init xen_hvm_smp_prepare_c
>  		return;
>  	xen_init_lock_cpu(0);
>  	xen_init_spinlocks();
> +	register_syscore_ops(&xen_hvn_smp_syscore_ops);
>  }
>  
>  static int __cpuinit xen_hvm_cpu_up(unsigned int cpu)
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  reply	other threads:[~2011-07-29 17:45 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 [this message]
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
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=20110729174553.GC7745@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=olaf@aepfle.de \
    --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.