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.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, 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 6236EC5519F for ; Wed, 18 Nov 2020 09:27:09 +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 BDED321D7E for ; Wed, 18 Nov 2020 09:27:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RPhuqdMc"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="qsrid+z+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDED321D7E 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=E07+CCY4xFoc9HJctWK0Shqo4UKv9h9fUt1UAs+QGcw=; b=RPhuqdMcd6OyWH/roRVW8dDn7 JjWnTpUBx3zQuaw2W8/7P4vgiN3j8IUuyzaAyT+O1uJ85vrwsc358QeXlc5UpRzXyoRG9rFBTaDVP 8CLs/1F3JS/yG+IRODlKWku0GtYpJTmx7viudWMV45MgLJh0/+t7gVND8K9ROkfPZbSZTKta3jiTE 97lQkWm3FlmFLb066Ho4jXeRZrqxPiJlRZFUMKU6cIqbopDMguDWUcYwq9819u4kTkLoB8o787O+L bfnXyAjeF4QMTkIm66m+Gov611wqNy9bCbKXIVZHkUL6sKffiPph+dQIegb9ldT0ygBxweOLe+UK6 qKnZ+9SdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfJit-0002j2-WD; Wed, 18 Nov 2020 09:25:56 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfJis-0002iL-8d for linux-arm-kernel@lists.infradead.org; Wed, 18 Nov 2020 09:25:55 +0000 Received: by mail-wm1-x343.google.com with SMTP id p22so2280923wmg.3 for ; Wed, 18 Nov 2020 01:25:52 -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=X6ZFH7heqse89aEGvMmhzcbSi20z75OlSQMAgPLbESY=; b=qsrid+z+rmZ3dQS0wbdI0bNgj4M5MSLp+gEMgXV6pD107XERnbrCeb4fuwBhnXhhMC KXHYWC1kNKIJwZf7/xLoXfFqgCbE7c7yJinhL5z2ssGTC0kKTYOLhj2uVu+wJGWo5dvF bKfxyw2bfxI+GEnta7thOy7XNgPTU7LaBgO2AVpLbhmzaG4wPNFDr2QN527GIGPTo0Q1 3jFoNmlWzG5xyLLI4l21CFDARG//t9l5aIqjFYnqj8/1USJfj1/jNHLBXFv2Zbu82e2H bDyce1abLLvAKmygjJypUQPKmCk40uitrOiVVix8cWwFTz6HsQiLudWBBn5aw365LAWr 1Ulw== 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=X6ZFH7heqse89aEGvMmhzcbSi20z75OlSQMAgPLbESY=; b=PRndJlC76ErBq/ylrMiDdggtlSKt+Ls7s/pI7G/qi7iB1//DpG71k6D0Wr+sLFuPuI aWujLJKDKsaTu4WBZqqI8iAiwvuzjRXGUGXaQ87PKKMU+lEHU8d3bSP8HGn1TVMALxDO Hri7tPnJYsQ+tUH8VtSLrCm4n/L4xCIvTUsj3PXyhn0vefFKh7fK2sHxY8e3RHpeAQVf gfsAh04HzsenllNbHF6MH4Qk8pZ7tU8aDjSFrn1HWfZJRYG0tJXg69EwMGy6P4z+hlB4 Rdja9rGT+XHI+eRsQTtft2/Z+h+/49rxDwkakeJ00r8/bEJO04HXjcwVwikxLfGrA8x9 R3PA== X-Gm-Message-State: AOAM532HDt7YLHgDByaK82Nv09mj+VrfmmjqhMIpoA6xGY65dTG+w4nT nl3gd0Uz5NBX4vzgQf2KLSuLaA== X-Google-Smtp-Source: ABdhPJyzHPcv8qy3yk+iw5C1CfQhs0U063gy6g1/i2mGk7ekBPYQXw+3gsJbk8sWoUnBUh/4KANvSQ== X-Received: by 2002:a7b:cbc8:: with SMTP id n8mr3370259wmi.124.1605691551308; Wed, 18 Nov 2020 01:25:51 -0800 (PST) Received: from google.com ([2a00:79e0:d:210:f693:9fff:fef4:a7ef]) by smtp.gmail.com with ESMTPSA id t136sm2716518wmt.18.2020.11.18.01.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Nov 2020 01:25:50 -0800 (PST) Date: Wed, 18 Nov 2020 09:25:47 +0000 From: Quentin Perret To: Rob Herring Subject: Re: [RFC PATCH 15/27] of/fdt: Introduce early_init_dt_add_memory_hyp() Message-ID: <20201118092547.GA2031536@google.com> References: <20201117181607.1761516-1-qperret@google.com> <20201117181607.1761516-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-20201118_042554_336841_C9E2BCFC X-CRM114-Status: GOOD ( 19.06 ) 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: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Android Kernel Team , Frank Rowand , Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , open list , James Morse , "moderated list:ARM64 PORT \(AARCH64 ARCHITECTURE\)" , Marc Zyngier , 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 Hi Rob, On Tuesday 17 Nov 2020 at 13:44:53 (-0600), Rob Herring wrote: > Can this be done right after we add all the memblocks using the > memblock API? Possibly, but the thing I'm a bit worried about is the way 'no-map' regions are removed from memblocks early on. The EL2 object needs to know about these parts of memory too (and in fact we may be able to enforce the 'no-map' attribute at the host stage 2 level as well). It's also possible we'll need to have portions of the guests payload preloaded (and verified) by the bootloader into reserved memory regions, possibly no-map, to make sure the host does not mess with them in a normal use-case. So, I couldn't find a much better place than this one but suggestions are very much welcome. I'll have a go at the memblock stuff to see if I find a way to make it work from that angle. > I thought EFI would also need to be handled, but looks > like it just calls early_init_dt_add_memory_arch(). That's odd > especially for ACPI systems... > > I don't really like putting what looks like an arm64 only hook here, > but then I don't want an arm64 version of > early_init_dt_add_memory_arch() either. We're almost to the point of > getting rid of the arch specific ones. But I don't have a better > suggestion currently. Ack, the ugly truth is that this is likely to remain arm64-specific. I figured this was simple enough that we might want to consider it, though. Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel