From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from e06smtp18.uk.ibm.com ([195.75.94.114]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UZLBS-000430-FN for kexec@lists.infradead.org; Mon, 06 May 2013 13:10:27 +0000 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 6 May 2013 14:05:57 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0083917D8019 for ; Mon, 6 May 2013 14:11:03 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4076.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r46D9ojQ40370186 for ; Mon, 6 May 2013 13:09:50 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r46D9x8d012073 for ; Mon, 6 May 2013 07:10:00 -0600 From: Michael Holzheu Subject: [PATCH 0/4] kdump: Allow ELF header creation in new kernel Date: Mon, 6 May 2013 15:09:55 +0200 Message-Id: <1367845799-29125-1-git-send-email-holzheu@linux.vnet.ibm.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=twosheds.infradead.org@lists.infradead.org To: Vivek Goyal Cc: kexec@lists.infradead.org, Heiko Carstens , linux-kernel@vger.kernel.org, Jan Willeke , Martin Schwidefsky , Michael Holzheu Hello Vivek, 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 ELFCORE_ADDR_NEWMEM for zfcpdump Michael Holzheu (3): kdump: Introduce ELFCORE_ADDR_NEWMEM s390/kdump: Use ELFCORE_ADDR_NEWMEM for kdump kdump: Merge set_vmcore_list_offsets_elf64/elf32/newmem arch/s390/Kconfig | 3 +- arch/s390/include/asm/sclp.h | 1 + arch/s390/kernel/crash_dump.c | 103 +++++++++++++++++++++++++++--------------- arch/s390/kernel/setup.c | 2 +- drivers/s390/char/zcore.c | 6 +-- fs/proc/vmcore.c | 89 ++++++++++++++++++++++-------------- include/linux/crash_dump.h | 4 +- 7 files changed, 131 insertions(+), 77 deletions(-) -- 1.8.1.6 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec