Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3041785pxu; Tue, 8 Dec 2020 01:45:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJysl4VOCvAWKiG2YMEGVVURdbjDBeKdNVcc5c6mdX3ElzaVt9RRGRGwgOeCNY/HQmiNqGGB X-Received: by 2002:a50:c299:: with SMTP id o25mr5016709edf.343.1607420722089; Tue, 08 Dec 2020 01:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607420722; cv=none; d=google.com; s=arc-20160816; b=0xXR9VAd5HeOdp6TeP/TB6o6ZbQNOpL8QSXUe8SQiEILCRnGelEkzzUNzwwd/7KqXA 6Sf/wpmTaxlD8100aUjXln8NYThLk2e+JqCGrzlzU+py/expn2FWLLDX1Z0VPyKSfY06 5n7BaN/RBjkOKQ8jDgLf0ZWYPosPRKndXe7A7DrGZHIWrYhzSy3z95QH9dv0hB5Pelvv 7VRtQZn6Jl6IbchFJsEHaHV/OnXnlL0Qh0LjmT0rj75cF4hB69l/c5oNvDzSQWQL+5Qr 1wztmiBLSbbosE3aSp59dNW05Z4SgfJ7rIPi304a7vatnsLniVfrqqaKVRihFiY7C6PO sb0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:date; bh=/Zxanvznn9d9GkkvL+j5DNZZ9kzxn0o3ec8Fl/K/hGQ=; b=CFGu3JutZmldKklbgYqxdNKcBxQWiIaTVSKspvVukJQa1EJX/Vc6Lu/JuWJ0LJtor0 N92aSysKj/qV9hawLS/9X+5P74uKprSiBdMd1KE7/fZeqkRqfYH70dWYwgNSVPhv3l8P lxMTTTSCxNo7IezJWaCCHWK4FC+BDdTziYLYloGg1RBL+cMK73dEvMjwE+j+i4I8lyHZ iOOHXV8K77Up/aC9Z1ga6yl6t2gg+kofGqVvy/peu2LHDu6t7CFh8bQDOSXqINJSJkCo EfYftuirRYY1sIfyp4PB7yXTVxgpVTm9ECYUIvBpMC5of7OAQ2QKLKcV0gNH9lsucyZ7 xXxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B9yFCJVP; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v5si9696939eda.107.2020.12.08.01.44.59; Tue, 08 Dec 2020 01:45:22 -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=@kernel.org header.s=k20201202 header.b=B9yFCJVP; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729028AbgLHJlO (ORCPT + 99 others); Tue, 8 Dec 2020 04:41:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:46464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727543AbgLHJlN (ORCPT ); Tue, 8 Dec 2020 04:41:13 -0500 Date: Tue, 8 Dec 2020 09:40:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1607420432; bh=l03X9b1AwR7eEYo3VLDO+AWbKPeOsT8lUlLG3XUEGcc=; h=From:To:Cc:Subject:References:In-Reply-To:From; b=B9yFCJVPeCmI8cxF0hHxdebit6cTtoLiw93kazgl0x+BJCfUJJXOZNfRGlYKaygXI S/N+40Uwu0X5uWaRwpuCZ2jc8AlyUfdZpE/NM3RSP3QSz+o8XgD35WRRD2+xDNbXGZ VGH+IiMIgdJj74Kd/2A2KesH+nrjgb9PcdGfaCUAdXvQdli5MpnnWsUwzJHKiwEvDd SmjfzgawHzDoD/40UPolbneGtEDobrxNbSh5oHZO3KfAdI+flFHiVg9esS9VGe/Oxr Rh5SfXP/9IDR+s7jMOFYBEKEwxZ8kOghkhqxHHdsyKIbnhjx4/wuZXbaNwKKQBF7mu GXiLXL8rGbQ2w== From: Will Deacon To: Quentin Perret Cc: Catalin Marinas , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Rob Herring , 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" , kernel-team@android.com, android-kvm@google.com Subject: Re: [RFC PATCH 16/27] KVM: arm64: Prepare Hyp memory protection Message-ID: <20201208094026.GA5562@willie-the-truck> References: <20201117181607.1761516-1-qperret@google.com> <20201117181607.1761516-17-qperret@google.com> <20201207134052.GA4563@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 07, 2020 at 02:11:20PM +0000, Quentin Perret wrote: > On Monday 07 Dec 2020 at 13:40:52 (+0000), Will Deacon wrote: > > Why not use the RESERVEDMEM_OF_DECLARE() interface for the hypervisor > > memory? That way, the hypervisor memory can either be statically partitioned > > as a carveout or allocated dynamically for us -- we wouldn't need to care. > > Yup, I did consider that, but the actual amount of memory we need to > reserve for the hypervisor depends on things such as the size of struct > hyp_page, which depends on the kernel you're running (that is, it might > change over time). So, that really felt like something the kernel should > be doing, to keep the DT backward compatible, ... Or did you have > something more elaborate in mind? No, that's fair. Just wanted to make sure we had a good reason not to use the existing memory reservation code. Will