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.7 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 BF9E3C433DB for ; Thu, 11 Mar 2021 17:30:26 +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 34A3A64F3B for ; Thu, 11 Mar 2021 17:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 34A3A64F3B 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=NyoxNPy6G7GFW4f2pDQBXOxh+kNUy93X7h2UtjblPHE=; b=cHvxuxtmAKZQDRs7K1P0JHEyU yShqtWR1tRoiTlnZ+2lOxiDx9ua8+7Z8ziCWPktOq8j1XY7Gq1KFQX/yI82QkLB6ZNs2BniJIgXdV Kqps0XCrFGwDkncy2vI8BFv3Px3g6QhttrK7x9c6fz2hlNTV28MUzumFweqm7HxSTuWPqtU8lWAep NClWEjX3usNXmp8PnefCw4v7BdOQ0HwZlM3USVvufnKdhRs4KOsDN1vURTQW2te7FAYq7im1rvvDV eEheffVRc7AflPUFDM9FwzcCkWTm1jXEy2H53sP3WOctM6KAXM5QqvK+ub7amvyBXd/v0MAsj9HxO 5T7pJDJNg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKP7R-009jB1-0C; Thu, 11 Mar 2021 17:29:05 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKP7N-009j9t-8I for linux-arm-kernel@lists.infradead.org; Thu, 11 Mar 2021 17:29:03 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 39BF264F8D; Thu, 11 Mar 2021 17:28:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615483739; bh=SUeqNhY4Z+cYtXpQCYJP8i17rbPK2GdEQhebAc/M+tU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=L7QwP3mI/PxaXZL6Lzb4Uj8lOgGQvuW2ooWh1d9r7PlRtwnOnWkaL0lkxdH4Io8dM 33c0SarypvZ0j+O+tOyGFO9XW23anKOIKjMUm0OdqHWOemnYHBfhgzeDCNLJ0YpAUu i9voLaJivgCho9e8soLqDIKUvVRT4O8Y4bPmk/+ITnD8F6sHo02xfh9vqMZIERS0PP YQmJQK+2mB+cVYY8FaaD5yvGFbtgsuHPhmiG5TZXZHiXZPtKg/WQZrnhRtxiFgju/B hsId/apbJy3etztRisBSXv9NedsezIP/q9J4pUoHKQdIce0ea7xWXXr3c2OACBNw3Q bmKHEV4MQEEiA== Date: Thu, 11 Mar 2021 17:28:52 +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, ardb@kernel.org Subject: Re: [PATCH v4 17/34] KVM: arm64: Elevate hypervisor mappings creation at EL2 Message-ID: <20210311172852.GA31378@willie-the-truck> References: <20210310175751.3320106-1-qperret@google.com> <20210310175751.3320106-18-qperret@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210310175751.3320106-18-qperret@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210311_172902_117106_12E804BE X-CRM114-Status: GOOD ( 12.87 ) 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 Wed, Mar 10, 2021 at 05:57:34PM +0000, Quentin Perret wrote: > Previous commits have introduced infrastructure to enable the EL2 code > to manage its own stage 1 mappings. However, this was preliminary work, > and none of it is currently in use. > > Put all of this together by elevating the mapping creation at EL2 when > memory protection is enabled. In this case, the host kernel running > at EL1 still creates _temporary_ EL2 mappings, only used while > initializing the hypervisor, but frees them right after. > > As such, all calls to create_hyp_mappings() after kvm init has finished > turn into hypercalls, as the host now has no 'legal' way to modify the > hypevisor page tables directly. > > Signed-off-by: Quentin Perret > --- > arch/arm64/include/asm/kvm_mmu.h | 2 +- > arch/arm64/kvm/arm.c | 87 +++++++++++++++++++++++++++++--- > arch/arm64/kvm/mmu.c | 43 ++++++++++++++-- > 3 files changed, 120 insertions(+), 12 deletions(-) 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