From patchwork Wed Nov 22 09:42:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13464398 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86FC0C61D9C for ; Wed, 22 Nov 2023 09:43:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 21EA46B0592; Wed, 22 Nov 2023 04:43:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1CD996B0593; Wed, 22 Nov 2023 04:43:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06E406B0594; Wed, 22 Nov 2023 04:43:28 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id E70646B0592 for ; Wed, 22 Nov 2023 04:43:28 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BAC6116019A for ; Wed, 22 Nov 2023 09:43:28 +0000 (UTC) X-FDA: 81485102496.19.0E69D77 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf07.hostedemail.com (Postfix) with ESMTP id 63BE940004 for ; Wed, 22 Nov 2023 09:43:25 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iIJ0MfSf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700646207; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7UoFm5SVDocDJ2RGIB9LLgBQwfP1e0bUEXl3ZRm4uhs=; b=LZUTqDJLHfVfTcI7d4zv16na6bNiVPE+M5NXXOcZD760oEOor5awWGmf2cGIQrYykS0AmQ p+vU2c83NQSXR9qcDChlX5fZnYsTCuIHsRnwSndQhtO1fsNjxcQrRBxWV/HG/W9jWiloSQ D4A9wfM0/Ov/o8r/Y1LpA9vFmeS2QTo= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=iIJ0MfSf; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700646207; a=rsa-sha256; cv=none; b=Pm7oo+XMWLL5vJUoW9G8nYpFa5TrLxR6xKjxrtmEX/W+ylAB9UQyN1lQem50/2bu8y65v+ VUMw2Omwg3dN5yY5oFRkNsjNdJQ1x7cug/LOI4K8KoCTKDk7q+N+/PQbGWRBdsB/PlYD30 DVIJW+iXec2QPCjGpmoQotlNSX6KA90= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 80875CE1ECD; Wed, 22 Nov 2023 09:43:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DEF8C433AD; Wed, 22 Nov 2023 09:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700646202; bh=v46aUsbCUkfVZOkEZ7v0IxSRHU/syZrce+2sfpMy+L8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=iIJ0MfSfGFe4BnLUwdW5xpDU2/xqYSBGq5Cj51zuM4YqUFdMnvqeDyfxsUIisnU6b wUw0U8Wv0OtRwL9eJwl7JUSwkLZOKIYuD0AugCVQlgzdKZYYavos+tMW7NTLsmFKcC fUTaeAlnathNNURAxXfaZCeWFV55cs7UylMWhaFfEfZ8KPnWdlZD6rgrcgdbSK7hJg WbfctrcjTBpV2PpOorXe++LBEsLPqSRTj7lS0IvdWzi2ge+pX7iP5nGGrqwFD3lC2V BENoY33CIdapQ9DEX5gbQnb9HvHmnMnFes7cCOy49y2tQGmmB3gDv/79PJIL2Tb+ak 6A2RQiwxSADUA== From: Mark Brown Date: Wed, 22 Nov 2023 09:42:14 +0000 Subject: [PATCH v7 04/39] arm64: Document boot requirements for Guarded Control Stacks MIME-Version: 1.0 Message-Id: <20231122-arm64-gcs-v7-4-201c483bd775@kernel.org> References: <20231122-arm64-gcs-v7-0-201c483bd775@kernel.org> In-Reply-To: <20231122-arm64-gcs-v7-0-201c483bd775@kernel.org> To: Catalin Marinas , Will Deacon , Jonathan Corbet , Andrew Morton , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Arnd Bergmann , Oleg Nesterov , Eric Biederman , Kees Cook , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, Mark Brown X-Mailer: b4 0.13-dev-0438c X-Developer-Signature: v=1; a=openpgp-sha256; l=1640; i=broonie@kernel.org; h=from:subject:message-id; bh=v46aUsbCUkfVZOkEZ7v0IxSRHU/syZrce+2sfpMy+L8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlXcz58KUrsysjlaWSzO1jYK55QY/WSRM85IGvg PxdQ5ZK0xyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZV3M+QAKCRAk1otyXVSH 0B0qCACCvoOJm105lKv2ZPLjhkUmi7fDdR0EajV9UTvtTmDuiS9RoPv6qew3skKRJ2x99xSPM6Z MtWo+pWCObUZ/Em3l5ZBxXdf54PqlfguR3WeFcjJxgyWZFoYUbPGvfavfrfotOZEl8YyAR60lkT CE8NmFmf/pIXk4tmlokj6+AB4XXUAcDtuWo7w3VyW/4oC8t5jYKXNeusb7+/D03X7WNhzaqtsD8 E7hAKjI9aCqrTPVhf4fOkVUbCxisy/HohyaibsbUO56DDwyDFqhYNMmUsjPSZSKQXDMaY7nzsiX E2K+UxJ8O8oozTh0n/yiPavYQ+94mTSwGH/LNau3iMTKY0f+ X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Queue-Id: 63BE940004 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: g4yy6t1gec14xkz8gwat8naj479cg9yf X-HE-Tag: 1700646205-539107 X-HE-Meta: U2FsdGVkX1+K1qXypGGd29+YwQ4xNKjLcuS2UhklzHgfWPGvQxjrpL5NoI09oWA24CvRCQFY+bjPPoAN2QXtY/5hIG4DvAJTD+C2fnYPNNOzdqwJc1ezej+vJ98cCercqTURnRYGpEcHHPqNyLn38vlrV70midllU/darOaIz4TFaNNKQ0tQMY8FGqxm9UDhw69SGOytf8TtOT1xtyLKooaA5xVOT+4JCRff1HCrWlf8ftqUCsomhSuviKkfYlaclzFDPeu0T2rrZmv1z4qmy76aBiItbc9uy+uKVITgla4EatjiUIfDM5Em9Rr4YZWZuKHVJ3zRrpBqnDDg+s1uMCa8MHjkRkwFKy/VKwGoBa6gm9oZRLsSf88cMhLlw4HJ2QqgM294Ww92C50fj1zjs4DfdAcHXPlrTq5B9RvTpfzo2GyoYdnPkN5i4/bodhfHLEiAszyxU2otfMbay+vZh8vzbVsE1tm8tZE8F4RxFGtnelrH4Vr9KVfuBT2y0tRqlfElPfZsJjMmsZzL7z4MZ5GtihUUH6rsu7ipgiu1W6UguLp9W29/hlnNHBgugJWBCa9dwAqIbWQFg6P7m5X4LfEYF+wNAkQjX5gEB1xe4KMbvPaDrpZpt+oQqsCn2/Ke0CLesNZWbeYyNqSEe60W1H+EVFEFr5XIrBK2SAh+8LK/bpAd5ftPDObBBJ2CKFTNBOUebbihfq6+PArIptSn2mEVYKLyTI/oAWLT+PZs3Ql91+9nzJxqiFr82gyUUTfADHJ4XbmOdRTXLA1Ci7gE+RNN3rqB3kXiyw/89Q014nJIUkHVZeHTJ55it64hhG1YBEv7QULiDE32d400WEHdwJXgsxEL+O0Em1MYYQuXQsAoiJbH1MKkC//fleENEYgyfKBctRJKFVO3tzhuZQAIzuk3D/PhpfqZFOey4P0nTHMeQBBiLmuPmzCyvJ18QSsPOKchwkYufKDtiSBH0bZ LpCzTqzl QAjyOlenhayZM41bEXiRqxj7WThsmG1X7e607azO8FygOTKgbsvUUSXCedhvF03+/Ora3yBGzZU5svs50wMYITdXOXUmEADkUfDp2YnxIx5eqc84HhHCRU5ZW5BdGNzVxBgiaA+kK5jcqlfqJm+SmyH6T9Ye9cIENJZCpOP765V2lKATJyiNIieDx7F4b+Nmtb2jxe+r7Nlq2ni2MsYhWdoUfmsN3AqCR7CfQze4JOxeksnJ38wjg5e96czWSGSz1+Ej+VSmkjT4Q5Pgoi4gNj+r7JFgsw6DF6ZfyM/VESkTI/VzLZtQrzpqm3sjgbk9mHLW6 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: FEAT_GCS introduces a number of new system registers, we require that access to these registers is not trapped when we identify that the feature is detected. Signed-off-by: Mark Brown --- Documentation/arch/arm64/booting.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Documentation/arch/arm64/booting.rst b/Documentation/arch/arm64/booting.rst index b57776a68f15..de3679770c64 100644 --- a/Documentation/arch/arm64/booting.rst +++ b/Documentation/arch/arm64/booting.rst @@ -411,6 +411,28 @@ Before jumping into the kernel, the following conditions must be met: - HFGRWR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1. + - For features with Guarded Control Stacks (FEAT_GCS): + + - If EL3 is present: + + - SCR_EL3.GCSEn (bit 39) must be initialised to 0b1. + + - If the kernel is entered at EL1 and EL2 is present: + + - HFGITR_EL2.nGCSEPP (bit 59) must be initialised to 0b1. + + - HFGITR_EL2.nGCSSTR_EL1 (bit 58) must be initialised to 0b1. + + - HFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1. + + - HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. + + - HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. + + - HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. + + - HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. + The requirements described above for CPU mode, caches, MMUs, architected timers, coherency and system registers apply to all CPUs. All CPUs must enter the kernel in the same exception level. Where the values documented