public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] kdump: Allow ELF header creation in new kernel
@ 2013-05-22 17:58 Michael Holzheu
  2013-05-22 17:58 ` [PATCH v2 1/3] kdump: Introduce ELF header in new memory feature Michael Holzheu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michael Holzheu @ 2013-05-22 17:58 UTC (permalink / raw)
  To: Vivek Goyal
  Cc: Heiko Carstens, kexec, Jan Willeke, linux-kernel,
	Martin Schwidefsky, Michael Holzheu

Hello Vivek,

Here the 2nd version of the patch set. We tried to implement the
function using the arch_get/free_crash_header() weak function as
you suggested. We kept the ELFCORE_ADDR_NEWMEM define so that
is_kdump_kernel() also works for our case.

ChangeLog
=========
v1 => v2)

- Rebase 3.10-rc2 + vmcore mmap patches
- Introduced arch_get/free_crash_header() and ELFCORE_ADDR_NEWMEM

Feature Description
===================
For s390 we want to use /proc/vmcore for our SCSI stand-alone
dump (zfcpdump). We have support where the first HSA_SIZE bytes are
saved into a hypervisor owned memory area (HSA) before the kdump
kernel is booted. When the kdump kernel starts, it is restricted
to use only HSA_SIZE bytes.

The advantages of this mechanism are:

* No crashkernel memory has to be defined in the old kernel.
* Early boot problems (before kexec_load has been done) can be dumped 
* Non-Linux systems can be dumped.

We modify the s390 copy_oldmem_page() function to read from the HSA memory
if memory below HSA_SIZE bytes is requested.

Since we cannot use the kexec tool to load the kernel in this scenario,
we have to build the ELF header in the 2nd (kdump/new) kernel.

So with the following patch set we would like to introduce the new
function that the ELF header for /proc/vmcore can be created in the 2nd
kernel memory.

The following steps are done during zfcpdump execution:

1.  Production system crashes
2.  User boots a SCSI disk that has been prepared with the zfcpdump tool
3.  Hypervisor saves CPU state of boot CPU and HSA_SIZE bytes of memory into HSA
4.  Boot loader loads kernel into low memory area
5.  Kernel boots and uses only HSA_SIZE bytes of memory
6.  Kernel saves registers of non-boot CPUs
7.  Kernel does memory detection for dump memory map
8.  Kernel creates ELF header for /proc/vmcore
9.  /proc/vmcore uses this header for initialization
10. The zfcpdump user space reads /proc/vmcore to write dump to SCSI disk
    - copy_oldmem_page() copies from HSA for memory below HSA_SIZE
    - copy_oldmem_page() copies from real memory for memory above HSA_SIZE

---
Jan Willeke (1):
  s390/kdump: Use vmcore for zfcpdump

Michael Holzheu (2):
  kdump: Introduce ELF header in new memory feature
  s390/kdump: Use arch function call for kdump

 arch/s390/Kconfig             |   3 +-
 arch/s390/include/asm/sclp.h  |   1 +
 arch/s390/kernel/crash_dump.c | 126 +++++++++++++++++++++++++++++++-----------
 drivers/s390/char/zcore.c     |   6 +-
 fs/proc/vmcore.c              |  80 +++++++++++++++++++++------
 include/linux/crash_dump.h    |   3 +
 6 files changed, 164 insertions(+), 55 deletions(-)

-- 
1.8.1.6


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

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

end of thread, other threads:[~2013-05-23 18:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22 17:58 [PATCH v2 0/3] kdump: Allow ELF header creation in new kernel Michael Holzheu
2013-05-22 17:58 ` [PATCH v2 1/3] kdump: Introduce ELF header in new memory feature Michael Holzheu
2013-05-23 17:41   ` Vivek Goyal
2013-05-23 18:52     ` Michael Holzheu
2013-05-23 18:57       ` Vivek Goyal
2013-05-22 17:58 ` [PATCH v2 2/3] s390/kdump: Use arch function call for kdump Michael Holzheu
2013-05-22 17:58 ` [PATCH v2 3/3] s390/kdump: Use vmcore for zfcpdump Michael Holzheu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox