All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: nigel@nigel.suspend2.net,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH 0/3 -mm] kexec jump -v8
Date: Wed, 26 Dec 2007 20:57:16 -0500	[thread overview]
Message-ID: <20071227015716.GA6718@redhat.com> (raw)
In-Reply-To: <1198222399.1965.15.camel@caritas-dev.intel.com>

On Fri, Dec 21, 2007 at 03:33:19PM +0800, Huang, Ying wrote:

[..]
> The following user-space tools can be used with kexec jump.
> 
> 1. kexec-tools needs to be patched to support kexec jump. The patches
>    and the precompiled kexec can be download from the following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec-tools-src_git_kh8.tar.bz2
>        patches: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec-tools-patches_git_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec_git_kh8
> 
> 2. makedumpfile with patches are used as memory image saving tool, it
>    can exclude free pages from original kernel memory image file. The
>    patches and the precompiled makedumpfile can be download from the
>    following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile-src_cvs_kh8.tar.bz2
>        patches: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile-patches_cvs_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile_cvs_kh8
> 
> 3. A simplest memory image restoring tool named "krestore" is
>    implemented. It can be downloaded from the following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/krestore/krestore-src_cvs_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/krestore/krestore_cvs_kh8
> 
> An initramfs image can be used as the root file system of kexeced
> kernel. An initramfs image built with "BuildRoot" can be downloaded
> from the following URL:
>     initramfs image: http://khibernation.sourceforge.net/download/release_v8/initramfs/rootfs_cvs_kh8.gz
> All user space tools above are included in the initramfs image.
> 
> 
> Usage example of jumping between original and kexeced kernel:
> 
> 1. Compile and install patched kernel with following options selected:
> 
> CONFIG_X86_32=y
> CONFIG_RELOCATABLE=y
> CONFIG_KEXEC=y
> CONFIG_CRASH_DUMP=y
> CONFIG_PM=y
> 
> 2. Build an initramfs image contains kexec-tool, or download the
>    pre-built initramfs image, called rootfs.gz in following text.
> 
> 3. Boot kernel compiled in step 1.
> 
> 4. Load kernel compiled in step 1 with /sbin/kexec. If You want to use
>    "krestore" tool, the --elf64-core-headers should be specified in
>    command line of /sbin/kexec. The shell command line can be as
>    follow:
> 
>    /sbin/kexec --load-jump-back /boot/bzImage --mem-min=0x100000
>      --mem-max=0xffffff --elf64-core-headers --initrd=rootfs.gz
> 
> 5. Boot the kexeced kernel with following shell command line:
> 
>    /sbin/kexec -e
> 
> 6. The kexeced kernel will boot as normal kexec. In kexeced kernel the
>    memory image of original kernel can read via /proc/vmcore or
>    /dev/oldmem, and can be written via /dev/oldmem. You can
>    save/restore/modify it as you want to.
> 
> 7. Prepare jumping back from kexeced kernel with following shell
>    command lines:
> 
>    jump_back_entry=`cat /proc/cmdline | tr ' ' '\n' | grep kexec_jump_back_entry | cut -d '='`
>    /sbin/kexec --load-jump-back-helper=$jump_back_entry
> 
> 8. Jump back to the original kernel with following shell command line:
> 
>    /sbin/kexec -e
> 
> 9. Now, you are in the original kernel again. You can read/write the
>    memory image of kexeced kernel via /proc/kimgcore.
> 

Why do we need two interfaces, /proc/vmcore and /proc/kimgcore? Can't
we have just one say /proc/vmcore. Irrespective of what kernel you are
in /proc/vmcore gives you the access to the memory of kernel which was
previously booted.

Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: "Huang, Ying" <ying.huang@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	Pavel Machek <pavel@ucw.cz>,
	nigel@nigel.suspend2.net, "Rafael J. Wysocki" <rjw@sisk.pl>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pm@lists.linux-foundation.org,
	Kexec Mailing List <kexec@lists.infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3 -mm] kexec jump -v8
Date: Wed, 26 Dec 2007 20:57:16 -0500	[thread overview]
Message-ID: <20071227015716.GA6718@redhat.com> (raw)
In-Reply-To: <1198222399.1965.15.camel@caritas-dev.intel.com>

On Fri, Dec 21, 2007 at 03:33:19PM +0800, Huang, Ying wrote:

