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 D026F105F781 for ; Fri, 13 Mar 2026 09:06:25 +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=f+o/DGzP5XOjxJA03iNKPYfCepNl7YRPkWmhyDUUGvY=; b=jVMgTGhohUTy+8H+9A/Ji0yLvc pp06U2w7+ZXpkm48Bg9NW2J9eULlF3WDKW1MPkGxLCHTUoyhi0IP8UAIhEQlpVQ5EHmDBUGdKbEeI 9Kf5zB6ybDTwKJhWM25AgyxTY5dZVN3EnMebN8hLnXjg4ygLG64MUOUSq0u3CC2vFhzavo8TwxS3R ve4oT51muXRbRvCmgGBq8x3K0EZxHR9jXrBCSFLyRaJ8QrVoe2/HyCvQ6D8DfW8cx5AWryYDKPrGk 3tGQafa6JoxO5gpU6ZvAHyNc3NA2YTGedeMb80/vYweonh72udfrk+GYAS1e/HV2kJO6qw9b+vO5t TeWvVglw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w0yTN-0000000HLqL-0ORR; Fri, 13 Mar 2026 09:06:21 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w0yTK-0000000HLq0-3yRW for linux-arm-kernel@lists.infradead.org; Fri, 13 Mar 2026 09:06:19 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 1E3A3401E3; Fri, 13 Mar 2026 09:06:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6ED6C19421; Fri, 13 Mar 2026 09:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773392778; bh=ApLUkt+F3u3gzBaangDP3HWLIX1uwr3fS7gulGMSVsM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YGezCFoazK+VdxfRZrKwmQniEkzkOLW2rFO8xOoMZPnpwVK7g7wpOALwucLzJzO3p pK3n2iljrFzpiraCETyaa+419LqKMyLKKytRoJq+HSHD96RWMNGilV7f3metkM/6Z6 5tt8eGJANUetDvdkvOK5ATCORERP1xM8ZwxBnbMi4A6AkedWJ+mz5u028jTm7cArcv RtNi1UWsPEcGJ2B/lILRfbdqxckx9LwqaJwPwitQYU2s3wD+an5feVuwhi342u6+oC WIAsQLct1yfaeXP3WSUSj67MeWm9VHWT/K3sMufJj4dqapS2RfiayQLouEMotO7E8R AyHcxPve3zKyw== Received: from [84.207.203.52] (helo=lobster-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 1w0yTH-00000001avQ-2egT; Fri, 13 Mar 2026 09:06:15 +0000 Date: Fri, 13 Mar 2026 09:06:14 +0000 Message-ID: <87ms0ccd4p.wl-maz@kernel.org> From: Marc Zyngier To: Anshuman Khandual Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Oliver Upton , Mark Rutland , linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: Clear VTCR_EL2 in __init_el2_stage2() In-Reply-To: <949f02cf-9f26-40ba-9c68-1742e335e2b9@arm.com> References: <20260313053857.1277828-1-anshuman.khandual@arm.com> <87sea4chrw.wl-maz@kernel.org> <87o6kscfon.wl-maz@kernel.org> <949f02cf-9f26-40ba-9c68-1742e335e2b9@arm.com> 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: 84.207.203.52 X-SA-Exim-Rcpt-To: anshuman.khandual@arm.com, linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, will@kernel.org, oupton@kernel.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org 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-20260313_020619_012949_6509A487 X-CRM114-Status: GOOD ( 18.37 ) 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 Fri, 13 Mar 2026 08:39:46 +0000, Anshuman Khandual wrote: > > > > On 13/03/26 1:41 PM, Marc Zyngier wrote: > > On Fri, 13 Mar 2026 07:54:04 +0000, > > Anshuman Khandual wrote: > >> > >> But it can be argued that these registers > >> need not have to be cleared now and can just be initialised before > >> setting up HCR_EL2_VM itself. In which case should we drop > >> __init_el2_stage2() entirely ? > > > > And something worth thinking of: the role of VTTBR_EL2.VMID when > > HCR_EL2.VM is 0. > > Are you suggesting that VTTBR_EL2_VMID needs to be 0 even when > HCR_EL2_VM = 0 because of its corresponding TLB entries ? But > during system boot such possibilities might not really exist ? This is not a suggestion. This is an architectural requirement. TLBs filled from the EL1&0 translation regime are always tagged by VMID when EL2 is implemented, irrespective of HCR_EL2.VM. M. -- Jazz isn't dead. It just smells funny.