[kernel] r20136 - in dists/squeeze/linux-2.6/debian: . patches/features/all/xen patches/series

Ian Campbell ijc-guest at alioth.debian.org
Thu May 23 16:52:54 UTC 2013


Author: ijc-guest
Date: Thu May 23 16:52:54 2013
New Revision: 20136

Log:
xen: signal crash to host on panic (Closes: #706692)

Added:
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/Xen-register-panic-notifier-to-take-crashes-of-xen-g.patch
Modified:
   dists/squeeze/linux-2.6/debian/changelog
   dists/squeeze/linux-2.6/debian/patches/features/all/xen/pvops.patch
   dists/squeeze/linux-2.6/debian/patches/series/49

Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog	Tue May 21 05:30:54 2013	(r20135)
+++ dists/squeeze/linux-2.6/debian/changelog	Thu May 23 16:52:54 2013	(r20136)
@@ -1,8 +1,12 @@
 linux-2.6 (2.6.32-49) UNRELEASED; urgency=low
 
+  [ Ben Hutchings ]
   * [x86] PCI: Use _CRS by default on IBM System x3800 and VMware
     (Closes: #700544)
 
+  [ Ian Campbell ]
+  * xen: signal crash to host on panic (Closes: #706692)
+
  -- Ben Hutchings <ben at decadent.org.uk>  Fri, 15 Feb 2013 02:55:05 +0000
 
 linux-2.6 (2.6.32-48) stable; urgency=low

Added: dists/squeeze/linux-2.6/debian/patches/features/all/xen/Xen-register-panic-notifier-to-take-crashes-of-xen-g.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/Xen-register-panic-notifier-to-take-crashes-of-xen-g.patch	Thu May 23 16:52:54 2013	(r20136)
@@ -0,0 +1,75 @@
+From f09f6d194d85043e0eb105a577e7ad6d8170ab66 Mon Sep 17 00:00:00 2001
+From: Donald Dutile <ddutile at redhat.com>
+Date: Thu, 15 Jul 2010 14:56:49 -0400
+Subject: [PATCH] Xen: register panic notifier to take crashes of xen guests
+ on panic
+
+Register a panic notifier so that when the guest crashes it can shut
+down the domain and indicate it was a crash to the host.
+
+Signed-off-by: Donald Dutile <ddutile at redhat.com>
+Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
+---
+ arch/x86/xen/enlighten.c |   20 ++++++++++++++++++++
+ arch/x86/xen/setup.c     |    2 ++
+ arch/x86/xen/xen-ops.h   |    2 ++
+ 3 files changed, 24 insertions(+)
+
+diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
+index 90a3e80..d99522e 100644
+--- a/arch/x86/xen/enlighten.c
++++ b/arch/x86/xen/enlighten.c
+@@ -1040,6 +1040,26 @@ static void xen_crash_shutdown(struct pt_regs *regs)
+ 	xen_reboot(SHUTDOWN_crash);
+ }
+ 
++static int
++xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
++{
++	struct sched_shutdown r = { .reason = SHUTDOWN_crash};
++
++	if (HYPERVISOR_sched_op(SCHEDOP_shutdown, &r))
++		BUG();
++	return NOTIFY_DONE;
++}
++
++static struct notifier_block xen_panic_block = {
++	.notifier_call= xen_panic_event,
++};
++
++int xen_panic_handler_init(void)
++{
++	atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
++	return 0;
++}
++
+ static const struct machine_ops __initdata xen_machine_ops = {
+ 	.restart = xen_restart,
+ 	.halt = xen_machine_halt,
+diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
+index 9deb6ba..328b003 100644
+--- a/arch/x86/xen/setup.c
++++ b/arch/x86/xen/setup.c
+@@ -226,6 +226,8 @@ void __init xen_arch_setup(void)
+ 	struct physdev_set_iopl set_iopl;
+ 	int rc;
+ 
++	xen_panic_handler_init();
++
+ 	HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
+ 	HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
+ 
+diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
+index f9153a3..00d59d6 100644
+--- a/arch/x86/xen/xen-ops.h
++++ b/arch/x86/xen/xen-ops.h
+@@ -101,4 +101,6 @@ void xen_sysret32(void);
+ void xen_sysret64(void);
+ void xen_adjust_exception_frame(void);
+ 
++extern int xen_panic_handler_init(void);
++
+ #endif /* XEN_OPS_H */
+-- 
+1.7.10.4
+

Modified: dists/squeeze/linux-2.6/debian/patches/features/all/xen/pvops.patch
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/features/all/xen/pvops.patch	Tue May 21 05:30:54 2013	(r20135)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/xen/pvops.patch	Thu May 23 16:52:54 2013	(r20136)
@@ -18,7 +18,8 @@
 [bwh: Updated context in xen_smp_prepare_cpus() to apply after 2.6.32.47.]
 [bwh: Updated the removed implementation of blkfront_closing() to match
  2.6.32.59.  The fix made there appears to be unnecessary here.]
-
+[ijc: Update after pulling f09f6d194d85043e0eb105a577e7ad6d8170ab66
+ into base kernel, removing those hunks here.]
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
 index 9238f05..eb729e4 100644
 --- a/Documentation/kernel-parameters.txt
@@ -3751,7 +3752,7 @@
  	.io_delay = xen_io_delay,
  
  	/* Xen takes care of %gs when switching to usermode for us */
-@@ -1020,15 +1064,40 @@ static void xen_machine_halt(void)
+@@ -1020,6 +1064,14 @@ static void xen_machine_halt(void)
  	xen_reboot(SHUTDOWN_poweroff);
  }
  
@@ -3766,25 +3767,7 @@
  static void xen_crash_shutdown(struct pt_regs *regs)
  {
  	xen_reboot(SHUTDOWN_crash);
- }
- 
-+static int
-+xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
-+{
-+	xen_reboot(SHUTDOWN_crash);
-+	return NOTIFY_DONE;
-+}
-+
-+static struct notifier_block xen_panic_block = {
-+	.notifier_call= xen_panic_event,
-+};
-+
-+int xen_panic_handler_init(void)
-+{
-+	atomic_notifier_chain_register(&panic_notifier_list, &xen_panic_block);
-+	return 0;
-+}
-+
+@@ -1028,7 +1097,7 @@
  static const struct machine_ops __initdata xen_machine_ops = {
  	.restart = xen_restart,
  	.halt = xen_machine_halt,
@@ -5207,15 +5190,6 @@
  	return "Xen";
  }
  
-@@ -156,6 +267,8 @@ void __init xen_arch_setup(void)
- 	struct physdev_set_iopl set_iopl;
- 	int rc;
- 
-+	xen_panic_handler_init();
-+
- 	HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
- 	HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
- 
 @@ -182,13 +295,17 @@ void __init xen_arch_setup(void)
  	}
  #endif
@@ -5479,13 +5453,6 @@
  /* Declare an asm function, along with symbols needed to make it
     inlineable */
  #define DECL_ASM(ret, name, ...)		\
-@@ -102,4 +122,6 @@ void xen_sysret32(void);
- void xen_sysret64(void);
- void xen_adjust_exception_frame(void);
- 
-+extern int xen_panic_handler_init(void);
-+
- #endif /* XEN_OPS_H */
 diff --git a/block/blk-core.c b/block/blk-core.c
 index cffd737..3efdae0 100644
 --- a/block/blk-core.c

Modified: dists/squeeze/linux-2.6/debian/patches/series/49
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/49	Tue May 21 05:30:54 2013	(r20135)
+++ dists/squeeze/linux-2.6/debian/patches/series/49	Thu May 23 16:52:54 2013	(r20136)
@@ -1,3 +1,4 @@
 + bugfix/x86/x86-PCI-for-debuggability-show-host-bridge-windows-e.patch
 + bugfix/x86/x86-PCI-use-host-bridge-_CRS-info-by-default-on-2008.patch
 + bugfix/x86/x86-PCI-Use-_CRS-by-default-on-VMware.patch
++ features/all/xen/Xen-register-panic-notifier-to-take-crashes-of-xen-g.patch



More information about the Kernel-svn-changes mailing list