Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3857901imm; Wed, 5 Sep 2018 07:08:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbqO7QgwY6G3nXgodEPlL3Z2IKMXDBzUas0AZ5LjBy54ZyoE1BasAb8sO6swmx1/guig729 X-Received: by 2002:a17:902:5acc:: with SMTP id g12-v6mr39368230plm.90.1536156486534; Wed, 05 Sep 2018 07:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536156486; cv=none; d=google.com; s=arc-20160816; b=nnf7YNB/IG6mNfsEs7ilFLkvPI1NXDcK9937OBTaH423bBeLgl1cwPrB1ZzIqCrB3s LJECOS6SSl/mPyF+4Bczwbmtt1tbPtPAcCQEesKZ4TS+l/t4NyR97jmgXLgxD5lj4hse b+tzssyqbJ7ToVz4et34l/jVHSE/l5tYnSXF/eRh2v4xfhAZpoYaBicn8a4uxdpkh5KJ 5wQr34AsCOldSQXzg1OOkixFF13bcRXr4fj1NubderxkVt6xP6YKltlYkB7XNI4ONlgJ uKc0bHiB9logyGdHbj95X7NxlTd/IfenUjdv//7tv9J87YLYhi8fQX8r4BBn0lZm1rSu GRxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CSvq9ZZkgyaAnLeHajkSC1AzwmQOvEurf/bhfeiTZs4=; b=iRKcSwxetiToJj7Y7zW5dZVMdbthRLuRc0YpBvddAzMGndmzelZ4NNdhEvNDfpKkoA s6BJqijloVvbl4c1DydEFdKIkoDxfHq8disbgILf6F2KoW8qJoaHyynyRlkPwjSiNNYF bb7sbxAOK3muoyMTFhIPoODKZ6JtOouvgTakcggqH8Uaw39HR7Ilz5O4wJ0LzN1Sv8oB YUOKC5kJ1nnJcMArX2Z3GvySVxbqYlqLAXkEU51AFFZ3sI5eR/1DIPvVYdflSv0Civwk GopVEFPMpS/BbTJrTXDLbT112gPhdMKXluyrFK0euqwvFwfmEoEjESCJN70grnIwidhN KK2w== 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 y6-v6si2151530pgr.684.2018.09.05.07.07.50; Wed, 05 Sep 2018 07:08:06 -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 S1727674AbeIESf2 (ORCPT + 99 others); Wed, 5 Sep 2018 14:35:28 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47034 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726008AbeIESf1 (ORCPT ); Wed, 5 Sep 2018 14:35:27 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99F747721E; Wed, 5 Sep 2018 14:05:05 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-65.pek2.redhat.com [10.72.12.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCE022027069; Wed, 5 Sep 2018 14:04:53 +0000 (UTC) Subject: Re: [PATCH 2/5 V6] x86/ioremap: strengthen the logic in early_memremap_pgprot_adjust() to adjust encryption mask To: Dave Young 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 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> <20180905064658.GA10310@dhcp-128-65.nay.redhat.com> From: lijiang Message-ID: Date: Wed, 5 Sep 2018 22:04:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180905064658.GA10310@dhcp-128-65.nay.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 05 Sep 2018 14:05:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 05 Sep 2018 14:05:05 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lijiang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2018年09月05日 14:46, Dave Young 写道: > [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. > This might be a kexec-tools bug, i have posted a patch for kexec-tools(please check kexec@lists.infradead.org). Thanks. > Thanks > Dave >