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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF736C433F5 for ; Thu, 14 Apr 2022 10:22:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 357046B0071; Thu, 14 Apr 2022 06:22:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E1A86B0073; Thu, 14 Apr 2022 06:22:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 159B36B0074; Thu, 14 Apr 2022 06:22:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 01EA36B0071 for ; Thu, 14 Apr 2022 06:22:56 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id CEBD525AFB for ; Thu, 14 Apr 2022 10:22:56 +0000 (UTC) X-FDA: 79355096352.23.39D207F Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 4044C120004 for ; Thu, 14 Apr 2022 10:22:56 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A0AA61ED3 for ; Thu, 14 Apr 2022 10:22:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CAA6C385A1 for ; Thu, 14 Apr 2022 10:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649931775; bh=UP2ZdlXMZjXTQwi2bJVC42wnwXESiNxV1SL51CcDxJ4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GD+MGEFMcaEcUiE4pFICDgo5qL5I9a93+3inGuJJRA+rEuFYdq4AR+GP6XMWs9S1o qSm6AH64PS6x4LT/ARBY/1alAwtPBB1Rn9r8yVoVmovI1lKUP8iZofUj83lrUs0S/7 3XkFUc2sZN+eNKyFU3HiP1AxilXoeBDB94YNrPRdioYVwLII/RdUCuxIzsB9MpO/ND OH4MuIUbsTBSz3Q4WmNcZNRjTGyiQAMypRPQ9/2hzDSbAykQW/zkjONxnGnZP+59C5 28XEA4l1FtdFM0F1O5lYdnv9k7CuJOGx/LONhWtN++GdL5gkwb4FlpOVsZP5aP+8Ka gVJ/Rfi5rpmRQ== Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-df02f7e2c9so4774670fac.10 for ; Thu, 14 Apr 2022 03:22:55 -0700 (PDT) X-Gm-Message-State: AOAM5322uxul5YuvoZvZxJGen8DJLQ1KGoXmyNCukqRf61mlObBO2n3g 48yOIhaMjD90M0T0ASFV6L4zTUAh+VYOnwIZcBg= X-Google-Smtp-Source: ABdhPJwuW/8OUefFVmTgDz0hNVBCeNt8JTQEdxC3MramBRSaVXc+L6rpKEN0PLTlAXUWxqPUmRp0FgtWen5kuG48Mns= X-Received: by 2002:a05:6870:eaa5:b0:da:b3f:2b45 with SMTP id s37-20020a056870eaa500b000da0b3f2b45mr1308766oap.228.1649931763538; Thu, 14 Apr 2022 03:22:43 -0700 (PDT) MIME-Version: 1.0 References: <20220414101314.1250667-1-mawupeng1@huawei.com> In-Reply-To: <20220414101314.1250667-1-mawupeng1@huawei.com> From: Ard Biesheuvel Date: Thu, 14 Apr 2022 12:22:31 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 0/9] introduce mirrored memory support for arm64 To: Wupeng Ma Cc: Andrew Morton , Catalin Marinas , Will Deacon , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , X86 ML , hpa@zyccr.com, Darren Hart , Andy Shevchenko , Mike Rapoport , "Paul E. McKenney" , Peter Zijlstra , Joerg Roedel , songmuchun@bytedance.com, macro@orcam.me.uk, Frederic Weisbecker , W_Armin@gmx.de, John Garry , Sean Christopherson , Thomas Bogendoerfer , Anshuman Khandual , chenhuacai@kernel.org, David Hildenbrand , gpiccoli@igalia.com, Mark Rutland , Kefeng Wang , Linux Doc Mailing List , Linux Kernel Mailing List , Linux ARM , linux-efi , linux-ia64@vger.kernel.org, platform-driver-x86@vger.kernel.org, Linux Memory Management List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 4044C120004 X-Stat-Signature: b1mrsyeyiqizcapx4xahaa7sw617ct4k Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=GD+MGEFM; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.hostedemail.com: domain of ardb@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=ardb@kernel.org X-Rspam-User: X-HE-Tag: 1649931776-163590 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, 14 Apr 2022 at 11:54, Wupeng Ma wrote: > > From: Ma Wupeng > > Commit b05b9f5f9dcf ("x86, mirror: x86 enabling - find mirrored memory ranges") > introduced mirrored memory support for x86. This support rely on UEFI to > report mirrored memory address ranges. See UEFI 2.5 spec pages 157-158: > > http://www.uefi.org/sites/default/files/resources/UEFI%202_5.pdf > > Memory mirroring is a technique used to separate memory into two separate > channels, usually on a memory device, like a server. In memory mirroring, > one channel is copied to another to create redundancy. This method makes > input/output (I/O) registers and memory appear with more than one address > range because the same physical byte is accessible at more than one > address. Using memory mirroring, higher memory reliability and a higher > level of memory consolidation are possible. > > Arm64 can support this too. So mirrored memory support is added to support > arm64. > > Efi_fake_mem is used for testing mirrored features and will not be used in > production environment. This test features can fake memory's attribute > values. > > The reason why efi_fake_mem support is put first is that memory's attribute > is reported by BIOS which is hard to simulate. With this support, any arm64 > machines with efi support can easily test mirrored features. > > The main purpose of this patchset is to introduce mirrored support for > arm64 and we have already fixed the problems we had which is shown in > patch #5 to patch #7 and try to bring total isolation in patch #8 which > will disable mirror feature if kernelcore is not specified. > > In order to test this support in arm64: > - patch this patchset > - add efi_fake_mem=8G@0:0x10000 in kernel parameter to simulate mirrored > memroy between phy addr 0-8G. > - add kernelcore=mirror in kernel parameter > - start you kernel > As I explained before: - NAK to EFI fake_mem support on arm64 - NAK to the whole series until you come up with a proposal on how to locate the static kernel image itself into more reliable memory, as there is really no point to any of this otherwise.