From patchwork Thu Feb 16 16:00:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristina Martsenko X-Patchwork-Id: 58155 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp381900wrn; Thu, 16 Feb 2023 08:03:47 -0800 (PST) X-Google-Smtp-Source: AK7set9tocH3mxZJ+Gw+KCUoah1gs5xaHEQcWAgIQOxExIZN0JOvQOEKiHLMojSiUOmdrVsoUYqe X-Received: by 2002:a17:907:a42a:b0:8b1:730b:a296 with SMTP id sg42-20020a170907a42a00b008b1730ba296mr1973701ejc.15.1676563427134; Thu, 16 Feb 2023 08:03:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676563427; cv=none; d=google.com; s=arc-20160816; b=RWvWIb5LK/UWkEiLSN43rx2NIBJpwZn79qIKSEJuBn5f2rPkT3DlFfnY88HUdVMR0x +1ZAOPgozJjkvDhyl0/tuh/LOEQhj1cl5ZDOP4ZiS1+Cg986vxJWPrVG48y3PG9po3a6 GENT8tdWtGg9H9JE9vm6ITMD9f46fbA8ie0uahQx+iUs0wo2mPPoxK041XjohBkmGupg mbX4JCMNXk1VYajMBmG/wTyl3yFDKdAft1DHv076UB6HDzg1G2B04jAhY4KLQYMxVXfW v/4e4aeGyYW52xtBV5bz3J7+uNNe6/ym9lt48wGsnxakUo77XSTVrZwRccasOGCtbb82 aJIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=SgtbRMfdu5mp33Qy+rwd39uorsnF+c3KKGd2Sg7VTlI=; b=r4aENq1cYQoYIpVbqrD3/hMYXy+12Z6hheHM10xdX6MPrLYHLLftxpOTBPYn5Tje/8 IbdGEpRxzGxP8Ra6WtKBFWowRXXnm1NA3RIqtc1dkjD8RnvaxARGcsi3cLY6XhBFgxwf EnJPu6lylerExJcn4qyOzXhX8/F7KupKSx+opX/pnrOLe8UK6V1jInBVXubOKJSu8mph uPr2YxRgv/twP0z+6rZNZfKTuchYWm6bH/VAOmpaJuPBj3UTUDhZx53DY0hfgy+ChOpA ZUuQzwpnTwfrJt7YxTDugdqZzM9FKtjECDQ8KpmPzcPE2d3YNww4T/AydHN4Q6Y/yL5E PgCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ep11-20020a1709069b4b00b008786508e28csi2018494ejc.1005.2023.02.16.08.03.08; Thu, 16 Feb 2023 08:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbjBPQBz (ORCPT + 99 others); Thu, 16 Feb 2023 11:01:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjBPQBv (ORCPT ); Thu, 16 Feb 2023 11:01:51 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D568D59B78 for ; Thu, 16 Feb 2023 08:01:42 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 432C5113E; Thu, 16 Feb 2023 08:02:25 -0800 (PST) Received: from e126864.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5D02B3F881; Thu, 16 Feb 2023 08:01:39 -0800 (PST) From: Kristina Martsenko To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Mark Brown , Luis Machado , Vladimir Murzin , linux-kernel@vger.kernel.org Subject: [PATCH 04/10] arm64: mops: document boot requirements for MOPS Date: Thu, 16 Feb 2023 16:00:06 +0000 Message-Id: <20230216160012.272345-5-kristina.martsenko@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230216160012.272345-1-kristina.martsenko@arm.com> References: <20230216160012.272345-1-kristina.martsenko@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758004171840802605?= X-GMAIL-MSGID: =?utf-8?q?1758004171840802605?= FEAT_MOPS introduces new instructions, we require that these instructions not execute as UNDEFINED when we identify that the feature is supported. Additionally, the instructions may generate a Memory Copy or Memory Set exception, we require that the exception be taken to EL1 in case EL2 is not able to correctly handle it. Signed-off-by: Kristina Martsenko --- Documentation/arm64/booting.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/arm64/booting.rst b/Documentation/arm64/booting.rst index ffeccdd6bdac..f3913ee94c42 100644 --- a/Documentation/arm64/booting.rst +++ b/Documentation/arm64/booting.rst @@ -379,6 +379,14 @@ Before jumping into the kernel, the following conditions must be met: - SMCR_EL2.EZT0 (bit 30) must be initialised to 0b1. + For CPUs with Memory Copy and Memory Set instructions (FEAT_MOPS): + + - If the kernel is entered at EL1 and EL2 is present: + + - HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1. + + - HCRX_EL2.MCE2 (bit 10) must be initialised to 0b0. + 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