Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp181494pxb; Wed, 18 Nov 2020 01:28:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNFKdHL/0nYZxYuf4SlhQkiIdwo6EdCz12LZth8DdlEfXRpaeKgEFBgJW4ScNL7r9dn7oy X-Received: by 2002:a50:af21:: with SMTP id g30mr24266099edd.46.1605691685910; Wed, 18 Nov 2020 01:28:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605691685; cv=none; d=google.com; s=arc-20160816; b=mqTr5zAQlBYS6ricMC/qH//PphGF7Ep941GThxXvITlo41v+JjTmuGB1zgIVIf6jKb Ny/rzsZqa24mli6nApOQvjlzv0Br+inXRYlr/dSGcUb5tkAv+10Af1r67wt2NVbijyQw ++0/nq7ibNV1OW173EfuK2GlMPBBbFFCAT+gzYPjj6ApjehLhCxq59HUqNXRWAnZAdJR YCbRJ6Acvkn+WazQOqn02jB0bGYWp7C39noIPOemVlFTFCg9PxxhIvSbrBu4GH3DD9HS WSrENnqyQphgt0AoEYpFOV+6sTZx+XGjX9TAo6Bj2YiphWWMshS6ep0raZaABxnc0EeQ kWJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X6ZFH7heqse89aEGvMmhzcbSi20z75OlSQMAgPLbESY=; b=l7hoxAlO7jEPrIhlOTnxAGX4DBOovoRsS18z6Y9gIY7kpU8lgVEOcHXWsGB3+p/g+F RBDjSFT9mYx6cj4gSZXVR46YcTXSSuVnyPugLTwKtns558YwpV3D1AnV/QMWIbJxyR7S dUCSmSiArERKsUZImZyuhwCDZwiqHpUG5eusbeE+nNXVaUCjPmRYGWVEmEPgcdcTqpCN aDutx1CZQKdeNKW6lWt8bXmenqd86PfEJvdcj6IaRIpNMcVVtCQdoq8HxJuQT8mfqMWg 3kNL9fWmACAHCegEea29EodIV5SYFrcQF4cEYLpYVYPwecvQy/0QcQDo8ePTsYoLOBW5 n6Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qsrid+z+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si15519070ejy.403.2020.11.18.01.27.41; Wed, 18 Nov 2020 01:28:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qsrid+z+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726397AbgKRJZx (ORCPT + 99 others); Wed, 18 Nov 2020 04:25:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgKRJZx (ORCPT ); Wed, 18 Nov 2020 04:25:53 -0500 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7E0BC061A4D for ; Wed, 18 Nov 2020 01:25:52 -0800 (PST) Received: by mail-wm1-x342.google.com with SMTP id p22so2280924wmg.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=QhpP/JZ9RwwG8z7kMK8Yl8+XLZ6bC3rwK900QZkpOlTaJ7RXugrwFPbsTcgLH00ZaH APEq3jALzgZietwLceQNeZKXpykRIK6fEl4rF8XPFKetBbZx2f2HUuI5H+9a30ULLXBb Ih+fnxufUv03xdOAuLLhFy5ejr4PZIobIZlPXV7J+sJJFW9bnCapzem5X7Jzqlvcrtky TgB4pSYelgUPCa99qwSAkWrYmkhQwLIthpGViGkb47PazZFZd7gvw9qq41IFKbRV4IDr L/8xQhhr/361cUCPV9kuBVr2473/sKfQeszPrwzRTQN7m3OBnNUQ8JPGZ2ipn0nPPo++ OnMw== X-Gm-Message-State: AOAM531hMrgMWbiKsqUTqWeNzTfVaooYI2UOSWel6t9qj1aT6AlAY2b5 sGRkFu4dkCB+j96P8P9x69XIBQ== 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: linux-kernel@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