[..]
> The following user-space tools can be used with kexec jump.
> 
> 1. kexec-tools needs to be patched to support kexec jump. The patches
>    and the precompiled kexec can be download from the following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec-tools-src_git_kh8.tar.bz2
>        patches: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec-tools-patches_git_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/kexec-tools/kexec_git_kh8
> 
> 2. makedumpfile with patches are used as memory image saving tool, it
>    can exclude free pages from original kernel memory image file. The
>    patches and the precompiled makedumpfile can be download from the
>    following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile-src_cvs_kh8.tar.bz2
>        patches: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile-patches_cvs_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/makedumpfile/makedumpfile_cvs_kh8
> 
> 3. A simplest memory image restoring tool named "krestore" is
>    implemented. It can be downloaded from the following URL:
>        source: http://khibernation.sourceforge.net/download/release_v8/krestore/krestore-src_cvs_kh8.tar.bz2
>        binary: http://khibernation.sourceforge.net/download/release_v8/krestore/krestore_cvs_kh8
> 
> An initramfs image can be used as the root file system of kexeced
> kernel. An initramfs image built with "BuildRoot" can be downloaded
> from the following URL:
>     initramfs image: http://khibernation.sourceforge.net/download/release_v8/initramfs/rootfs_cvs_kh8.gz
> All user space tools above are included in the initramfs image.
> 
> 
> Usage example of jumping between original and kexeced kernel:
> 
> 1. Compile and install patched kernel with following options selected:
> 
> CONFIG_X86_32=y
> CONFIG_RELOCATABLE=y
> CONFIG_KEXEC=y
> CONFIG_CRASH_DUMP=y
> CONFIG_PM=y
> 
> 2. Build an initramfs image contains kexec-tool, or download the
>    pre-built initramfs image, called rootfs.gz in following text.
> 
> 3. Boot kernel compiled in step 1.
> 
> 4. Load kernel compiled in step 1 with /sbin/kexec. If You want to use
>    "krestore" tool, the --elf64-core-headers should be specified in
>    command line of /sbin/kexec. The shell command line can be as
>    follow:
> 
>    /sbin/kexec --load-jump-back /boot/bzImage --mem-min=0x100000
>      --mem-max=0xffffff --elf64-core-headers --initrd=rootfs.gz
> 
> 5. Boot the kexeced kernel with following shell command line:
> 
>    /sbin/kexec -e
> 
> 6. The kexeced kernel will boot as normal kexec. In kexeced kernel the
>    memory image of original kernel can read via /proc/vmcore or
>    /dev/oldmem, and can be written via /dev/oldmem. You can
>    save/restore/modify it as you want to.
> 
> 7. Prepare jumping back from kexeced kernel with following shell
>    command lines:
> 
>    jump_back_entry=`cat /proc/cmdline | tr ' ' '\n' | grep kexec_jump_back_entry | cut -d '='`
>    /sbin/kexec --load-jump-back-helper=$jump_back_entry
> 
> 8. Jump back to the original kernel with following shell command line:
> 
>    /sbin/kexec -e
> 
> 9. Now, you are in the original kernel again. You can read/write the
>    memory image of kexeced kernel via /proc/kimgcore.
> 

Why do we need two interfaces, /proc/vmcore and /proc/kimgcore? Can't
we have just one say /proc/vmcore. Irrespective of what kernel you are
in /proc/vmcore gives you the access to the memory of kernel which was
previously booted.

Thanks
Vivek

  parent reply	other threads:[~2007-12-27  1:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-21  7:33 [PATCH 0/3 -mm] kexec jump -v8 Huang, Ying
2007-12-21  7:33 ` Huang, Ying
2007-12-21  8:35 ` Nigel Cunningham
2007-12-21  8:35   ` Nigel Cunningham
2007-12-21  8:53   ` Huang, Ying
2007-12-21  8:53   ` Huang, Ying
2007-12-21  8:53     ` Huang, Ying
2007-12-21  8:35 ` Nigel Cunningham
2007-12-27  1:57 ` Vivek Goyal
2007-12-27  1:57 ` Vivek Goyal [this message]
2007-12-27  1:57   ` Vivek Goyal
2007-12-27  2:33   ` Huang, Ying
2007-12-27  2:33     ` Huang, Ying
2007-12-27 18:12     ` Vivek Goyal
2007-12-27 18:12     ` Vivek Goyal
2007-12-27 18:12       ` Vivek Goyal
2007-12-28  7:30       ` Huang, Ying
2007-12-28  7:30         ` Huang, Ying
2007-12-28  7:30       ` Huang, Ying
2007-12-27  2:33   ` Huang, Ying
2007-12-28 21:33 ` Vivek Goyal
2007-12-28 21:33 ` Vivek Goyal
2007-12-28 21:33   ` Vivek Goyal
2007-12-29  2:00   ` Huang, Ying
2007-12-29  2:00     ` Huang, Ying
2007-12-31 19:26     ` Vivek Goyal
2007-12-31 19:26       ` Vivek Goyal
2008-01-03  8:42       ` Huang, Ying
2008-01-03  8:42         ` Huang, Ying
2008-01-06 20:49         ` Vivek Goyal
2008-01-06 20:49           ` Vivek Goyal
2008-01-07  8:12           ` Huang, Ying
2008-01-07  8:12           ` Huang, Ying
2008-01-07  8:12             ` Huang, Ying
2008-01-06 20:49         ` Vivek Goyal
2008-01-03  8:42       ` Huang, Ying
2007-12-31 19:26     ` Vivek Goyal
2007-12-29  2:00   ` Huang, Ying
  -- strict thread matches above, loose matches on Subject: below --
2007-12-21  7:33 Huang, Ying

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=20071227015716.GA6718@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=nigel@nigel.suspend2.net \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=ying.huang@intel.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.