Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4709007imm; Mon, 17 Sep 2018 20:21:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYmh5CJK+Vu2D1/xopf8jYl5mDx+LSMttEfhka+RUtFgO8rPJQO8QswJhGrH2L5HFuSzbsd X-Received: by 2002:a17:902:9b92:: with SMTP id y18-v6mr27138522plp.239.1537240884751; Mon, 17 Sep 2018 20:21:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537240884; cv=none; d=google.com; s=arc-20160816; b=zkfagVxFHT9QKO1X9kKMrBx2QT/UtHENUlFBFrNDgvVH1AHSROpEY99ZrKZITmREAV CS4YO4PLnBwzNec8TMRIqlsns52P9YXBYSgvof2Iq8tXkE87R3gwbicBctPp7WcdeeLH hbRtEAGUCXTBsUprke++KqGUw5IHFBzNowWfNow5MzC50Ud98fJeihfbue9yBtehnI/N FV9IRXqSu7NEWeXc4m7g/CWVyNmhqjbmHUddWB2vusywbqczeAN4oSX69txKVsh+tAO4 3Wtl1y0W3EgV76qVje2cso3pQo6PaH1rCj3drXiof3H5quRVAdcdNX68puFSTg405970 SkUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=cneAsUU/fytJmAxdY2cHhN4ApA1KSB2LyvG8LzstooQ=; b=cfaS59nznexN4u0T4dcdVFL2+EKCVPYqtWam4XG0tcIl3ITa+8H11RFrmiRWU3IeL0 2HgpOmxTBEmexyvSt0ztfuY891OYzjM8WieigVyS3trnfpUpUHRJvyC+jOla9++Dl9KO eFxnM+02ybqf5kqLtEAXE7jEqUIxeDphGl3UnpIXDiEmpe0e+CYI9sz/CgDRAVgk62cc RKZBE4fBdkED++AX/K+Ap1NHREP1o5wKi+EZiGNRFsHmRbLtb6Be/Aj8wvcvGr0E36yO 6629FiFF4oa6Fpmp+E0QImLowUUoK/rJtS4OVeNMggnfD5bdKtaIta9/hYbqXiPawraQ lKPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d128-v6si18681028pfc.211.2018.09.17.20.21.10; Mon, 17 Sep 2018 20:21:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729098AbeIRIvE (ORCPT + 99 others); Tue, 18 Sep 2018 04:51:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46758 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbeIRIvE (ORCPT ); Tue, 18 Sep 2018 04:51:04 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 56CAC81F09; Tue, 18 Sep 2018 03:20:33 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-25.pek2.redhat.com [10.72.12.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27868277C7; Tue, 18 Sep 2018 03:20:27 +0000 (UTC) Date: Tue, 18 Sep 2018 11:20:24 +0800 From: Dave Young To: Lianbo Jiang Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, akpm@linux-foundation.org Subject: Re: [PATCH 2/2] x86/kexec_file: add reserved e820 ranges to 2nd kernel e820 table Message-ID: <20180918032024.GA22528@dhcp-128-65.nay.redhat.com> References: <20180918024837.17710-1-lijiang@redhat.com> <20180918024837.17710-3-lijiang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918024837.17710-3-lijiang@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 18 Sep 2018 03:20:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/18/18 at 10:48am, Lianbo Jiang wrote: > e820 reserved ranges is useful in kdump kernel, we have added this in > kexec-tools code. > > One reason is PCI mmconf (extended mode) requires reserved region > otherwise it falls back to legacy mode. > > When AMD SME kdump support, it needs to map dmi table area as unencrypted. > For normal boot these ranges sit in e820 reserved ranges thus the early > ioremap code naturally map them as unencrypted. So if we have same e820 > reserve setup in kdump kernel then it will just work like normal kernel. > > Signed-off-by: Dave Young > Signed-off-by: Lianbo Jiang > --- > arch/x86/kernel/crash.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c > index 3c113e6545a3..db453e9c117b 100644 > --- a/arch/x86/kernel/crash.c > +++ b/arch/x86/kernel/crash.c > @@ -384,6 +384,12 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params) > walk_iomem_res_desc(IORES_DESC_ACPI_NV_STORAGE, flags, 0, -1, &cmd, > memmap_entry_callback); > > + /* Add all reserved ranges */ > + cmd.type = E820_TYPE_RESERVED; > + flags = IORESOURCE_MEM; Lianbo, rethink about this, we will miss other io resource types if only match IORESOURCE_MEM here, can you redo the patch with just using "0" for the passing flags? > + walk_iomem_res_desc(IORES_DESC_NONE, flags, 0, -1, &cmd, > + memmap_entry_callback); > + > /* Add crashk_low_res region */ > if (crashk_low_res.end) { > ei.addr = crashk_low_res.start; > -- > 2.17.1 >