Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3449340imm; Tue, 4 Sep 2018 23:48:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYs8Hm3ebj2gNmMgK69iXZh6245esuFNUD3/0w+NP/RZIMmgX9RBpv0483D0+yN1BdwK6TD X-Received: by 2002:a62:d8c4:: with SMTP id e187-v6mr1438577pfg.113.1536130112149; Tue, 04 Sep 2018 23:48:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536130112; cv=none; d=google.com; s=arc-20160816; b=ICcFPhvpmzN+JFBFVn+nF32kTcjdMzK0pd8KCbKPT2MUni5YIBUOKmduHoogX+5GWe 4nW7vYKWLw8xPnZenXFr7XACxAuNMeo+6vKeTSg3qJnQLkQw2O2rc193rRf9Bv4zr8r1 JHl210bDcoQlKTefthkNhXeTtivs2UHi3RIFn4Pb5V0tz+WQMyUpg1jspQrnxz1EZT/T zgA+hKYdcOAJ+BYN/S2lGDnLcZtisc3NANG3LFBZRiQWuxkOB0ZNcwqsHsoYj88qzDbn VcAZd7cZuDehVu0bL3+wi8EqvAOomlt/i34qNxvacqCmE9qa3H31xLMusR9nufNVOReD 6hdQ== 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=dxevBE1exHZ3MNbjSOG2/Rse6DH/Ma5Kss1jpdjVHFw=; b=UN2Dw9dgk/aSktbtqa3EgC5V8IolOT7yDRKlcbJUn6H730u6LGoyWajXEPM0Lh6VEP 2VuMjUUGqvWfOcjz58h2wn0R2ojtlIecrWxPyFcqZ5p+6NPw0UFc+ivqaRo1hhsPbdRQ Uo5T/ziYvO6jmKF5HNS9nDIyVWfxKiB6fo/ohwYIhbKLbmlVTrmKCysR3wCAOJoTxUB0 r4a/mLy+gENWqn1yQNCnFSsfJKlUdQSs0njgXjKJoq60Zj/dNQzxgoGkGcJI/1b+2cB2 xtLXkGYRxZE90VYNgE6xDVPBxwq5jRjBHr6xhfhepW9+/NNftLkM5TuPjrWcukCSShP9 nf7w== 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 d10-v6si1127187pla.436.2018.09.04.23.48.15; Tue, 04 Sep 2018 23:48:32 -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 S1727154AbeIELPu (ORCPT + 99 others); Wed, 5 Sep 2018 07:15:50 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726215AbeIELPu (ORCPT ); Wed, 5 Sep 2018 07:15:50 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6343F4023351; Wed, 5 Sep 2018 06:47:08 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-101.pek2.redhat.com [10.72.12.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ADAE5B27B4; Wed, 5 Sep 2018 06:47:02 +0000 (UTC) Date: Wed, 5 Sep 2018 14:46:58 +0800 From: Dave Young To: lijiang Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, tglx@linutronix.de, hpa@zytor.com, ebiederm@xmission.com, joro@8bytes.org, thomas.lendacky@amd.com, kexec@lists.infradead.org, iommu@lists.linux-foundation.org, bhe@redhat.com, Ard Biesheuvel , linux-efi Subject: Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask Message-ID: <20180905064658.GA10310@dhcp-128-65.nay.redhat.com> References: <20180831081930.31561-1-lijiang@redhat.com> <20180831081930.31561-3-lijiang@redhat.com> <20180903024512.GA2568@dhcp-128-65.nay.redhat.com> <20180904004417.GA9842@dhcp-128-65.nay.redhat.com> <20180904012902.GB9842@dhcp-128-65.nay.redhat.com> <20180904015131.GA10877@dhcp-128-65.nay.redhat.com> <3a9ae246-0c3a-753a-41e2-f2788a882c50@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3a9ae246-0c3a-753a-41e2-f2788a882c50@redhat.com> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 05 Sep 2018 06:47:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 05 Sep 2018 06:47:08 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dyoung@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [snip] > > As previously mentioned, there are also many differences between kexec and kdump. In general, > kexec needs to look at all of available physical memory, but kdump doesn't need. > > For kexec, kexec-tools will read /sys/firmware/memmap and recreate the e820 ranges for the 2nd > kernel. If it fails, will use /proc/iomem. > > For kdump, kexec-tools will read /proc/iomem and recreate the e820 ranges for kdump kernel. > BTW: we can not get the range of persistent memory from /proc/iomem. So e820 ranges don't contain > the persistent memory in kdump kernel, this is the real reason why i need to strengthen the logic > of adjusting memory encryption mask. "persistent memory" is different, I think you meant about some reserved memory instead > > If kexec-tools also use /sys/firmware/memmap for kdump(like kexec), kdump kernel can also work > without a fix, but the kexec-tools will have to be modified. Are you sure that you want me to > fix kexec-tools instead of kernel? Yes, please fix kexec-tools to pass reserved ranges in e820, you will not need this patch then. Thanks Dave