From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31F38C11D07 for ; Thu, 20 Feb 2020 09:21:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E05392465D for ; Thu, 20 Feb 2020 09:21:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="K3suDMIO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E05392465D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7C9716B0005; Thu, 20 Feb 2020 04:21:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7534A6B0006; Thu, 20 Feb 2020 04:21:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 619886B0007; Thu, 20 Feb 2020 04:21:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0093.hostedemail.com [216.40.44.93]) by kanga.kvack.org (Postfix) with ESMTP id 42E646B0005 for ; Thu, 20 Feb 2020 04:21:45 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 23B778789 for ; Thu, 20 Feb 2020 09:21:45 +0000 (UTC) X-FDA: 76509962970.13.slope77_496f60a5d264f X-HE-Tag: slope77_496f60a5d264f X-Filterd-Recvd-Size: 4015 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Thu, 20 Feb 2020 09:21:44 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42F4D24683 for ; Thu, 20 Feb 2020 09:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582190503; bh=o7emLQ8G4ybHBADSYTkl7UcF8plupI0v+fzIXCTR3s0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=K3suDMIOMPfg0PyCMSwGTsI6vmhxg3dG7cTiQPqDNHyGwHzOTvd6OceOzoQIXrQ+t hhIm7PK1PLr5nFZLfm2vI63EGcUi4bkeMibxf0jVsTd+eCBXwAc1QexlWya+zkNvRf ThtTaAf5zvF+7DEEaOE99l+LCdIGsTjhOaPpe7vk= Received: by mail-wm1-f42.google.com with SMTP id t23so1187944wmi.1 for ; Thu, 20 Feb 2020 01:21:43 -0800 (PST) X-Gm-Message-State: APjAAAXFcsDmf804xaN5LZOYpvYapoF2/SDeqmPboEfv5PURFjbjFPM0 jt+l/lS/2mJw1vVhEmBvPA/yU4MkOEe87pnjgXYTog== X-Google-Smtp-Source: APXvYqylKi+HKLokR0+lqgERlKcgEjSrkJqeR5Xg1UtM54odKXFIDNYSdZxM+tDoCulLawQ2Z1FxlrES8lM3xvPTQGI= X-Received: by 2002:a1c:bc46:: with SMTP id m67mr3245339wmf.40.1582190501386; Thu, 20 Feb 2020 01:21:41 -0800 (PST) MIME-Version: 1.0 References: <1582289580-24045-1-git-send-email-jingxiangfeng@huawei.com> In-Reply-To: <1582289580-24045-1-git-send-email-jingxiangfeng@huawei.com> From: Ard Biesheuvel Date: Thu, 20 Feb 2020 10:21:29 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/2] arm64: Support to find mirrored memory ranges To: Jing Xiangfeng Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Darren Hart , Andy Shevchenko , linux-efi , Linux Kernel Mailing List , platform-driver-x86@vger.kernel.org, Linux-MM , Kefeng Wang Content-Type: text/plain; charset="UTF-8" X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 20 Feb 2020 at 04:43, Jing Xiangfeng wrote: > > This series enable finding mirrored memory ranges > functionality on arm64 platform. This feature has been > implemented on the x86 platform, so we move some > functions from x86. > Hello Jing Xiangfeng, Could you explain your use case a bit better? Usually, the firmware is a better place to make modifications to the EFI memory map. The reason I am asking is that currently, on ARM and arm64, we never make *any* changes to the firmware provided tables (EFI system table, EFI memory map, DT/ACPI/SMBIOS tables etc), in order to ensure that kexec is idempotent, i.e., it will always see the exact same state as far as the firmware is concerned. This is a bit different from x86, where the memory map is already modified for various other reasons, so using it for fake memory regions is not such a big deal. Do you see a use case for this in production? > Jing Xiangfeng (2): > efi: allow EFI_FAKE_MEMMAP on arm64 platform > arm64/efi: support to find mirrored memory ranges > > arch/x86/include/asm/efi.h | 5 ----- > arch/x86/platform/efi/efi.c | 39 --------------------------------------- > drivers/firmware/efi/Kconfig | 2 +- > drivers/firmware/efi/arm-init.c | 2 ++ > drivers/firmware/efi/efi.c | 23 +++++++++++++++++++++++ > drivers/firmware/efi/memmap.c | 16 ++++++++++++++++ > include/linux/efi.h | 5 +++++ > 7 files changed, 47 insertions(+), 45 deletions(-) > > -- > 1.8.3.1 >