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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C77FCC433DB for ; Thu, 4 Mar 2021 14:41:13 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 5ADE764F6C for ; Thu, 4 Mar 2021 14:41:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5ADE764F6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc: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=Ig8Jn5lQkkvm/r/+GpvxqDkYwao17PSCUnRDr5fmYl0=; b=KK4jEIzxuS5GpN8miHcsO1ICB tbPs6bxlxXJ+fISSzoWn9EHdnDemRCm2lJiXqIRYTC9jNyiK3JoWDhZXEtY0b9U5XT+JfL7z/QrYq fakalGnDf0m6+4iJIEPuBM0DDnkJylG6SQSnex4wtcQZI6B67AHP49zR/QvvRT1LmHT8khULMh/Oq 5uTlgJckODoqu+lS4hcerbP1WaksKE1BnFMNlFiOuSZ+f/V28kSk4PLtgCFtVfs/cTnB5/RHzqKDK mwr83Sem9B36rIPYloNRU974Do2KAcZk6BOI6goMBOIOYQa8Xj4NhXrwycJtAbRjrAADEL39JI5WR Tnd7zfygw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHp8G-008vLC-Os; Thu, 04 Mar 2021 14:39:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHp7Z-008vGO-GR for linux-arm-kernel@lists.infradead.org; Thu, 04 Mar 2021 14:38:37 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4E75764F53; Thu, 4 Mar 2021 14:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614868712; bh=8HCRgaAXUQKJEYk45KGjzpayiZSJL7Z75jrU+D65Qeo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X5yEwJIaq0J3G+LX6gOVqkHLOFA7A1fzuRqCO9TA3yz2kYuwqLKdBrGz76rPD96U2 cKxMcAvYWFIn0mO4mwEXY8GDmT7CujlI2LMHCeYDKCxCFT+MS7YUtSLUZgseGev/xB nGDRIQhE3SgnpSPCaLFPVNGxI9ZIEar6b0EurD8f6+x6FTn+2mosIODf05n8Fhps7T 6QAmQ2r7uAqH2YL1JnUMvggdafAHFhTeRJA6Ahi2Z9kxafeSU3qpbvvwMD8QMRRMdf M7fZC0WyDhSD4F/RBO4PNluP+ce8uxYNzwoR2gYlXfFBH1z7UPaIWt7zo1b4j71CLe LtYItYCXzSl+w== Date: Thu, 4 Mar 2021 14:38:25 +0000 From: Will Deacon To: Quentin Perret Cc: catalin.marinas@arm.com, maz@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, tabba@google.com, mark.rutland@arm.com, dbrazdil@google.com, mate.toth-pal@arm.com, seanjc@google.com, robh+dt@kernel.org Subject: Re: [PATCH v3 10/32] KVM: arm64: Introduce an early Hyp page allocator Message-ID: <20210304143825.GA21410@willie-the-truck> References: <20210302150002.3685113-1-qperret@google.com> <20210302150002.3685113-11-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210302150002.3685113-11-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Tue, Mar 02, 2021 at 02:59:40PM +0000, Quentin Perret wrote: > With nVHE, the host currently creates all stage 1 hypervisor mappings at > EL1 during boot, installs them at EL2, and extends them as required > (e.g. when creating a new VM). But in a world where the host is no > longer trusted, it cannot have full control over the code mapped in the > hypervisor. > > In preparation for enabling the hypervisor to create its own stage 1 > mappings during boot, introduce an early page allocator, with minimal > functionality. This allocator is designed to be used only during early > bootstrap of the hyp code when memory protection is enabled, which will > then switch to using a full-fledged page allocator after init. > > Signed-off-by: Quentin Perret > --- > arch/arm64/kvm/hyp/include/nvhe/early_alloc.h | 14 +++++ > arch/arm64/kvm/hyp/include/nvhe/memory.h | 24 +++++++++ > arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- > arch/arm64/kvm/hyp/nvhe/early_alloc.c | 54 +++++++++++++++++++ > arch/arm64/kvm/hyp/nvhe/psci-relay.c | 4 +- > 5 files changed, 94 insertions(+), 4 deletions(-) > create mode 100644 arch/arm64/kvm/hyp/include/nvhe/early_alloc.h > create mode 100644 arch/arm64/kvm/hyp/include/nvhe/memory.h > create mode 100644 arch/arm64/kvm/hyp/nvhe/early_alloc.c Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel