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 4ABD83F99FE for ; Mon, 18 May 2026 15:41:18 +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=1779118878; cv=none; b=MuplWDTIYmre8c3CK2eFSv/OmQtl4SbmZjo46Yzg/+/KTuOFev9DmHQnC8rB3cCC6LWA0hlqpP4ekX+qGDMnK62Xnx9n/VcnoEHO1jyXZM1rkbTqqoFPzMsdcNU33+ecUJewF9w8/Yb5wHC9TVFEF8olN0PjGZ/9fRN79lVj+6k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779118878; c=relaxed/simple; bh=nGkDdu+N3KWlaQu2LHbVRzFeeLezZZ4e4A5lnJ7m/HY=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=SalHnswCfkFdUDGxIdNWYn+X4IQ7o2RizXbi1nMFRVBmNg2wCD9NfMtZFFVrpQXftlOJmF+/2LeHhgV9r1UdwOQC0+XgHf/dDJyjYrsaz53qrQk1rrVvmzngXSoirhmRlvSziyveQmQwlmxZJ4GLjsbJZlO3Bx5eNAVipzh1vNk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d11xgqlt; 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="d11xgqlt" 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) 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, 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 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.