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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 44B20C43331 for ; Tue, 12 Jan 2021 16:17:41 +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 E75E62242A for ; Tue, 12 Jan 2021 16:17:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E75E62242A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eowrePbGvx0tVYfU01Bt5W5TOYFnaYXJZeQdnp/qaW0=; b=EAxr7WX+FtmmTNnEnTlfX4Swh RxAzftjAshayHdEnZzY9VUna3AXANau8Vxjt/zFvsOZngb/10FfnP6svzu78U008qLmATKJdpwIzf XBwygxZV5HcHyWlbRk5KZ5uV/wJwghg98ZYnPacYPqNUqIt9GgCagvcskTdAC9W8ZkMSylKfbp3K/ ZyV6cvF475A/Ih71XxwpfauzbAzdJc8WFtDvRU/4vQlfLYClltpqzyKpzjwp3jsg6p+dukVzw637R aiWQ+DCy0Yr+A8aRn/ZDK1daj9qGJoQZ0ESg353m16zjdiJZLHsffmL+50HxssqFF9JSgt6VD2rPq qhbbqxAIw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzMKY-0001B6-53; Tue, 12 Jan 2021 16:15:38 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kzMKT-00018W-Nd for linux-arm-kernel@lists.infradead.org; Tue, 12 Jan 2021 16:15:35 +0000 Received: by mail-wr1-x434.google.com with SMTP id t16so3113631wra.3 for ; Tue, 12 Jan 2021 08:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fCwX2K3NvzAcpBSMx6nSsu4wGXEXUGQppC3ZRHgJJR8=; b=T4Suq8sc8lQnpteBsLr6UZxTcH9j8G7kxKlkqFCYGip/iaonBY1bHQ1oEIYiR/mBrZ izvOVjsD3VXx3ixRso71U2wVPQq8ImIzBvHd6GxvlaOsx1nuSaipg0fF+u6HGDyt6ckB 0dHAVNHgwIM41Dhho2dF7YYFhimMSZNmaTuVVek8lqc2dYzTe8OX4XJ81GRotQMkIAgq BzSawYViZz+ddmdHmZnB1C33yqBldAHidvdq/xthmbWU+UpVGfsW7Zi2iBjIcuiGN0nY WzWoLbAvtKuWaZaWMF0JzYi5jMyFcn8VJ0B8CvLDBuOr3fiEoYQOtmLyFCsKDoDVcllQ /+1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fCwX2K3NvzAcpBSMx6nSsu4wGXEXUGQppC3ZRHgJJR8=; b=hmam7JJ9zkmoV0T+h6j3Ce4G2ZM/wt5pA7o4G6kydeawaBbFpzZ8+I+UhNzDf+J+7Z rFmK1NXAqH7IuXzakDMLLrs5cikWd54v4lSVbhjo9u5wcG42W+o3nXQ6/DWIUaWhJ6ZM Z8cJSi4UZbZL8DdFU8i+IB8Rn03CHsG6tloMiBvrEpG5wT+c2dd/2BKBAGUibY+E3k2p 1zKg1Jv68Vi+kdw24BDUVbxmLiytN1CgQP2Qj1ZvFfq4y4ywe35A8fuFbgJQF7LAEYq8 rrHyMfbRj1cjFE+uFrcDYe+gXU2f93iQ8HkazJldaMxvm1cyyAtxiIzVgbGDTfy1JYM8 4okg== X-Gm-Message-State: AOAM533sQBOIuAnn+G31gRGEiAqK83b9y2c2PNvhAPuHNisvW2TH71JC b1RwyUxNzbB9U/RtOsMwccoO8w== X-Google-Smtp-Source: ABdhPJzhdjkHwgzmaGqOq1dE6kZDAT+wivTTIYKEWvX5CDhRyyg51yQJu64CEWkYgKmGA3S/ZHwb0Q== X-Received: by 2002:adf:9525:: with SMTP id 34mr5210739wrs.389.1610468131478; Tue, 12 Jan 2021 08:15:31 -0800 (PST) Received: from google.com (49.222.77.34.bc.googleusercontent.com. [34.77.222.49]) by smtp.gmail.com with ESMTPSA id r82sm4838130wma.18.2021.01.12.08.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 08:15:30 -0800 (PST) Date: Tue, 12 Jan 2021 16:15:28 +0000 From: Quentin Perret To: Rob Herring Subject: Re: [RFC PATCH v2 15/26] of/fdt: Introduce early_init_dt_add_memory_hyp() Message-ID: References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-16-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210112_111533_918411_94356C04 X-CRM114-Status: GOOD ( 31.48 ) 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 Tuesday 12 Jan 2021 at 09:53:36 (-0600), Rob Herring wrote: > On Tue, Jan 12, 2021 at 8:26 AM Quentin Perret wrote: > > > > On Tuesday 12 Jan 2021 at 08:10:47 (-0600), Rob Herring wrote: > > > On Tue, Jan 12, 2021 at 3:51 AM Quentin Perret wrote: > > > > > > > > On Monday 11 Jan 2021 at 08:45:10 (-0600), Rob Herring wrote: > > > > > 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? > > > > > > > > I gave it a go, but as mentioned in v1, I ran into issues for nomap > > > > regions. I want the hypervisor to know about these memory regions (it's > > > > possible some of those will be given to protected guests for instance) > > > > but these seem to be entirely removed from the memblocks when using DT: > > > > > > > > https://elixir.bootlin.com/linux/latest/source/drivers/of/fdt.c#L1153 > > > > > > > > EFI appears to do things differently, though, as it 'just' uses > > > > memblock_mark_nomap() instead of actively removing the memblock. And that > > > > means I could actually use the memblock API for EFI, but I'd rather > > > > have a common solution. I tried to understand why things are done > > > > differently but couldn't find an answer and kept things simple and > > > > working for now. > > > > > > > > Is there a good reason for not using memblock_mark_nomap() with DT? If > > > > not, I'm happy to try that. > > > > > > There were 2 patches to do that, but it never got resolved. See here[1]. > > > > Thanks. So the DT stuff predates the introduction of memblock_mark_nomap, > > that's why... > > > > By reading the discussions, [1] still looks a sensible patch on its own, > > independently from the issue Nicolas tried to solve. Any reason for not > > applying it? > > As I mentioned in the thread, same patch with 2 different reasons. So > I just wanted a better commit message covering both. Sorry if I'm being thick, but I'm not seeing it. How are they the same? IIUC, as per Nicolas' last reply, using memblock_mark_nomap() does not solve his issue with a broken DT. These 2 patches address two completely separate issues no? Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel