From patchwork Sat Feb 3 12:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13544062 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 791FDC4828F for ; Sat, 3 Feb 2024 12:28:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C736E6B007D; Sat, 3 Feb 2024 07:28:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BFB1F6B007E; Sat, 3 Feb 2024 07:28:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A75D46B0080; Sat, 3 Feb 2024 07:28:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 92C506B007D for ; Sat, 3 Feb 2024 07:28:40 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 6C4AAA031E for ; Sat, 3 Feb 2024 12:28:40 +0000 (UTC) X-FDA: 81750421200.06.2C64190 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf22.hostedemail.com (Postfix) with ESMTP id 51D7FC001A for ; Sat, 3 Feb 2024 12:28:34 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mqlIJ5g3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf22.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=1706963318; 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=a8jtH1oUcGMH4c+I6cVXwqpZpK7+As2J/gftlqNgSBolxIzNz9EDkeOqk2caBuOUC845rX aHQuhGvALa7T2DxGg9jOS0tpZbNeqCJDII5OTZvficuxQ73YannBPWcsGhZrJnRDKyrrLw Jm4fuGZFbpzQ8JJHAQAnNiuQyHWfXsM= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=mqlIJ5g3; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf22.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=1706963318; a=rsa-sha256; cv=none; b=7HmKuOkR4xDMojAcY5fFx81Sqc03G77/pFJ6MbaR40NxLMBx13EnuFWKf4ZhHZv0Ip6mtF jFbrheeET55ScY+h4GmA+GYeXyWkUliObay7Ws+4kMIvazA/nY4Kur3WH7kfTWnFNNW638 2Lhi0YEPwbrMca18wfHN9oNJ/fR+a9k= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 57F65CE1F0C; Sat, 3 Feb 2024 12:28:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D8ABC43390; Sat, 3 Feb 2024 12:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706963306; bh=Z3injfV8td0LqFLeGew+/6AX1Y4kpAJIpTs5MPlZTRs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=mqlIJ5g3tl5q0vYK7ykUXUM8Tc+tv8rON+LlVXaOXLZkci6RbJ9fIy9D+0L3q7RZE LNE4wWCXSxPrW+6yc449KPyyth2xlowITE1wQPdj9VVu14q4p28fH6+Mr/dcOpooOb BbEVSpIijcUScCJRz0nwuXKIusgNuQtMB02ImSKBl+XJwLtQ3oHiZv0JTqosJnP+BW vVz3wocrNiQnKimT9yoE4DaY5NZfLqfpeiSu3Mb9VHmwvHRJOGxxextL0Vny9D7SQt gGZECkE2b9Lri6+3C5cMXoGpJNtp9oXBohTewFa3e/ub1biMSTSfmS2n0YRloz6YyT PQqWESBoDqKPA== From: Mark Brown Date: Sat, 03 Feb 2024 12:25:30 +0000 Subject: [PATCH v8 04/38] arm64: Document boot requirements for Guarded Control Stacks MIME-Version: 1.0 Message-Id: <20240203-arm64-gcs-v8-4-c9fec77673ef@kernel.org> References: <20240203-arm64-gcs-v8-0-c9fec77673ef@kernel.org> In-Reply-To: <20240203-arm64-gcs-v8-0-c9fec77673ef@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-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=1640; i=broonie@kernel.org; h=from:subject:message-id; bh=Z3injfV8td0LqFLeGew+/6AX1Y4kpAJIpTs5MPlZTRs=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlvjDUsly811JO8MY9VKwAyipGXg/WYYy7DrZJ9PfF WUTZtWCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb4w1AAKCRAk1otyXVSH0Cp2B/ 9ZbiDjwSsFZbMG4QBc+H/K8vKVC04W/sEbxEueoW6RvocX423DsgVKt7TW3y4gTB9CNsk3bfhBpSJy 6Ade2Y1WKbQ8UudQ6Q46T26n3UDyrCs+lO5Ity3TveBReAWASeqybFoYtghSJjhoomY3nitWgA805k L7UsEzNP/UsrMpJz13RSBlmn74EryWZcdDt0milhnxX9Vqz/uyKUjQnYUghRBg+gp4joxeRK9ZJH5A V7SJkdsQX6g3OWnLAUYwC5zljMqXzEGptSSf89vn4Fg8NoQPePUIgsU6RQ6Ebg2hlmb8qTSvHBEJ6p pwKlr8cYsYxj5L+KGlC1UFZ6mVJsri X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 51D7FC001A X-Stat-Signature: to4pru43y1dt6e3npqjzq146q7w9gg6n X-HE-Tag: 1706963314-666502 X-HE-Meta: U2FsdGVkX1/heVeKFRpgn6oa3O9gTS7RLucCUtnpZy0pJqw/limkeKUzH8x6zCC7gkAH6CR0769gpKY1638FcEoHKNtvUahttIZlL2N8gbUjOmY1JiyiZ9v/BnY+Crqm6JHzx/ZMV6Cajg168apcm2/hZ2Qm/c+ChKmNGxUhumuh6UcuzaaLLBGRkvau7cv6MHD8317zOoIXfPj9xy38iAixtG8mMlw3X8Is4Fe5tdpNf3TVut5yErSJpEzAzD9AsWmUG7Vyi3CcypTL5jWlFKLexAKTtDo4LfYfSZg+mf3ukp7nxiPVxcvjeuDSa5pTvkvAiWcuxKwSRTFmXsQwEaMsS9ZHKmwOI3J3RjeR7BucyexbHcVY2//UuIa2oT8FYlEPDt4L7H/HdYNIFYtcrvjRyjR9jDOJrPMIiIIInNjevNI8HWkm216TK5+jdoDW8NM8mXfSKkZ9lchljDEMeWcmouwS3uTcl89Sxy1YKqtdYLH9mVdQAfEI1Fn4j5F1b93f9rLpqY3dglIvoFcBNEqOUyhJ1D9AYyGPhMugCjsNtTMWi830MlGgN0pq44sfK8UzFu6LlJ6QU2RQfr3GlQuIJMDb8hjXDoMLssoZS3XJ9O8YZICCEyMjumqk5bHrVWZSt5FfUpeCgJRHnXXrTq+h1dyaG8AoeWEEZ+ffhbrpWpr7sbcdEthS14Uwz5b+V0oZB+TijsRJFOmjTNljQZLKVcZaFazzs/j4o8vpk8mmmw+rYEVJQ/3dlVNPv+PhPlxhrwV3AfF6iE8bl0cXEIRopG/elqWnHNOqDT9LMLM15cjk9/sw4FRhOG/eneIL+sxQby4RTjNh8JnF0bSzcvAuyRjL+mZsDRNo7dFCrYRf2gQCMSfGZkGoQMYP5FmwYo4GrAkcbvhmiCCXEFZ7ofRauvArESy80mS4ub7+R/HONUIebU5CYkB3beNvS2eWZ45g3KG1eQULvnYQrD0 K4Dttpy5 ZJOhivs3PKruyzDnDmtAypNTXPQTZzcOvHn+7LmaPHwFDdZ2h3t3HVKGVIETlHT04b02y7hoBAiq4zwN8xW490jO8FGZNVTNDGGsGU5m7M+CNFdF826oAEOUylBDjHIcAmszlgk32h1At/4BvPAxSlBARUzZ6QfLX4Pd7LNZscfbl03w/4qrXFvacuy7vV1rt6sB4i0D4BDn+T5JFcVtVOMAwrzlrmkJIQs7T8tA7EK/puhRTUa5s1Nb9UuJZw+RPH8DsEAtXthGCrHBqenGXL/YNvD+zbmBwqG+uRhbyJzPX+1WpxmWVNR2+PsC/iAv2bhAa 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