Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752528AbbHRIxh (ORCPT ); Tue, 18 Aug 2015 04:53:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55283 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751464AbbHRIxf (ORCPT ); Tue, 18 Aug 2015 04:53:35 -0400 Date: Tue, 18 Aug 2015 16:53:30 +0800 From: Baoquan He To: Toshi Kani Cc: dan.j.williams@intel.com, hch@lst.de, linux-nvdimm@ml01.01.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: kexec, x86: Need a new e820 type support for kexec Message-ID: <20150818085330.GB15480@dhcp-128-28.nay.redhat.com> References: <1437697592.3214.373.camel@hp.com> <20150806081231.GA16699@dhcp-128-28.nay.redhat.com> <1438910038.3109.116.camel@hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438910038.3109.116.camel@hp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1843 Lines: 42 On 08/06/15 at 07:13pm, Toshi Kani wrote: > On Thu, 2015-08-06 at 16:12 +0800, Baoquan He wrote: > E820_PMEM cannot be emulated by the "memmap=" option. Do you have to use > the "memmap=" options to pass the ranges for kdump kernel? If so, I'd > rather ignore E820_PMEM and let it be passed as E820_RESERVED. The kdump > kernel can still obtain the info from NFIT if necessary. > > As for the code change... > > > @@ -640,6 +644,8 @@ static void cmdline_add_memmap_internal(char *cmdline, > > unsigned long startk, > > strcat (str_mmap, "K$"); > > else if (type == RANGE_ACPI || type == RANGE_ACPI_NVS) > > strcat (str_mmap, "K#"); > > + else if (type == RANGE_PMEM || type == RANGE_PRAM) > > + strcat (str_mmap, "K!"); > > It should only check with RANGE_PRAM, but I do not think this change matters > much unless you also modify the caller cmdline_add_memmap(), which has the > following check to skip other types. I do not think we will use legacy > NVDIMM device as a dump device, so you may ignore RANGE_PRAM and let it be > passed as RESERVED as well (which is likely the case I tested with). Rethink it again, maybe it's better to pass PMEM as PRAM to kdump kernel if user really want to use memmap way by specifying --pass-memmap-cmdline. Then I need add the PMEM and PRAM checking here you pointed out. Will repost with them. > > /* Only adding memory regions of RAM and ACPI */ > if (type != RANGE_RAM && > type != RANGE_ACPI && > type != RANGE_ACPI_NVS) > continue; > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/