From patchwork Tue Nov 14 14:34:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13455394 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 05682C4167B for ; Tue, 14 Nov 2023 14:36:32 +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=tpu6iKr3Nfj9PJ Y414FZGkbiXvcIEPqU9AgsZxmsBt/rc9f1PxPktzPy22p5H3oN89UDb+8qTvdyc9cVaF3pR6Bb1lA ohXFQ+hkuxERFRJyaltHyMtWMzqim0f6cptJzbTIq0Ou39VsvRSaxn6EiaqYDCEHQ2P93yqhkRNU9 3E/DIWKP5FeAPrlMnpbOroNiK3J1y+LDZrwcsf5cLu5U1t7Kg0XfrzIuWSWftbD5A2VSliBZxOcUH CZCL+CxLHnLR0bAREodZgwKxWy6MHfneF0RVh5lzVNTTGbvGA4xO4Ndt8hlSix+KDAESs8dFtPqCc AUU6xBrO9I/7s1Qcc4Gw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2uWN-00GCWl-0z; Tue, 14 Nov 2023 14:36:07 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2uWI-00GCR0-1S for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 14:36:04 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id EF7F1CE198B; Tue, 14 Nov 2023 14:35:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9683C43395; Tue, 14 Nov 2023 14:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699972555; bh=+jSB6ryQw/tAoaW0f6Dn8f5r/j3Y5hYXa/dEZzeKHsY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=SEGdzbC7b3wvMV/Ivzh+9pjvZ4JIMa9KlE7jQa6b4P2pa6rq17+x3do5ktJq1XLux 7T4GgVQV7XbbzuW7I2oE2Q1GisQDn5s60Zm9L3lSQruv90HXyNcPZRO98vranKE7l2 /GrQfWQYcZjvSQUQGvLmKA+UQt+ba+dAoAnpU2Up9slFFsWZJiYEBrBEIsxsQZGNrJ DxNdqxvl+v1I8aIMm2OKN44VvNMGy752EsPi39uSdacKE8uDorHkb/u9pEjBsDRrAD 8gqTuFsq5dcoH2Xpq+C6lSGdEw9sW8wZvPS4wRmKOXjCUjZGbBj64nFj7lUQKALnli AeCR4q53PRrdA== From: Mark Brown Date: Tue, 14 Nov 2023 14:34:55 +0000 Subject: [PATCH v2 10/21] arm64/fpsimd: Enable host kernel access to FPMR MIME-Version: 1.0 Message-Id: <20231114-arm64-2023-dpisa-v2-10-47251894f6a8@kernel.org> References: <20231114-arm64-2023-dpisa-v2-0-47251894f6a8@kernel.org> In-Reply-To: <20231114-arm64-2023-dpisa-v2-0-47251894f6a8@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-0438c 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/pANAwAKASTWi3JdVIfQAcsmYgBlU4WcKwT165mW8oQVRPIaZv68B/WwcA+JzKzLOCir kQlxz5+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZVOFnAAKCRAk1otyXVSH0GMdB/ 4+cijMYPYrqufsdKVq1iYT/G7uPwkXJ9/l3VF+dAG1JOHxhY2b2Ce8RiIKiql/X7QgixZvMO/M/zOM ZPIUX4CV0DhhyCv0dry+chuyfHmZKstJzsDz4jyryyx+szv4am5GwIGJHOHVKQ/JoSK4k/SRMyKR4q U7TJe73E+13UCeTitrIqV6D2gDqr7SqeRungofG3SkzDPWAQb4givyRUVEyAWPEukXji4V58e40LzE mgNS18Eb0F4D4Ih3su5c+Ejb3IF390ueKDQJLFs6HKKcR82E589lXZnquLKvpuP4hHV/KUWZ28+PY2 8jL/aO44ctaIzBymlrA1ZBmmRoqanD 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-20231114_063602_684424_E09F3BE5 X-CRM114-Status: GOOD ( 12.03 ) 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))