From patchwork Tue Dec 5 16:48:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13480453 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 AE884C4167B for ; Tue, 5 Dec 2023 16:52:27 +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=NjxY/DqX7R6ztcZmgbluZWFSoOqcz1PvPpv19HiwOv4=; b=LnZolHfdo/cwF/ nAUa65BHyxUH12gSDRPzRXXYj0uZCdY9GHy3FBEGxJR/6s/DGuZ64bH1SzoWDAm6KdFH/t5ODduVM IbGIeSNGkx6wggSjBc7NDiU+eHEveetCouuQ5EosybNXz2uJDuED0G1cHZoydnRWWpiEunVu8bRy0 2RPhqkMOOVxghy2h9GEF7LjFSd+U9YIhLfq1q9BhqZ/A6hO8Q1kQ3kW9LVXt6URUsSo+zYgxnFcIa eFUimgfUhRH5/9X6KjQbSrD3mPApTf3+T0l69afmTG9L9Tzezl6GrN0nrfmsnK5sUGm1IMT48uKM9 /RAgIgyP65Yxlm3bCvUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rAYeI-007vtu-0s; Tue, 05 Dec 2023 16:51:54 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rAYe9-007vjT-2i for linux-arm-kernel@lists.infradead.org; Tue, 05 Dec 2023 16:51:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 66AD7B81A35; Tue, 5 Dec 2023 16:51:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17A91C433C9; Tue, 5 Dec 2023 16:51:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701795103; bh=+jSB6ryQw/tAoaW0f6Dn8f5r/j3Y5hYXa/dEZzeKHsY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hOEE6jkMfBUEtmzmA1a20oPe1c2o7yUFkOp3Soydq20VtoqeV10lZHXQxQw3NJ6p1 mcvf+CiN214KhEBoLcwbRtiKYBguX7jap49c859W398E0hXSgm/jUIUMH6Q+qVFzOn KtG8RFvhr1LwgmBNfKeAxRaGLfB6HY+TOnmTADBzaQfMqd/JgGgRoxbyi5b64Da9KD Ch6uNqSr2G36ujJPwYSxpiqlBe/K29leQ5Qs3lQOBEg0lC2yl/TTN5UchYOmzk3n96 7pqwn1GNdrWxsti1Iq7SFdFrLQb5TlfxVb4MMPiMNEvdYcwT5UT5AzANTw0M0JdKnp yzbxilEmRdBXA== From: Mark Brown Date: Tue, 05 Dec 2023 16:48:08 +0000 Subject: [PATCH v3 10/21] arm64/fpsimd: Enable host kernel access to FPMR MIME-Version: 1.0 Message-Id: <20231205-arm64-2023-dpisa-v3-10-dbcbcd867a7f@kernel.org> References: <20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@kernel.org> In-Reply-To: <20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@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, kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-5c066 X-Developer-Signature: v=1; a=openpgp-sha256; l=1057; i=broonie@kernel.org; h=from:subject:message-id; bh=+jSB6ryQw/tAoaW0f6Dn8f5r/j3Y5hYXa/dEZzeKHsY=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBlb1Twi1WtlQKKaA5nkPHlUe3V53qwJKTbWM22bF4r r3HvagmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZW9U8AAKCRAk1otyXVSH0JiEB/ 9XRJ2vuPLH6rhHC2Qunzpjix2wygMNt0T1tUgLYOD0GoobfEhVwybTH5ELOpKpZVcm0nQBB3xNGgWg 5MQWDMHDxejQpv0QOviokbMj+oOWuUQEEvTOPs8Tpe/ssY+k3YM4atL8a9ITybuuOv3gnvSX2pfAls MHcW4FTIlOukWiGyYs+PDgvBanU8KETC6LiA9eAa/zAe+3pIFYdYa+6kg+TggcotOuRTJfPz7+ryGY kUOK4r6FI80TFQn8IUK4i3/toQ8/FL9eztBf0SE2wydjH4wGNGGMyqEzx8jlq6/fqyjUtnTRNk6pwX chgJQUTMrr/hJkNvG8ydGY3SfPgOkJ 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-20231205_085146_091357_223D4FB7 X-CRM114-Status: GOOD ( 11.89 ) 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. 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 b85f46a73e21..9f9239d86900 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_RES1 ((1U << 31) | (1 << 23))