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 1C63ECD4F49 for ; Mon, 18 May 2026 15:41:27 +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=WweKQAj+6Hy9UyAI77KW2jeABwqngTeZC1dub5emDbg=; b=xf8GBnoUVt9CaCpxVKY1UTkJ0W y0Ta+z/sIVb/LA1let1LvyeIw0JceZSuYsTXDIfq3GYZOl11FWg1eZDoYmMw99AZH4m7fHQz9hjoJ SuwmU0qmXok2rqNpP1fgzDL+EBPOkF0TJ7RETGrbh9sLArAHfrLRhLcEENbdS5M2JDR2pp2nPwRbE FDbSdMnyFM/itsVAkJnFw91h6kU05OIXC9e7Juc6IEiXa3N4tHRiwgMxI8gumQMNvI3W4dP5ABM6N miiwHRe7Zc3temyW86PV21BfJVsli7dgMnym76tnuLAnY5cQtb5eApqNiVqjPzEBY3p3eoCyb15my 1dPHTA5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wP05o-0000000GCRq-0G8d; Mon, 18 May 2026 15:41:20 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wP05m-0000000GCRX-3kr9 for linux-arm-kernel@lists.infradead.org; Mon, 18 May 2026 15:41:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 44B9760120; Mon, 18 May 2026 15:41:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5CA8C2BCB8; Mon, 18 May 2026 15:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779118878; bh=nGkDdu+N3KWlaQu2LHbVRzFeeLezZZ4e4A5lnJ7m/HY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=d11xgqltA+Lt/KKwH30UiTSccND+/f5Aa8LecxQGfbVbkuAX1MYkuYeg33udL8Fxy jpNEgIsfEgIBmzkx3Vnuj9O6qFTHT31nZ7Gb/zKEmgdUjslCvW0Ew0hE9Re2En7yDM 85MoCCxtbJXwPqsbKxD8Cs+0MF6i+ASkhLY3OyBQiz1MKZC2W2KQEFfXuhXpFL+FT1 5quqEkXeQtv5WCNxt2k2XPlcuIXMieXtOKopKXhjPghNKlVxMuXVCx43Ac10C1I+Ea DWDct1vwu539+M5GnqnLxswv2dzror/DM0Z7hFKJd6LtMaC7yPevb1YE4vuNCR7dBh zcfG4KP1X7v9A== 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.98.2) (envelope-from ) id 1wP05j-00000003aaE-3rHO; Mon, 18 May 2026 15:41:16 +0000 Date: Mon, 18 May 2026 16:41:15 +0100 Message-ID: <86wlx0wwro.wl-maz@kernel.org> From: Marc Zyngier To: Will Deacon Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Oliver Upton , Catalin Marinas , Mark Rutland Subject: Re: [PATCH v2] KVM: arm64: Don't populate TPIDR_EL2 in finalise_el2() In-Reply-To: <86y0hgwwul.wl-maz@kernel.org> References: <20260518153127.6078-1-will@kernel.org> <86y0hgwwul.wl-maz@kernel.org> 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/30.1 (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, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, oupton@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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 Mon, 18 May 2026 16:39:30 +0100, Marc Zyngier wrote: > > On Mon, 18 May 2026 16:31:26 +0100, > Will Deacon wrote: > > > > Currently, it is not necessary for __finalise_el2() to configure > > TPIDR_EL2: > > > > * The hyp stub code does not consume the value of TPIDR_EL2. > > > > * On the boot cpu, TPIDR_EL1 is used for the percpu offset until the > > ARM64_HAS_VIRT_HOST_EXTN cpucap is detected and boot alternatives > > are patched. Before boot alternatives are patched, > > cpu_copy_el2regs() will copy TPIDR_EL1 into TPIDR_EL2. It is not > > necessary for __finalise_el2() to initialise TPIDR_EL2 before this. > > > > * Secondary CPUs are brought up after boot alternatives have been > > patched, and __secondary_switched() will initialize TPIDR_EL2 in > > 'init_cpu_task', after finalise_el2() calls __finalise_el2() > > > > * KVM hyp code which may consume TPIDR_EL2 is brought up after all > > secondaries have been booted, once TPIDR_El2 has been configured on > > all CPUs. > > > > Remove the redundant initialisation from __finalise_el2(). > > > > Cc: Oliver Upton > > Cc: Marc Zyngier > > Cc: Catalin Marinas > > Reviewed-by: Mark Rutland > > Signed-off-by: Will Deacon > > Reviewed-by: Marc Zyngier Ah, realised too late you intended for this to go via the KVM tree. I'll queue that for 7.2. Thanks, M. -- Without deviation from the norm, progress is not possible.