All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akio Takebe <takebe_akio@jp.fujitsu.com>
To: xen-devel <xen-devel@lists.xensource.com>,
	Horms <horms@verge.net.au>, Kouya Shimura <kouya@jp.fujitsu.com>
Subject: [Patch] Enable "sysrq c" handler for domU coredump
Date: Tue, 01 Aug 2006 12:11:26 +0900	[thread overview]
Message-ID: <4DC6B5182D2981takebe_akio@jp.fujitsu.com> (raw)

[-- 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

             reply	other threads:[~2006-08-01  3:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-01  3:11 Akio Takebe [this message]
2006-08-01  3:48 ` [Patch] Enable "sysrq c" handler for domU coredump 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

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=4DC6B5182D2981takebe_akio@jp.fujitsu.com \
    --to=takebe_akio@jp.fujitsu.com \
    --cc=horms@verge.net.au \
    --cc=kouya@jp.fujitsu.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.