From patchwork Mon Oct 9 12:08:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13413505 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 35151E95A91 for ; Mon, 9 Oct 2023 12:11:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C3EA78D005F; Mon, 9 Oct 2023 08:11:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BEEAF8D0031; Mon, 9 Oct 2023 08:11:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ADDC48D005F; Mon, 9 Oct 2023 08:11:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A07A38D0031 for ; Mon, 9 Oct 2023 08:11:12 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 6F99D1CA6BD for ; Mon, 9 Oct 2023 12:11:12 +0000 (UTC) X-FDA: 81325807584.09.3544C89 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf13.hostedemail.com (Postfix) with ESMTP id 0C7AD20013 for ; Mon, 9 Oct 2023 12:11:09 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=L0XZBUaO; spf=pass (imf13.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696853470; 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=9EiokGlVijer87hj8YWJ1OH7aG1LYVUNBq6hLY0xJSc=; b=xb87sCG+TO3kI1Li8dxWrQPa38oJwiQ44miY3FOFOwBWqgnaPLFJNtc8o7bgdwn/32a1ez VUCpe4VHLyyfOUi2buIL/1d36+xZ97nzqFen+YhIUdTCCtdrFikt3eJKnjuHFfje6w2jiq F8fkcwCkeMjuvyHraU3lA+3SLzRwOoo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696853470; a=rsa-sha256; cv=none; b=Cke4hehWSoGqoBl93DpTkq0ATdv0QKXIrnCwGMfawaOl7HLYrGeGHxBef3uBSyCa4sO6Vi NWJ87495ydBRneApI4+H7TbWh8Cx3KWvr/+I7hj6rksps9XC1DdVNekpsrQuZBxTeYY6gO cWC9EILHSJ9oXjPatUS7pClnjaWc3h0= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=L0XZBUaO; spf=pass (imf13.hostedemail.com: domain of broonie@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=broonie@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id B92DDCE1389; Mon, 9 Oct 2023 12:11:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B81EBC43391; Mon, 9 Oct 2023 12:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696853465; bh=Z3injfV8td0LqFLeGew+/6AX1Y4kpAJIpTs5MPlZTRs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=L0XZBUaOQXf9y9fsjxiv9eVVR1prSeIrYHJDBabA/g3k+G8CWfM8b33trE7OnKpn0 tJQfJ9ff2252fM07wZUSgLSpa7vHahVvLQ0ecavPAIEALPtz4WXg3avclmJQ4oAQEc ZQaGkO1pG/hwFeXLcXIKsodAVJMQzaf8/WlwBn2af3j909bI30I/fAU+x6FMr/sT5v xAr/OpoWz/xn1Fn88pdwdszlfvdlL0jLFH9368oejjf1kSwcWyjPm9fIwL0fCPqe6G yo36ILgazK0hG9aKH9TqWM7ehe+hvqfq2IWTpacLv+BdZnzHMs0v4G6TRwHCN1GWUb 3D1Fpox6VX5Gw== From: Mark Brown Date: Mon, 09 Oct 2023 13:08:38 +0100 Subject: [PATCH v6 04/38] arm64: Document boot requirements for Guarded Control Stacks MIME-Version: 1.0 Message-Id: <20231009-arm64-gcs-v6-4-78e55deaa4dd@kernel.org> References: <20231009-arm64-gcs-v6-0-78e55deaa4dd@kernel.org> In-Reply-To: <20231009-arm64-gcs-v6-0-78e55deaa4dd@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 , 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=Z3injfV8td0LqFLeGew+/6AX1Y4kpAJIpTs5MPlZTRs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlI+2U0MFICh6d4ltR364bbYSc0w3Zc0T2/uWHrmEL Sh9o1/CJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZSPtlAAKCRAk1otyXVSH0C6TB/ 418l04NMHU5UE9J1q5yLrG6ZJ2AnKPW9f3cHymnObOAisPsDelPkiMUmjXFq4hNuDacnZhdJOcllux So0ITDMff85io5ycrx6ps5TVQ+4q+hM7uRvQOSLENJOdoWim8AdvhRz5YOz3HoHt29/kemkbOvBRuy YqBfBZrdxTreYRVZXVinGijpDXHFJch6kzmjWNzg9HdLhos+fjGBuN4LYLT8O6sEF5qxehDFNn8ORt XdTDevlSf2Pwa0/MEdKyjS4HcfDwi5v7SixX1a5YRtuO0cwC5RlEvIyTiSRid7hZafvk2o+mhMa/FG m93bsvu0JONpaPuvF7SF8YTGE0o6mn X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspamd-Queue-Id: 0C7AD20013 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: azga3mtfimr35wteeogojqsseiqcmt66 X-HE-Tag: 1696853469-716717 X-HE-Meta: U2FsdGVkX1+FABoI2ZzbeCLdZu2lgOUcmDaO4pfHoybXgwL0zdtevJarPP2NGDvdb1pXoCKX/iew99NumD+W9Z1mVFZ4PG67/T2mIjBLTe8uzZ7MzIZokUlOin60HJi2F/Rg9qwFR5hbziwHe4R0i/Rvu8RtKFKd4pOAmF11Ktj22Yoz1fprkH6gD9uh3KCuQNpJvBrDkcb2AqgKIh6FWGLoQslz0zdGR7qeG0Vs7nXXHxxb0NwHy8OzVjHx4Qxm1KDGjmyF9O1F+IM5aJSUkbywHEi49Ae9UIMJ4u1ii521vIZwF4PrQkBGcYDvPVPWFefWrDL0tfoGXEHs+Rl5Rc0pEye5tG60eZgVrIa1vH2/4E0XLshVaKS07L5MEcuQgOr5y4UdWwTV91Tkz21LU6WVWEmlo7vIdV1moGRxnzMDUr1k2VrJ4sWBy7YT5jk5sbsBK+xJxXMrC9syNaO5KNfj+IN1X/L1viBDaZcdNAAJRbwfQYbdwXU646R4z6rqdsR99GzpM2L54q2lOg/qMpg5ttBZUe7XtntIfa6i1iIOKnOY/G6Z/rUt/uTGPSDRInb6DONgsjWUHtTj4jiQqg/2NVfeZDdakAej3eqz3fpRh00Cr7m5kgfQsDUhpLCgu3akLlnDDXrhoGvfD/ttdqGQNXFP4eR+ow2AZjmerk6AafAF3AKdaG+x4+wqnkzzbiQM2r/wc79biKoai9/qnyKX3EyTznpOF43AmksiVzqHKbv8i/cHd8Bu9mlpYjcMmPbjgVmx4BkjuFbBufPWJmnsurh0fUVpub0TuuO2tGbIhSsH0rqtPn7mLm71lH95JPzTzH/K/6LRMHTvbU34OjOmLArtSWgQEoEoa96RoaFI8QU2TPBfyuLFyOAcqoSs/u/7KfTbEBAvdRimUwex370tnjQSFCy3z7acB6CqIcJ4OgE/yRBc0KMmU1JP58qBNQfumuX6xqVziGAaycs WNt+/iCr J5Ob6eWPymFQ8V0DdX7KrkvSB6Ky0UZDPtTcqTD70rao5C6HRgrwlhUTinS7H2i3os7vLtOqfSfuOJqw2pdB6i9cI0zS6HJzthvOSqAzaQqKGbxuSMFisqVWfNYi2E//DWR/vHNCNpxXSQqfC5tBPx7RcTm5evesUCVzFyHiZ0VF/T4A+cFVbRc8n8/CEHqJRqh5jas0zo9zmbWbu6CVtjfmYGOxV0PgjJWeJ2bawqXtA/AAMhENOJ5x3x3SspGvVruuAmrF7aTpuixeIrWr/vXnUvZdQ8gq6Ot3CjDEQXrLgvLJQuL4cihOSMTUtXrGjyJSaVEmEF268UOU= 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: 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