All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch] Enable "sysrq c" handler for domU coredump
@ 2006-08-01  3:11 Akio Takebe
  2006-08-01  3:48 ` Horms
  2006-08-01  8:03 ` [Patch] Enable "sysrq c" handler for domU coredump Keir Fraser
  0 siblings, 2 replies; 19+ messages in thread
From: Akio Takebe @ 2006-08-01  3:11 UTC (permalink / raw)
  To: xen-devel, Horms, Kouya Shimura

[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 754 bytes --]

Hi,

In the case of linux, crash_kexec() is occured by "sysrq c".
In the case of DomainU on xen, Help is occured by "sysrq c" now.
So The way of dumping DomainU's memory manualy is nothing.

I fix this issue by the following way.
1. Panic is occured by "sysrq c" on both Domain0 and DomainU.
2. On DomainU, coredump is generated in /var/xen/dump (on Domain0).
   On Domain0, crash_kexec() is called by panic() if implemented.

I tested the below.
1. vi /etc/xen/xend-config.sxp
   (enabel-dump yes)
2. xm create -c domU
   echo 1 >/proc/sys/kernel/sysrq (on domU)
3. xm sysrq domU c (on dom0)
4. ls -lh /var/xen/dump

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>

Best Regards,

Akio Takebe

[-- Attachment #2: xen_sysrq_domUcore.patch --]
[-- Type: application/octet-stream, Size: 1606 bytes --]

diff -r d2bf1a7cc131 patches/linux-2.6.16.13/xen_sysrq_for_domUcore.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/linux-2.6.16.13/xen_sysrq_for_domUcore.patch	Tue Aug 01 01:55:10 2006 +0900
@@ -0,0 +1,46 @@
+--- ../pristine-linux-2.6.16.13/drivers/char/sysrq.c	2006-05-03 06:38:44.000000000 +0900
++++ ./drivers/char/sysrq.c	2006-08-01 01:54:25.413617336 +0900
+@@ -95,6 +95,19 @@ static struct sysrq_key_op sysrq_unraw_o
+ };
+ #endif /* CONFIG_VT */
+ 
++#ifdef CONFIG_XEN
++static void sysrq_handle_crash(int key, struct pt_regs *pt_regs,
++			      struct tty_struct *tty) 
++{
++	panic("Panic domain by request\n");
++}
++static struct sysrq_key_op sysrq_crash_op = {
++	.handler	= sysrq_handle_crash,
++	.help_msg	= "CrashDomain",
++	.action_msg	= "Panic domain by request",
++	.enable_mask	= SYSRQ_ENABLE_DUMP,
++};
++#else
+ #ifdef CONFIG_KEXEC
+ /* crashdump sysrq handler */
+ static void sysrq_handle_crashdump(int key, struct pt_regs *pt_regs,
+@@ -109,6 +122,7 @@ static struct sysrq_key_op sysrq_crashdu
+ 	.enable_mask	= SYSRQ_ENABLE_DUMP,
+ };
+ #endif
++#endif
+ 
+ /* reboot sysrq handler */
+ static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
+@@ -304,11 +318,15 @@ static struct sysrq_key_op *sysrq_key_ta
+ 		 it is handled specially on the sparc
+ 		 and will never arrive */
+ /* b */	&sysrq_reboot_op,
++#ifdef CONFIG_XEN /* for domU crash dump */
++/* c */	&sysrq_crash_op,
++#else
+ #ifdef CONFIG_KEXEC
+ /* c */ &sysrq_crashdump_op,
+ #else
+ /* c */	NULL,
+ #endif
++#endif
+ #ifdef CONFIG_DEBUG_MUTEXES
+ /* d */ &sysrq_showlocks_op,
+ #else

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2006-08-07 18:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-01  3:11 [Patch] Enable "sysrq c" handler for domU coredump Akio Takebe
2006-08-01  3:48 ` Horms
2006-08-01  4:39   ` Akio Takebe
2006-08-01  6:48     ` Horms
2006-08-01  9:06       ` Akio Takebe
2006-08-01  9:26         ` Horms
2006-08-01 10:33           ` Akio Takebe
2006-08-03  0:18             ` [Patch][RFC] Support "xm dump" (is Re: Re: [Patch] Enable "sysrq c" handler for domU coredump) Akio Takebe
2006-08-03  0:26               ` John Levon
2006-08-03  6:09                 ` Tristan Gingold
2006-08-03 11:10                   ` Akio Takebe
2006-08-03 11:58                     ` Tristan Gingold
2006-08-03 12:57                       ` Akio Takebe
2006-08-07 18:04                     ` John Levon
2006-08-03  1:50               ` Horms
2006-08-03 11:10                 ` Akio Takebe
2006-08-01  8:03 ` [Patch] Enable "sysrq c" handler for domU coredump Keir Fraser
2006-08-01  8:15   ` Muli Ben-Yehuda
2006-08-01  8:12     ` Keir Fraser

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.