From patchwork Wed Mar 6 23:14:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13584755 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F3ECC54E49 for ; Wed, 6 Mar 2024 23:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=c1uBnle+Xe8aYO4ugn7jKFLVEhSwHcekA7p3uzgrGaU=; b=BwkRvsIBWPBsby UJ6KBOP1T97m2QuNJsN9mG2YKLvRKCJmu6pDbBHEubAAnUjZTslq0LMOmfg5TY9eDb+e81f2/bJt4 JmeFQI0qDiWQYuP4yhLhqiXiDbiOxGYaxleCdlHXYPvXE6QWhJ/YNGTG5CKZFhVcrh120eFUPgusg KOmtYqDWbTw7HtAZo/HLX1GAUSuVXMH55cWIq7jGq7Z6Gd9x8JlbRDAKrXUFsZwLvUowaHM4zfdNE aIZ6rAywScL4bqbdcU4edCoAHgd3R5UuHB7/BeA+OfdtqXuDH6FxRgIEY4MDtYjQt/fTcM1fEW52w T6/flV19TvntugnT8kKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri0U3-00000002Buf-0g7Z; Wed, 06 Mar 2024 23:15:35 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ri0Tz-00000002Brp-086N for linux-arm-kernel@lists.infradead.org; Wed, 06 Mar 2024 23:15:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 40B4161B8A; Wed, 6 Mar 2024 23:15:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53E9FC433C7; Wed, 6 Mar 2024 23:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709766930; bh=c6+ev3J3g90szEyl4vo/CFRyq/0DlKhjt2evmW0ZfuU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fqF5P00Zl84wdxff5SRIdUrNIJAB/bURXtAmcfywqbI+ewY5jIsFDi1tM5NB25Bgp w3KXUQTh0/ycS/9uqpH+9hBjz+oieKohnSWJsRSaefRpZdN3RSJkWNJkP+CsfV9N6T gy4dOpvmsl6sI3kkkiCJwhb3q5VvXX7DPdI+9maxsjA/cQNdSJr8zCGvoQLX39a08/ omLDW2xfGtji6EFuBAiUCzD6iHUejx4mxA9Y79VwG9rcVs4Sa1+0konIQ0jKnsNnP0 UbgpGQ348D+uTFF5OeZPEiqnrhfS/+s6DWEBIS/AALtjf3pAtbqiSVHgTONHF9rqsO F+ubq7mLpjsPw== From: Mark Brown Date: Wed, 06 Mar 2024 23:14:47 +0000 Subject: [PATCH v5 2/9] arm64/fpsimd: Enable host kernel access to FPMR MIME-Version: 1.0 Message-Id: <20240306-arm64-2023-dpisa-v5-2-c568edc8ed7f@kernel.org> References: <20240306-arm64-2023-dpisa-v5-0-c568edc8ed7f@kernel.org> In-Reply-To: <20240306-arm64-2023-dpisa-v5-0-c568edc8ed7f@kernel.org> To: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Jonathan Corbet , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Martin , kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=1083; i=broonie@kernel.org; h=from:subject:message-id; bh=c6+ev3J3g90szEyl4vo/CFRyq/0DlKhjt2evmW0ZfuU=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBl6PkCC5AHfKhJQGl+ou8J/JlNq2bo+cBISB6TRi9u P/PvPUyJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZej5AgAKCRAk1otyXVSH0BssB/ 48nT736fR2fqoWBaqGdIW3sgSHS7RSXNbSO4nnab6HYjaq1FLWvUetmb3gJe9jUjuwPntNiEknXkYm CUUFDBlKQTlR9wh5gg7SMyxFNZOUtN/Q6XU//QssowDxvy95anPw0tToww3dg8LtQLofzdbubO8mxi OCJ+CoiyEWp8Tnq19+FpI593q8qyUzhfu7/W2O+Xn8F+vm+L4af7vDVNkanHUBWa9vNVxaONBLKV0L JMFHOB3m/apqDrGkN/GVa2F3P5sEF6KrDQxjYJjah3iSF8kxsgxEI5GfmOKUlH/dRwQAa86pzKSDAg MWk9PFyLLAXN5TL9etkFp5fSmoTKz4 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240306_151531_457840_2A0DBF2E X-CRM114-Status: GOOD ( 11.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org FEAT_FPMR provides a new generally accessible architectural register FPMR. This is only accessible to EL0 and EL1 when HCRX_EL2.EnFPM is set to 1, do this when the host is running. The guest part will be done along with context switching the new register and exposing it via guest management. Acked-by: Marc Zyngier Signed-off-by: Mark Brown --- arch/arm64/include/asm/kvm_arm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 3c6f8ba1e479..7f45ce9170bb 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -105,7 +105,7 @@ #define HCRX_GUEST_FLAGS \ (HCRX_EL2_SMPME | HCRX_EL2_TCR2En | \ (cpus_have_final_cap(ARM64_HAS_MOPS) ? (HCRX_EL2_MSCEn | HCRX_EL2_MCE2) : 0)) -#define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En) +#define HCRX_HOST_FLAGS (HCRX_EL2_MSCEn | HCRX_EL2_TCR2En | HCRX_EL2_EnFPM) /* TCR_EL2 Registers bits */ #define TCR_EL2_DS (1UL << 32)