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 5979AC433F5 for ; Fri, 22 Apr 2022 13:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BWO5SLu/Ddcy51uaoo4kOspY4OO8nvEuugGwC9m7C3U=; b=FxLDR1dVy5NKa+ pNufv861KJSSZYVLt45V3pXXmDGBxYY0AwbcVTrXdMAC2WosFKyOWbAtHA6vvbHdfFOQdkA4VfQsY 7+baenleMxqmtJU4rq/qJPkjfuiBD9ZQV9QkbfwxzE/tAi85+BR9DbRvhYhxlLT3iHW5WJavIHlIO dEREEAB72N2wEykUxAbIvvJfp/qGJBX0kNqC3eMSSZFvuMdrqOGuHcbNAb35tyNySNPYirwmd351I joG5D3L09nhrk96ZhWgWIb04dUjQiHv+FI6L54s90KfnN2azyJBhDTfIYo1RRBIpzKx8g57kq+uIL c3BMH7QKhngzuevgA6CA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhtY7-000eHD-9N; Fri, 22 Apr 2022 13:42:15 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhtY4-000eGI-Ju for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 13:42:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2413A620DF; Fri, 22 Apr 2022 13:42:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29452C385A8; Fri, 22 Apr 2022 13:42:09 +0000 (UTC) Date: Fri, 22 Apr 2022 14:42:06 +0100 From: Catalin Marinas To: Mark Brown Cc: Peter Collingbourne , Will Deacon , Jonathan Corbet , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: document the boot requirements for MTE Message-ID: References: <20220404211858.968452-1-pcc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_064212_753406_C33D92FE X-CRM114-Status: GOOD ( 19.92 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Apr 05, 2022 at 09:04:04AM +0100, Mark Brown wrote: > On Mon, Apr 04, 2022 at 02:18:58PM -0700, Peter Collingbourne wrote: > > > + For CPUs with the Memory Tagging Extension feature: > > + > > + - If EL3 is present: > > + > > + - SCR_EL3.ATA (bit 26) must be initialised to 0b1. > > + > > + - If the kernel is entered at EL1 and EL2 is present: > > + > > + - HCR_EL2.ATA (bit 56) must be initialised to 0b1. > > Very nitpicky but this is only required for FEAT_MTE2 and above, plain > FEAT_MTE doesn't have these traps. I don't know that this is a thing > that anyone's actually implemented I think that's a valid point. CPUs may implement FEAT_MTE2 but downgrade it to FEAT_MTE if the SoC does not provide allocation tag storage. So we should make it clear here that only from FEAT_MTE2 we should set those bits (ID_AA64PFR1_EL1.MTE >= 2), otherwise they should be 0 or hyp/firmware risks the OS triggering random external aborts. > and from v8.7 on it's not permitted but the above isn't strictly true > if someone did for some reason have the most basic version. The wording is tricky: "This feature is mandatory from Armv8.7 when FEAT_MTE2 is implemented". So one can still implement FEAT_MTE (or none at all). -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel