Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp797021pxb; Fri, 22 Apr 2022 11:20:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA/8mvQqvmY0M0shEBV/SA21SFf7x37MajTLyqKGJsExmKrRPwsFaEl05bSBaB4gXHi57M X-Received: by 2002:a17:90a:2809:b0:1cb:99a8:ffcd with SMTP id e9-20020a17090a280900b001cb99a8ffcdmr6821446pjd.7.1650651625257; Fri, 22 Apr 2022 11:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650651625; cv=none; d=google.com; s=arc-20160816; b=Gjct+GKM14bSw/uJe6dd+ukiBz8IjT7RupKdicB3aZDimjaLbMLgkksSHnc/uppAZb uzZGJBCHe+P2/WzgkNmYtJFDzBnlUiWZx1HAakBvw3TZdWzJs9dIeLfjqq6CKy9y+Itc HVyXdIanTstSvmdwptjorZGKI/D2rKh3d94YubsU9RBqTKCtNOplTcwGqAtCxBqb5ph2 PxHpWMVq3qmMowjSp+3EasS1r/7a2RTxUcSP2NiVv61gyz60EiViZyYElNMLpHRK1LPG C1aUSGo+64v5n1EFk5lpc7JJHXHIR8j1AiOhMMCC+C5RyZ+fHnR6Lo5LoXat3MgSBjVT EE6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ufyAG5m+EcpIY20NjQwDG1+pyhwYHBGjrZHrXa2vQ9M=; b=ijXknK8ZHYDCmfkhVLnGNROr8x+zJ58XxZ/T/q+27VNyWyjubbrzlC76dhp4u7FklJ nbmvRM5zFJHeMHt2E13wk9Szj3hDitueYtoJCXf8YxuF0bhmcJDSWKMw2hTIQumtnwHv OKap8+0NJUtPCPvwxdvfp3FZhty+4Sh09S+7OU51fRSJ/Sw3ptN+bQsUFnZVJ27O9qNj WVo8vslDbIejGPTcbuhutAEHy6FmTBS/7QIBovUmh6pZc/9rViYOW5IZiinpet43BNpJ 799t1RQoq7I41MF4VsMpCX/aSPRyqwV1Myif4VNjQicJxP7vS7DA6OrpAB4ubS4OWbbs MHdw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p17-20020a63c151000000b003aa81281527si6849434pgi.775.2022.04.22.11.20.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:20:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 55EBEC8A86; Fri, 22 Apr 2022 10:51:44 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445969AbiDVNpI (ORCPT + 99 others); Fri, 22 Apr 2022 09:45:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234180AbiDVNpH (ORCPT ); Fri, 22 Apr 2022 09:45:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3279C57146; Fri, 22 Apr 2022 06:42:14 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id E1631B82D82; 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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