Message ID | 20220125001114.193425-3-broonie@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 717C8C433EF for <linux-arm-kernel@archiver.kernel.org>; Tue, 25 Jan 2022 00:17:49 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fWFaUOkHY9uGFwDv1KeKLuRZegzb3fZbgZX8kKP+BlA=; b=Et0+HlS2jpYFYg 2EhgWWLX+uNIeHCuUKuNdJSYXSw/Y9CV2aPYMTDBoUSm6iiovd5nSGXKCBZqNQrNitjkBwh3wmHVV 8WL///V3clr7/fI4Aoqmw7NE4QnfU42qUuUzn8IAmOST1a9LG+5mj0Oo8kBpXfT379WAhRxS87ljJ oO7OqZ/xUW7ogf/H6EGzbqjGoD/ky9JCYHPt5oqT2TY00Aq9tQjNB777j728q1ZDjjOfEkurRh8Pn g556N9ib5n7ekXPb64mZMhBSr0gwdgDd3afr5ZBGpZCXIaSNpZOsBHSl/kwaGGPCaYNIFB/7q6gN9 R2MsEB5wNNeQVyq5SZBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nC9V0-005euP-Aa; Tue, 25 Jan 2022 00:15:50 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nC9Uj-005erT-Ih for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 00:15:35 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EED5FB811A3; Tue, 25 Jan 2022 00:15:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59995C340E7; Tue, 25 Jan 2022 00:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643069730; bh=3sonF+yHE0fhlKD09DOEsXzDPxYrP95z6ruAnvpEJGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MeUL/uRg+N8qGiQYYtiPz7kCxVupfk7Z6X0zH+TBJd4qidU6s1HGk0lDqGTNQzxRI Riw7e0nHlM9zKocG7QHaMZAyKWLWnS4mSHIfZiu6eCYP1byNJSlxDmxP0YaVLB1JLf XG1zmq2DBQVWuSaQsYE9w7EKIHDoF+9sFxq+O3vwSL5+1ge80AnzodOTBgaWRdZYQs 99SCiivx2Adel+QgiipPszfOxSE7Zwbpq+KkXEu70AYWZl1aGAtwHni7SrY44yOGgS HSXIQjsrTOeFZ28TEA3lcn7H93P9DmXgLRH6LkDrxL5vdt0rbkdqesYqwmQ6CmC5Zd ZYp4HDqS3OH+Q== From: Mark Brown <broonie@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Shuah Khan <skhan@linuxfoundation.org>, Shuah Khan <shuah@kernel.org> Cc: Alan Hayward <alan.hayward@arm.com>, Luis Machado <luis.machado@arm.com>, Salil Akerkar <Salil.Akerkar@arm.com>, Basant Kumar Dwivedi <Basant.KumarDwivedi@arm.com>, Szabolcs Nagy <szabolcs.nagy@arm.com>, James Morse <james.morse@arm.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Mark Brown <broonie@kernel.org> Subject: [PATCH v8 02/38] arm64: Add feature detection for fine grained traps Date: Tue, 25 Jan 2022 00:10:38 +0000 Message-Id: <20220125001114.193425-3-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220125001114.193425-1-broonie@kernel.org> References: <20220125001114.193425-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1329; h=from:subject; bh=3sonF+yHE0fhlKD09DOEsXzDPxYrP95z6ruAnvpEJGM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBh70AC//2QjAgtLKpaHN3VkL1TidYgxM2zCB5+nShw WJsna3aJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCYe9AAgAKCRAk1otyXVSH0NSMB/ 91vAjavGUrRIbSfB7NNYbejpWkY43ECBQHx+Kx1eooW4hgntBfKG6S182Oc689gzr7dhXdILY5I0C1 yYWTnJapu/KZnD18q178dDoijFOdHG33jOlPcEnU0CfCqE9wluRB+nYui6wjjngrg+g/99yXxYajuC I3B+Acl1NfSoEHYwcrr6PPWp5zqIUN3ZEufYMH9KIm3mBMpRL62QkWxZkD2dQ3+mYSBbkYR+vpcAmo N/6l1DM9/PgLIQsyLAtSx+lW6FrgwrXhjavAFeam0K4ocvtNnHbM1q7AR6aJQ1r7l2mWprhv/9VDpI /njnDCAr0h4TkbOE7RB/RPcX3ZX6Il 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-20220124_161533_929392_D9B33D1C X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arm64/sme: Initial support for the Scalable Matrix Extension
|
expand
|
diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index d9f09e40aaf6..ec060db1dcf0 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2400,6 +2400,17 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .matches = has_cpuid_feature, .min_field_value = 1, }, + { + .desc = "Fine Grained Traps", + .type = ARM64_CPUCAP_SYSTEM_FEATURE, + .capability = ARM64_HAS_FGT, + .sys_reg = SYS_ID_AA64MMFR0_EL1, + .sign = FTR_UNSIGNED, + .field_pos = ID_AA64MMFR0_FGT_SHIFT, + .field_width = 4, + .min_field_value = 1, + .matches = has_cpuid_feature, + }, {}, }; diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps index 870c39537dd0..b3ada80aa48d 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -20,6 +20,7 @@ HAS_DCPOP HAS_E0PD HAS_ECV HAS_EPAN +HAS_FGT HAS_GENERIC_AUTH HAS_GENERIC_AUTH_ARCH HAS_GENERIC_AUTH_IMP_DEF
Some of the traps for nVHE SME support are provided as fine grained traps so add detection of fine grained traps in order to allow us to guard usage. Signed-off-by: Mark Brown <broonie@kernel.org> --- arch/arm64/kernel/cpufeature.c | 11 +++++++++++ arch/arm64/tools/cpucaps | 1 + 2 files changed, 12 insertions(+)