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=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,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 93CD3C63777 for ; Wed, 18 Nov 2020 09:25:57 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id AD1B22467D for ; Wed, 18 Nov 2020 09:25:56 +0000 (UTC) Authentication-Results: mail.kernel.org; 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 AD1B22467D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B0B064B5B5; Wed, 18 Nov 2020 04:25:55 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KxwY4rogcrJu; Wed, 18 Nov 2020 04:25:54 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id B01EB4B5CC; Wed, 18 Nov 2020 04:25:54 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A58C74B5B0 for ; Wed, 18 Nov 2020 04:25:53 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zfrOJDFwbI8e for ; Wed, 18 Nov 2020 04:25:52 -0500 (EST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 7D1104B5AD for ; Wed, 18 Nov 2020 04:25:52 -0500 (EST) Received: by mail-wm1-f68.google.com with SMTP id 1so2019087wme.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=m9JSgFRkn6cR/IPEwNq3Woeu0lhYRXR/s7EEqSUFd278BpsUPES6b4gXOCp3z89h+C RD2rtKEZ3xJUTx4MSjhDhePpZiCMwAiS/ArtrXpTp8WwDAwqPYkZnJyBZ1aSHuqI7eJj LHVV3+eQyiClor7KI+qMauZ83rm/CmaiDVvtTlR0riRsUkAl67qt2ZlrcNE50M8CQ9N/ APACYjWSRuYjKSxnMfM40fVjyBVngg0FptLz06Z7vjajHt6Zi9rZpjMmn/sWtHhOMYw6 fOwHesLTXURR63z95O1h7LsRO77gJKT5JYyKzPKQMZQayTv0CZd++rSTKRC8LPDcTxYt Uxng== X-Gm-Message-State: AOAM531wMKGcDLKJvGcpYJJxhLE1SnXddB9bQNLReSGAYZXbXOnFTfcp niRRoJtetYr4YWu8yd/IQ3t09Q== 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: Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Android Kernel Team , Frank Rowand , android-kvm@google.com, Catalin Marinas , open list , "moderated list:ARM64 PORT \(AARCH64 ARCHITECTURE\)" , Marc Zyngier , Will Deacon , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 \(KVM/arm64\)" X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 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=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL 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 7341FC5519F for ; Wed, 18 Nov 2020 09:25:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 142382467D for ; Wed, 18 Nov 2020 09:25:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qsrid+z+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725879AbgKRJZx (ORCPT ); Wed, 18 Nov 2020 04:25:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbgKRJZx (ORCPT ); Wed, 18 Nov 2020 04:25:53 -0500 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2812C0613D4 for ; Wed, 18 Nov 2020 01:25:52 -0800 (PST) Received: by mail-wm1-x344.google.com with SMTP id p2so471433wma.1 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=inLkC11ZgD33nb7UBunV36Fz9kDtjdawWez34Vy/6WFAj39kNJkeXHlTnJ0TKzwlJ+ 3vyfQoNwMilZx04WwfoP7oTlCAgds4xc/yI8F42E0PBTQiYqFd4egviup5S+J7foWIuK KXNi81Dyqb/zEXYIDmvBj4kGL000+PUOEZEMGwWent1uwPjrPn3AiGxhJ6AJBQ+zZ9lU Pa3RRKfQZ76QFtafBltVJ7DzEvYioGeafI/u//Yg165yz/oJPDpTTwWo26TLfjHMklBT myPBOqYowvQ6R471q/wqeWtq9tXvySo+Mihtxf6zUxSfrs4G89MOvHPqQLsfuFrPU/VV bytw== X-Gm-Message-State: AOAM5326Y7CjCL4BMB6zarHtl4hShsmmslyjmLxHtHwUJKSeitQU2tAE deV43MYJY4LCwOWpBSOhWXN7BA== 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 Cc: Catalin Marinas , Will Deacon , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Frank Rowand , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , open list , "open list:KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" , Android Kernel Team , android-kvm@google.com 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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