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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E094CFA460 for ; Wed, 23 Oct 2024 19:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YQ0MOKkGPbULQTMowYjQ6c4KVeqZ1O9+c4wm8krnsgw=; b=2l/0TK6cfIWsMQmaWjZ4LXiZM/ JTTyswI5vHXBMRIq8r8dTxji25YtTuQvXYnJMExjmCqABRWPCZLjLHzSBt6+dCWutHeXeDngFcTY7 5hV56ngSCpnv1GZMYOBR3BNioxb/4VpMz+MJ7CNr8DUffguCxISJ0qtsIXYu+oaaadAIv594jrxei OkrOY1chIhbN8BhH+/GyZmYnHC4SilQD52SoYA/rw8+Wu3XP6GpQI3/Zike/QI6r5kiTRwTj/ruy4 1W69QS/bYHU5jYXoWI2PZyo9z7P5siyfnjLaP0B7GRmF7FGtsGO/gKo6syucKfC9AQCHPkd9GOf+5 uBuWgWKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3gt4-0000000FeFn-2sdv; Wed, 23 Oct 2024 19:19:18 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3ecQ-0000000FEYs-3odi for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 16:54:00 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id B8116A433F2; Wed, 23 Oct 2024 16:53:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C762C4CEC6; Wed, 23 Oct 2024 16:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729702437; bh=jHLJdDp6AeGNoGZXHRp2Mz5fRTwo+HOsHYS1lsR3HYA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=a6FfTadmjcr9wKdhYG0klV7Z0lzo73VrNXWYbk+U1tDilcNmPy/+pnX0vp2nn8HMJ anOgC8WfVnhHac7uz88DKefai0gYObuSd0lC4zMjk+wdM5PK9LCzyWsdhZy/dih15K adYJAg3vG3PpeOt6bzznN464yM5RFIk+76qbUrX9WqhuVo8xaXvBfCjrsgJ3/Ohnhd ZAabugxqKUZC/NRC2b0+WG15uZo3JRCbXzjoh3IndJY6JctMILuo/5676dF3N/CWQ8 zOAkK/avvEjUNILLz6DDc9v68b5FLeZDCMP+YqV1eL86I3E+FFkq+QR8CVlFChWUYh xTpYKMw6gqugQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t3ecN-006BwW-C4; Wed, 23 Oct 2024 17:53:55 +0100 Date: Wed, 23 Oct 2024 17:53:55 +0100 Message-ID: <86zfmu3gm4.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, Oliver Upton , Joey Gouly , Fuad Tabba , kvmarm@lists.linux.dev Subject: Re: [PATCH 2/2] KVM: arm64: Don't map 'kvm_vgic_global_state' at EL2 with pKVM In-Reply-To: <20241023163907.GD29251@willie-the-truck> References: <20241022144016.27350-1-will@kernel.org> <20241022144016.27350-3-will@kernel.org> <865xpk3wde.wl-maz@kernel.org> <20241023163907.GD29251@willie-the-truck> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: will@kernel.org, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, joey.gouly@arm.com, tabba@google.com, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_095359_101189_390F2FC2 X-CRM114-Status: GOOD ( 29.90 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 23 Oct 2024 17:39:08 +0100, Will Deacon wrote: > > On Tue, Oct 22, 2024 at 06:01:17PM +0100, Marc Zyngier wrote: > > On Tue, 22 Oct 2024 15:40:16 +0100, > > Will Deacon wrote: > > > > > > Now that 'kvm_vgic_global_state' is no longer needed for ICC_CTLR_EL1 > > > emulation on machines with a broken SEIS implementation, drop the > > > pKVM hypervisor mapping of the page. > > > > > > Cc: Marc Zyngier > > > Cc: Oliver Upton > > > Signed-off-by: Will Deacon > > > --- > > > arch/arm64/kvm/hyp/nvhe/setup.c | 17 ----------------- > > > 1 file changed, 17 deletions(-) > > > > > > diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c > > > index 174007f3fadd..8fec099c2775 100644 > > > --- a/arch/arm64/kvm/hyp/nvhe/setup.c > > > +++ b/arch/arm64/kvm/hyp/nvhe/setup.c > > > @@ -95,7 +95,6 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size, > > > { > > > void *start, *end, *virt = hyp_phys_to_virt(phys); > > > unsigned long pgt_size = hyp_s1_pgtable_pages() << PAGE_SHIFT; > > > - enum kvm_pgtable_prot prot; > > > int ret, i; > > > > > > /* Recreate the hyp page-table using the early page allocator */ > > > @@ -148,22 +147,6 @@ static int recreate_hyp_mappings(phys_addr_t phys, unsigned long size, > > > } > > > > > > pkvm_create_host_sve_mappings(); > > > - > > > - /* > > > - * Map the host sections RO in the hypervisor, but transfer the > > > - * ownership from the host to the hypervisor itself to make sure they > > > - * can't be donated or shared with another entity. > > > - * > > > - * The ownership transition requires matching changes in the host > > > - * stage-2. This will be done later (see finalize_host_mappings()) once > > > - * the hyp_vmemmap is addressable. > > > - */ > > > - prot = pkvm_mkstate(PAGE_HYP_RO, PKVM_PAGE_SHARED_OWNED); > > > - ret = pkvm_create_mappings(&kvm_vgic_global_state, > > > - &kvm_vgic_global_state + 1, prot); > > > - if (ret) > > > - return ret; > > > - > > > return 0; > > > } > > > > Maybe add a note indicating that nVHE/hVHE still have that particular > > mapping via the rodata section? > > I can add something to the commit message, is that what you had in mind? Yes. But maybe Oliver can add that when applying the series? Thanks, M. -- Without deviation from the norm, progress is not possible.