From patchwork Tue Jun 25 14:57:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13711331 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 34F14C30658 for ; Tue, 25 Jun 2024 15:02:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9532E6B009F; Tue, 25 Jun 2024 11:02:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 900A56B00A0; Tue, 25 Jun 2024 11:02:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 753556B00A1; Tue, 25 Jun 2024 11:02:00 -0400 (EDT) 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 543346B009F for ; Tue, 25 Jun 2024 11:02:00 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 66914120295 for ; Tue, 25 Jun 2024 15:01:47 +0000 (UTC) X-FDA: 82269725496.27.7AFB039 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf07.hostedemail.com (Postfix) with ESMTP id 5C74640068 for ; Tue, 25 Jun 2024 15:01:14 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UlQ6TOIX; spf=pass (imf07.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=1719327660; 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=uuF1kCYHSDmeBVTnPJ7nzTaVEoW5bzxVh2y1icCdM2A=; b=1P16FLbbbGgVNptTEYlFfIhenjeR4gez6ebWukDCrGASPA2VzXxBszSEBI4cFJYlfhv2ul Gcub8dnbGYg3qofSmdaCW90uty/O61H5b1bAVgjVoCHADTowA6Gi/V/ox1JjaSkn/uzACs wMW7KKs9O21DZevR4xDA/AyK8HXn1pQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1719327660; a=rsa-sha256; cv=none; b=PM3C7GMjxNBoYfN0OFAcznqLIn5q5EeGf1RYtaepDC2H9P5ABD7/908gIKRU0feE4RHZTV uNJ924IJ11bMtKIUiMxxvMUf4xpXEFBdE0GdtD/8AE+6FoKm3838b6lDijLjhmS0ykno56 yt5xhsjXT2MNM6uj1TwgH07O600ioPY= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=UlQ6TOIX; spf=pass (imf07.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 8B1E0CE1B7B; Tue, 25 Jun 2024 15:01:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B79FC4AF10; Tue, 25 Jun 2024 15:01:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719327669; bh=TLqYNWudouYZxLvdqWlChA6sggy7uu0Dwx9vwrb4VlA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=UlQ6TOIX5U/4oKhEYjjToTqMk9dhcx8quYDFp8K0sioj/tbOYeCCXfVrd96oczp8z Q0pQ1AEPE7/HiIy4iLFB5K7j5ibW0DWVokTzX4lE65DjnZTxPuLIEonL3nXQHZo4wb I1UJpZGPwwry2LnPeMsiR4GEMN+zugwHkF83hfkYU8H4IXeLNzBw13xm9v08eRsvXH o2UnnQAkyjFtDHERdOf7OtR/mv89YzeejZ1SfVXzTUUNH+mqa6o4P92D1jIP5EgTu/ wa1xvOncxWbLm85Mi336N62dGPkN48DTMsPDIWS/7EieOqRHewAkc+v7shYz7cTJ2Y S49TMB6XfDAVg== From: Mark Brown Date: Tue, 25 Jun 2024 15:57:32 +0100 Subject: [PATCH v9 04/39] arm64: Document boot requirements for Guarded Control Stacks MIME-Version: 1.0 Message-Id: <20240625-arm64-gcs-v9-4-0f634469b8f0@kernel.org> References: <20240625-arm64-gcs-v9-0-0f634469b8f0@kernel.org> In-Reply-To: <20240625-arm64-gcs-v9-0-0f634469b8f0@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 , Shuah Khan , "Rick P. Edgecombe" , Deepak Gupta , Ard Biesheuvel , Szabolcs Nagy , Kees Cook Cc: "H.J. Lu" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Florian Weimer , Christian Brauner , Thiago Jung Bauermann , Ross Burton , 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.14-dev-d4707 X-Developer-Signature: v=1; a=openpgp-sha256; l=1706; i=broonie@kernel.org; h=from:subject:message-id; bh=TLqYNWudouYZxLvdqWlChA6sggy7uu0Dwx9vwrb4VlA=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmett1Wk4bVcZOcqjYz+jP+BA1iZz4W5DlLa3jsX37 CNbJR56JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZnrbdQAKCRAk1otyXVSH0PzkB/ 4mz1VzfKV2IStH+P2yx6moJG/TRBVMdnGiYeYEGpCKpfcS9fvAUUa+UcXCtCzkp6kwSyxHpNEH1t5W YF4qIhKfZK6ckvcyKEOjNRfTC201wS27OPawQmtGg9vUVLxpqvVXuUbk3ogailOroPHmLUqVJuyCsl 3IUNWQ8gBTfYiBHY1hM43UNn0TlRByOSPmRBK+1TYhSXjtiTb/Z3qOdvSQezoQaOaN7eRBUIKtkhgn Rxd9FaiCF5v2yyEsMNB5/Dzu7pQQZulY0aNKv0PmF4ir7jQ12xzbj/eBym76YS0TSBWH1pLhCjjN0d qgro1ApVVUoCz8Ybcj1G+v6E3ZNxhP X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Stat-Signature: ya8pnaga37nwwzj79ockzfy7gctdpkdh X-Rspamd-Queue-Id: 5C74640068 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1719327674-346915 X-HE-Meta: U2FsdGVkX18itZHfRarFrm8hgdvtGtCQjmX95uCGuNHA2pcDpqW51bYPbN+rFIHHeb9kSfkqodpkWLYSIuY02Kqu1lqbwBLb/KIeu4wvcdYG2PpxVD+hHJMTMeFhZglCeHO1K2S0AEZOOoPOLBTfb9uwxQ8O9TL2g8084fueDBrPlUjcdI+WsVpp6ak9q8HQ6iEct9kiod4gZjkyfk/ZPbnsM4PNMgc91jRVGjaimJDuANNS3+Fb2WSLoZnvOxMhQthY2clrvaVYMWIXkLh5yJoc9crM21ctdnX9CDNOg4b7QtbCaJDBNJNXmATlCmdNzDPbicoewaQ9LawkUSclvIen1B0NjAdnhoU0mN2nvmNSdvxFdFobEm1Ux3d/25cFNVmubkqsIUqjJY8kiO89zaJat9GlyfSH6WxMvEHM1pywVFzSaCiCmjv4PYLARWyJP5jB0+KMDak6C/RB7BdDcqW4MEfYR+5dsWi/N+HWTcyMJAb6IzRZ4PxCYWR9IkxwzJq4bcIxD+LpuyNgZdbfES1Jn3owv23NrSM69+QtgwbyuYNz0jr1nKcLW0lT07dKtS7S+py94WfAu0h24APegq9bDfA4umlvMPcNST+6ORPP3RxBJzbSe3woVgjDVvPM8PuCWUnzkVlNzDmFg5LmnfWEjk7uEDBFd/pqxoegOdkBqSPRa0s6O0FyrCwj0rhYUeKem7ePHu/cc6dQMXrowblFhsH1A6c07hlUB+AV5IMEuj/n0Je89WjLEjDUdzcAjoa+nL4o1X5IeLTZhvDE14mGZh3fFFt2zE4F0SApce8nW0AYXqB/SsIIDgv6rtIIrABM78s+BtjEsx3/CxYJVGsIBXUuoJ+Nuhjbcj715FGFqoRU14vliKvi8/1x3L0FhXeKcrJp/3M6YUtOzbruaIZXrUuxSjpIwbeGsESi/BcCmur7CcVVcLkJBC5j4vgLk1VweK+KtZbybK8L/oz zob1d8fc 6NZFWcjrQ+awKYQJqPObLmLKKXIcbG/ylPIH9Ea/Q/yCIb6yVy/fWFd7lEMo99XyUloMbwl1Lw9dccUUAcSsxIZHyOx1zOKstkTo8v/YIc0HOBmgaahZTnXjEdQwy58vy3UtuBOzOc+7lN0GH5j8/Ci31KQeYmwl4hnSZLBITR9Tp7IwOUY/qRtKTskBOP+tG7gPn7pJl7RaPieYiGuGK3WTK8oJljQLiDNmahwpoDwVWZQhYJPyy9vZtqXm1hgICQBF0qCclxdsT/LpMMP0xCBPcYRNXlBkuJQXz/m9nvB9OMwQXSx43VF7XHn8zcLToHkh0IS3FhPT5K7l4K1oLAupM8WOolZ93sYL1+yiW867L6hQSFKEatx5p0g== 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. Reviewed-by: Thiago Jung Bauermann 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