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=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 DD9B6C433E0 for ; Mon, 11 Jan 2021 14:46:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9A2B12255F for ; Mon, 11 Jan 2021 14:46:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A2B12255F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ky+3pN1oOzInPWCI3MEWkMTFqA1HMF1r8PifV5rHE1E=; b=OHEr+5cX5n1KuVOjc4l5kJMOh gKnLsiWFrBbxQmJ0d9HTIAI1Ct0SfpZqX0uBgOzXDWr17d5FHXxfJxhIgxHhjZbf5LMVn2VwW9TV4 taXSbLdkiHUaVd4FdMeY+0Zu9VCjxqQ8Pq29b0UZ3spsK1BFZDsFzt4tPkK6XnlfKsWDA1VX8Kdy7 /mYmNhbTft6AkiHbKYGywL7AVPgzdFultc8p7WAg+sLwJLXTR1HO7ztWTxLj7EqHi3C4GK72zMnzd zkV7ATzv6hnOEpBiCLBGfv7X/CNoFC0XtDKOy4KivuDB1Js0/2jP7HyF1yEHVrTgQm3xD0jSPalj/ Ss8vzsE9g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyyRj-00036s-HV; Mon, 11 Jan 2021 14:45:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kyyRg-00035j-77 for linux-arm-kernel@lists.infradead.org; Mon, 11 Jan 2021 14:45:25 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id B840222795 for ; Mon, 11 Jan 2021 14:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610376322; bh=l6ToqVwqm3E7ql9O4XRtENEPRhqlUUCrKobd4xM3lgg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uZZApSfe3FBkwQ18jphBQE5TJf9VCYIcQg1oER0tBBAyxp29dxOxPD2ljGcZiwXvb QisYFN8GIZkXjZMiKHlRGvFQQJEjYRAFn9JDenRW8Kwcn0XE4cuPc1xasD9RFWdLCZ rEpzO7GRrDHPDyIkZ0TND+BTEwx39IlCN3wmZ0sBzwV6F6nqbwkA/ovLdCtGuozEBd dlmaNpQSDPgkq96V2JO3lBcHV8CdHNP8D18tz6LrkF7L9V56DMhVZ4yCokdo/G1F6Z L2/aA4Hu1SWwVage5ZwkLSzXgMq1OdlaUENqFCM4kKga+DZFq3vfMk2Sdtgb2FqlBH xzP5UFzB1v3uQ== Received: by mail-qv1-f49.google.com with SMTP id j18so7491630qvu.3 for ; Mon, 11 Jan 2021 06:45:22 -0800 (PST) X-Gm-Message-State: AOAM5310BP8BuI/rW71vomUtYzEnEaOhE3CIwGpmIdmycSnGbwPhHO84 EiYpV+JNb01lL6PzQeyKoNvjGU9q6YVmAEzDCA== X-Google-Smtp-Source: ABdhPJymgMsMHFwjNXskq64kJCyaSLMJ3Do+hKilu0I/FvQeFX2WQUWySyGObrImhXuZnCRNVT6HEOiCX2LEoJH6Aqs= X-Received: by 2002:a0c:fe47:: with SMTP id u7mr13111qvs.4.1610376321947; Mon, 11 Jan 2021 06:45:21 -0800 (PST) MIME-Version: 1.0 References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-16-qperret@google.com> In-Reply-To: <20210108121524.656872-16-qperret@google.com> From: Rob Herring Date: Mon, 11 Jan 2021 08:45:10 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 15/26] of/fdt: Introduce early_init_dt_add_memory_hyp() To: Quentin Perret X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210111_094524_327865_BF43E973 X-CRM114-Status: GOOD ( 17.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Android Kernel Team , Frank Rowand , Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , Fuad Tabba , "linux-kernel@vger.kernel.org" , James Morse , linux-arm-kernel , Marc Zyngier , David Brazdil , Will Deacon , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 \(KVM/arm64\)" , Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jan 8, 2021 at 6:16 AM Quentin Perret wrote: > > Introduce early_init_dt_add_memory_hyp() to allow KVM to conserve a copy > of the memory regions parsed from DT. This will be needed in the context > of the protected nVHE feature of KVM/arm64 where the code running at EL2 > will be cleanly separated from the host kernel during boot, and will > need its own representation of memory. What happened to doing this with memblock? > Signed-off-by: Quentin Perret > --- > drivers/of/fdt.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c > index 4602e467ca8b..af2b5a09c5b4 100644 > --- a/drivers/of/fdt.c > +++ b/drivers/of/fdt.c > @@ -1099,6 +1099,10 @@ int __init early_init_dt_scan_chosen(unsigned long node, const char *uname, > #define MAX_MEMBLOCK_ADDR ((phys_addr_t)~0) > #endif > > +void __init __weak early_init_dt_add_memory_hyp(u64 base, u64 size) > +{ > +} > + > void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) > { > const u64 phys_offset = MIN_MEMBLOCK_ADDR; > @@ -1139,6 +1143,7 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size) > base = phys_offset; > } > memblock_add(base, size); > + early_init_dt_add_memory_hyp(base, size); > } > > int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size) > -- > 2.30.0.284.gd98b1dd5eaa7-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel