From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F382E1D1E72 for ; Wed, 23 Oct 2024 16:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729702438; cv=none; b=kw+zRidtS56qMiA6ZcfSb1NwG3/YchZalPEHatlIGDQLpfU/gqec9eASPxy1uP5diQNwmFLcdf2YekoKiQSt3UwGuuCRR4i+pXMPnd6vrIjvYUW4xOz/fqOdMH2tgzaiOA2+5tlxNnGAT6C2Q3O96KtdiPNKd8Y0EcaBmgDWiuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729702438; c=relaxed/simple; bh=jHLJdDp6AeGNoGZXHRp2Mz5fRTwo+HOsHYS1lsR3HYA=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=QUluBQIDceP0HWlRwKbadmWmJlKU/T//ZlsGd4SPpz/Yar/xRRrOjPfvd9+1TSsIa8oqf2o7ROHqtS5PRlfYhkxrjJ49E7GRt/dvhAUUri2FQn3UV32ptpyU3USP1kneKCIMz3VCBkFwpEh2a1WKL9Fg7/IpkY9PxKlpSt81xVg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a6FfTadm; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a6FfTadm" 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) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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.