From nobody Tue Apr 7 12:57:01 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 670582BDC3F for ; Fri, 13 Mar 2026 05:39:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773380346; cv=none; b=DI07P0w7ZFen5EINAQEgi665Gqm+ltuMSXC+1WSBz8bv8aO1c/wVeqj6obxYChZNbnsEUQrAnushnGY9weIN/UEJ2iJMfOXWNFeg5mMddAsHrzoxIMXoUDOZQ9/e8VHQxwlVwgijQ5AleZ7AruA/UjR3mMpw7Cc4TJKvr0yHEtM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773380346; c=relaxed/simple; bh=v4FHbZjU4jrbo6Nk0q2i4PV/EYtVy9bZ0/4XtGGUuKo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=V+tmqhx/q75wtJzKNdgMW4j/cSDYyYzAx8qmL+ZCjPqxdDsR96PWdacoN3cyE4BLswA1zeI87Ld6atSoMK+n4+oTLQKcPnbqh8iEjLQxnDNxgxKUOLYJLN98VEIaqtF+CRlXA7eDBuoMJIg7w+CXgidXURyPJdIPVvRjuNCh6o4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1099165C; Thu, 12 Mar 2026 22:38:58 -0700 (PDT) Received: from ergosum.cambridge.arm.com (ergosum.cambridge.arm.com [10.1.196.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 928B93F7BD; Thu, 12 Mar 2026 22:39:03 -0700 (PDT) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org Cc: Anshuman Khandual , Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , Mark Rutland , linux-kernel@vger.kernel.org Subject: [PATCH] arm64: Clear VTCR_EL2 in __init_el2_stage2() Date: Fri, 13 Mar 2026 05:38:57 +0000 Message-Id: <20260313053857.1277828-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Clear VTCR_EL2 along with VTTBR_EL2 register in __init_el2_stage2(), which ensures that MMU stage-2 translation remain disabled. Although clearing out VTTBR_EL2 probably should have been sufficient but adding VTCR_EL2 improves overall safety. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Oliver Upton Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/include/asm/el2_setup.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el= 2_setup.h index 85f4c1615472..2c88033591bb 100644 --- a/arch/arm64/include/asm/el2_setup.h +++ b/arch/arm64/include/asm/el2_setup.h @@ -189,6 +189,7 @@ /* Stage-2 translation */ .macro __init_el2_stage2 msr vttbr_el2, xzr + msr vtcr_el2, xzr .endm =20 /* GICv3 system register access */ --=20 2.30.2