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 23D8E36EA8C for ; Mon, 18 May 2026 15:39:32 +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=1779118773; cv=none; b=itQjwAB1LWFaeHT97OYVKK2L9kIkRV944EgUFj4N5meipGnlKtfGm7jjTx0M2G0YdqdR9MHSLl1syyd5pSipiv3Wa9f0DNwHMcRfV1VrBCH2SgqMHq+PwvLkIsRnmHLEtZGU8xPPMgRyAc/pg2FHeWJoM4DG0PwFy3oJY51jTmo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779118773; c=relaxed/simple; bh=wI0oS/IXcvdTNYNkud/F2xdNSev5RKBVMA5br75br9M=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=L7VUwKbUK7WWjI9dpsSaeFLl2eZujXOZOQ7CMTnIXHRzCBIUizFMrQGEVHtoZhHhziccRT+fmuhqzf2rtWx99H0Z0u8m+L2/HbNfSxpxO/QAdsYAEP7rDxLRDUT3sN48jFLuPTBQ12aMSpxGRRb68cZrdWM9+ZDGVERHdSIlNU4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LI1Aan7f; 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="LI1Aan7f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3ADCC2BCB7; Mon, 18 May 2026 15:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1779118772; bh=wI0oS/IXcvdTNYNkud/F2xdNSev5RKBVMA5br75br9M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LI1Aan7fPFNd6DucdTzzfC2r1Sx8xmK1vwupHy4Jd4v2ImIszPzLL0DMQj5KC+eDP ErsR4IY8DcpfBXUwlVVDfzVRUAagDrI5fonSk5Y5cW8gKUF90vX2SUx390PIy7iWe1 8Mnz75I6AhyjYIKC/67Y3gbtaYvErZRJ/21HiyWZOcmLOyQp44h1qYueUn4mqbDqmk lrqekcHlcME1VxpL8juEYLAIBjyPnBfW50ccswkXInj/LyAHIpeFBdMTdKkDGeawYa PCqMWOyjLMLm++tsdpdtaXgx5EgkaY5ydc+TjNTX8AYm0uGCikC79QdrSVafpF9spi yiOLGXoEvZxtg== 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 1wP042-00000003aXk-2cLS; Mon, 18 May 2026 15:39:30 +0000 Date: Mon, 18 May 2026 16:39:30 +0100 Message-ID: <86y0hgwwul.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: <20260518153127.6078-1-will@kernel.org> References: <20260518153127.6078-1-will@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: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 M. -- Without deviation from the norm, progress is not possible.