Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp987892pxb; Fri, 22 Apr 2022 16:04:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXA/RLs7GCgawaMhKSoW6s/ex21HLtMfBs+4U8ofBkjHQfYVE/j4Jlo7QEo3z7KbVxupMZ X-Received: by 2002:a63:f94d:0:b0:3a9:eea2:9027 with SMTP id q13-20020a63f94d000000b003a9eea29027mr5636952pgk.484.1650668660975; Fri, 22 Apr 2022 16:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650668660; cv=none; d=google.com; s=arc-20160816; b=KmQl2Z2Qosm/vwfWo95y8F/AQ6FgwDAQ1ROtu98FbnG0KaCRYz4Kza7T17UNBC8+lN 1v6/UPPAYCirtwqPCo74d34y+5NRLSprmBS17vh17COCpZObOkQx5UNj+yfzd+SVCZvl /veDcm1NYLxPgSbKfAda0pu/Rmn0N8zHd6uTBhC5kJxTSfwZXUAyF3gSDcPqYqbmiTjl i+c5qGg57Rx0+nxkSfg/2/8bgoc6VD9jYcci+J76zkfDrjXsEmtdpCjclEFTkV4hUAv0 cpIFXdXqLxTAP+dBQRwVPGk3e0A22l1oOnyGUoin6J/et1/7nYbe4W/v2rEo8+jqLkbK lzvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6Nnz4Zst0bPhyG4+bPpJ1xif7BM4/fGW7NbRucrhml4=; b=biDnqUisH2gPP/lW+JPuRJSBH+KY+Yfb735f8oO/HaJYohMsuxPXDli2gHwhNi9zss FgMh/i4JGwjSkFlQ5f2R83OXqKiXDRSjPrVly+fUfMCXK9w4tmgknvOBUwJKw7PwUikP wwYuie70kS8dcWQm059lNVB3W2ACUhaMlMO07wCyabF3pZdhDJJXj8wxPcG972Sk7XjT yyIWul51ycGRsRWWE0O4KJBDCWlsf1JoJsPdjPjW+rMR+tvJZJ5o/vcHJdVD64HY1vEl 3vlDrq2gTQYoSUrSXV4rOsUT+P+jJBX7ZOahl1Na2EW5n5VZR6JXdka90sEcVX5Jrom1 6qew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=luurb7sS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k7-20020a170902c40700b00158c6131014si10688946plk.518.2022.04.22.16.04.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:04:20 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=luurb7sS; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AA5F0293F52; Fri, 22 Apr 2022 14:53:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbiDVV4A (ORCPT + 99 others); Fri, 22 Apr 2022 17:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiDVVz5 (ORCPT ); Fri, 22 Apr 2022 17:55:57 -0400 Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 918522A3247 for ; Fri, 22 Apr 2022 13:38:12 -0700 (PDT) Received: by mail-vs1-f53.google.com with SMTP id b128so8480344vsc.13 for ; Fri, 22 Apr 2022 13:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Nnz4Zst0bPhyG4+bPpJ1xif7BM4/fGW7NbRucrhml4=; b=luurb7sSi/ydYptLRDsPmPwgsj6ufhuQqTdkq2XihF24gSb2V7bQpiYml/6vCKS/nV RNwz6hd7Kv0zPgYslUtDlapSgocvuQiiW5DxU24L5e1VOHPqVsiYVaevTmMy9HlS3nnY Typdh3lq3/ajCM5q9+iqANcP4SdwcVj9PZge1oo/k5CxmS4whtxk+O4A0uWX/ed1vK/S n14AT1JOExIKMY9XX7X/X1aOMAc5ewYRjXPDcwH1xf2p1kdrLWPyIv3LT/50eAI1Iby0 0q/7W/WJTnTDcGs3HzyiJ8fvNJWC7ekuTAynzua6W4tXY7u2i7sJMPJ9Nm9AkKfaKj/4 PrtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Nnz4Zst0bPhyG4+bPpJ1xif7BM4/fGW7NbRucrhml4=; b=bS9LNfPQrTRFdalxP5tv9iT2CMy8TYjMtVErnL1yrTYjNh4u5/bKHbLGIdqn1X4Hd+ GBQNX2y8UgA4Np7Ev32sFlwhkz/JG1EtkXicEcUoOj+BINxw3fyWuTIXMwOL5RgGG63U hoKQ3vQagiyX8mIXGGUywBed/btvY5d5zRvradEuJNGG4OIsgTaC0iLorWgak5e0qSx0 IPhBI1i1g3j5LmCjnTbTS/kj+I2XYXvp2gjeCNwZPi/jT5Awm6GkHzFTAvBWqLFIbZgH IK9MwpAoRY0YXyujqDp1Yi2qw6hUc2uaDOlaplvFC0osFF6hjPQ9q8IgDSFtgEa53w1B HsjA== X-Gm-Message-State: AOAM530Vsbu6/3wzSVii3jtgJEZHfMPYbVmHF+RZXnV38zgz2IwmAtNN yrdp/V4QNzm2h/NtxbehCU5JiPF22KN7BNCJcLtYaA== X-Received: by 2002:a67:2f44:0:b0:32a:27a3:7319 with SMTP id v65-20020a672f44000000b0032a27a37319mr2012915vsv.49.1650659372631; Fri, 22 Apr 2022 13:29:32 -0700 (PDT) MIME-Version: 1.0 References: <20220404211858.968452-1-pcc@google.com> In-Reply-To: From: Peter Collingbourne Date: Fri, 22 Apr 2022 13:29:21 -0700 Message-ID: Subject: Re: [PATCH] arm64: document the boot requirements for MTE To: Catalin Marinas Cc: Mark Brown , Will Deacon , Jonathan Corbet , Linux ARM , linux-doc@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,USER_IN_DEF_DKIM_WL 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 Fri, Apr 22, 2022 at 6:42 AM Catalin Marinas wrote: > > 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). Okay, I changed it in v2 to explicitly say FEAT_MTE2. Peter