From patchwork Tue Jun 6 14:58:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13269339 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 EEC2BC7EE24 for ; Tue, 6 Jun 2023 14:59:59 +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=GfZernJTNqMp1iHo+QS9yzE98nWiPeCf+A2q1nHVxy4=; b=CEvJzxdUtus+nu ix834sb0qhvYTWkYbJi9Xat4SE9h2788dNXNC0XJc5w54qhpWMi9pELxP3daWU6kkLWV/U4iw9dqj rsEErFFND0PERKjTWxlBdY64XpGX3z5/rhVwIb7SC2YvOzz4h9UQ0xNOogp0XRrNWtjmkIu4h+AaX N3nlVtbCZGosXv0LyCtWpQlYdAEbVg5+R31kuu5atSrMXUgVCu2jud4PK8398n9pqPyDafzqr4aa5 SMGpY8KuyWEdBrXIk1sbyf9Di7K5uLNBDe9p0ohE1/PBRhsigRXQkw4P8fqjGVPD4iOSFNrlA1go2 VmUtgFRZc6+ZR1HpMnfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6Y9o-0028hy-35; Tue, 06 Jun 2023 14:59:36 +0000 Received: from mail-am7eur03on20617.outbound.protection.outlook.com ([2a01:111:f400:7eaf::617] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6Y9i-0028bY-1Q for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2023 14:59:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dldXYFf6I6CkN96u+bDwJ8BLy6Gy7x96E63d7WM4cUE=; b=eVspdL0cUPn9ShCp5wru1LyB5Q60ODxtRg6hTXQqop9vCAGyM/0LiNqer2RwtBZHM5t2uVOBGjnEuh2VqqAzKy5jrtli8GoXMnAE4plLGHDEGRB9SYhbuwbTFC3TQ32xYEh4whlfnYfwcmu4pD1H+Jlyu87EmHV0kDgVHDHPjhI= Received: from AS9PR06CA0242.eurprd06.prod.outlook.com (2603:10a6:20b:45f::10) by AS8PR08MB6184.eurprd08.prod.outlook.com (2603:10a6:20b:29c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Tue, 6 Jun 2023 14:59:26 +0000 Received: from AM7EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45f:cafe::4a) by AS9PR06CA0242.outlook.office365.com (2603:10a6:20b:45f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 14:59:26 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT018.mail.protection.outlook.com (100.127.140.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19 via Frontend Transport; Tue, 6 Jun 2023 14:59:26 +0000 Received: ("Tessian outbound 5bb4c51d5a1f:v136"); Tue, 06 Jun 2023 14:59:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 241ee6ac2423adbb X-CR-MTA-TID: 64aa7808 Received: from b4627912e3a4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9FFC5F5B-D9A8-4016-B534-E85EE699788F.1; Tue, 06 Jun 2023 14:59:20 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id b4627912e3a4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 06 Jun 2023 14:59:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NudLJpcaMIYOHKhwQA3yIclteBhkScfCpOW+f817PbjW6C3DWuQ5TPZ8nc3IwjSY940q26LYLV/4xCvCaxYdcYCaN7OE9Eurxh2jw0ThPxCFSKFvG3xnsqgpbyuZyluV9XCxs7l3LzCmCgISB9uutBvS80ZVtBiz1+KRszKZMcuZ/Fy/hJg2ZM3j+qgrFZ6M4lckM0hRl0duc4SdAuZjJqihsr8OTj2aqpgi+6YHyDaSX2Rf1nQ6Plq9fvjCh2/O2s6nXx9K2gzxJBFrRkTqvy+rIlmnur8LOSZsYOnPiO2Vk0v+aAxBIZVK4gJFQlxWCYFsrSdS78csjzyYMSxF9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dldXYFf6I6CkN96u+bDwJ8BLy6Gy7x96E63d7WM4cUE=; b=b27UGiAkQMr1FqWKxtFfL6K4LW9cf/TmbvicfRXTDtC/vBfGqV8ekOTa3LaZipWSRPSkTh7wFoV+Ee2ygHv4c+hLlPd9UOUafnlUCIwTDX6mRRKKettnbYyin45rxyxhhiuUZwnOfaQ0lhCyXrb8QXccFT8r8u7flH6nvSrZ3zRfhdlM+gS/BhHupbYDvH4TbrgBvZiMnOGs4HmE3t5QW3Q8U6C290idjU0RDs5W1uCLLXqOqGiIyfdraoyt+bL8gd7JwkBgdw6V6MmmIQyo8SkiN2G2PZrRfQwHDhg7pFqCC2691wVpf3SGE46NPzaalzxyVbsuNpBjButSNye3qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=lists.infradead.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dldXYFf6I6CkN96u+bDwJ8BLy6Gy7x96E63d7WM4cUE=; b=eVspdL0cUPn9ShCp5wru1LyB5Q60ODxtRg6hTXQqop9vCAGyM/0LiNqer2RwtBZHM5t2uVOBGjnEuh2VqqAzKy5jrtli8GoXMnAE4plLGHDEGRB9SYhbuwbTFC3TQ32xYEh4whlfnYfwcmu4pD1H+Jlyu87EmHV0kDgVHDHPjhI= Received: from AS4P192CA0046.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::26) by VI1PR08MB9983.eurprd08.prod.outlook.com (2603:10a6:800:1c8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 14:59:14 +0000 Received: from AM7EUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:658:cafe::3a) by AS4P192CA0046.outlook.office365.com (2603:10a6:20b:658::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 14:59:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT058.mail.protection.outlook.com (100.127.140.247) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6477.19 via Frontend Transport; Tue, 6 Jun 2023 14:59:14 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 6 Jun 2023 14:59:06 +0000 Received: from e124191.cambridge.arm.com (10.1.197.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.23 via Frontend Transport; Tue, 6 Jun 2023 14:59:05 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , Subject: [PATCH v4 06/20] arm64: cpufeature: add TCR2 cpucap Date: Tue, 6 Jun 2023 15:58:45 +0100 Message-ID: <20230606145859.697944-7-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230606145859.697944-1-joey.gouly@arm.com> References: <20230606145859.697944-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT058:EE_|VI1PR08MB9983:EE_|AM7EUR03FT018:EE_|AS8PR08MB6184:EE_ X-MS-Office365-Filtering-Correlation-Id: c32eabb4-3ab9-4596-4c1e-08db669e9f5f x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RzkYXUGgrvn1la8ES+WZg8WT2/0ehmB+cESc189YqA3ovoVtvUb4e6INOtxeSaRDg+iurncYkOboAkpfFefWaK17dM7LlbZaznYWpRiQWdJrOxatmfZYWpqLGGrvUjwVoQjz2+qynoAImUWefcWTQ/eNCHVaGFD+NFnO7jd7QVkVqsZb2h5BLtTzKuxw5sXO2rIb5xcHcKP5sveFzF6WJsQ1rft51jXr/e8MAoL6q0or/xdEY4Xtxz7FGz8SVvFFOtaTSeXko8o7+5oRwMkftBnXNnXoQnVK0i7R79W0rA63WILyJjurmKFpuVzYkFQu/qAOu0EtG8l8dDkp3d9lwsaS0nRP/bSfBFJvds3FFEuNhvHzoXehBOXTT2ukIz8slChhSUhyu2dFsNB0XoqK+QbHt2Xl/9wEcj+lgOsUvPJaSiI+2rC9COUcnYy/q3PUzcwryeTviemWDuPIzHheYEBh22UtuhN048ikZRzCrH9UEZuUX27xaNFpIxYEyYR3SpMlOs8SYv2TEkX1AKvdsKyf+HAMhCQvFWc86bX/FB6QSvdKpQIVEyKXhB4ZumEnA02/lQS35ElXKDuMEDWkthx1yT9KvRDxFPeyilkC6PsxCD489Lny+L/stCxWN5aK9RQoSyUJI0JIcF08N58uHnX6AbPHC2tE8462vtVOLcungtaYp0ousIf7+a9Yh9Cv6CTG9CuqAHpi82VMci4vfULpHaUOOj8Tn92Zdn4kaLw= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(346002)(451199021)(46966006)(36840700001)(44832011)(2906002)(36756003)(40480700001)(82310400005)(81166007)(356005)(82740400003)(86362001)(54906003)(186003)(7696005)(6666004)(478600001)(8936002)(5660300002)(6916009)(70206006)(316002)(70586007)(41300700001)(4326008)(336012)(8676002)(1076003)(2616005)(426003)(47076005)(36860700001)(26005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB9983 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6fd611a6-428d-402b-00f3-08db669e9812 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: z7Fev8KcEWY1kL2231pP17G7cV8sCwnbKhHiG5O856kwptzugRVpOa3IIzbrht0qjU08zEECq/ZWO3BGMjY4DpdRl6cOkDlYkGD+mV4vlEmtlrJZc61UsXt7lEvWhfccsoccujcmpGk0/ktQ7RFIRrBbpNMWFtG/8bW48L4vxSxA27HtG8Tw81bH1cdL3H1sFwhy1oDGrz3iip0rSVpxZAxdjaZikpKXa2U/HlUGGK0w/bV/hbeBGa1+QlGw3Xc0SyFZx2GLHLGQNY+pYS0VZVWuQg5lVVjFOY1sYQ0CW6QAnILV9KFBfcQYxCKTxUN6ggVNhwH9XdKx39yGAhnv3yz0y5z4O5CnX/RmHYjhmkUJ5JRwA1k9FOLQK57bXjFUORV4elYg7RUP1MlB+UqP257rsGxd/1ER7VOHGgrCitx6cfu8/eQTM+BwBuYlJF9BWVDgVVl8hqDA7yMJs9qL682h+DEtPSBPIoxLFglSDmz3djL5PN5GWswH4XndsatWQpWC2e5Vp5Asi8c+7dw/dZrotcwr0qFGqSFm6++KMgUT681EVAA0j29c1sMu7yIpcnOz7+E5sRIHHRWUI2WRVLJk3m5KTBxHTBAVkHheygvnSdGBLJAIVvoLQCh3xV0SVDmkaGaZpQRQ/UF8c8w9pPw+gMqBkaNVfzU5UmrFNbz9d7dPtHTS3em/V4pcBNTMWul83KReHGMdsDGaEkwT1537JcbfCwb7plR+9/JFiYA= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(136003)(376002)(396003)(346002)(451199021)(46966006)(36840700001)(40470700004)(54906003)(40460700003)(478600001)(5660300002)(44832011)(8936002)(36756003)(86362001)(2906002)(8676002)(82310400005)(4326008)(6916009)(70586007)(70206006)(316002)(82740400003)(81166007)(40480700001)(47076005)(1076003)(26005)(41300700001)(2616005)(186003)(107886003)(426003)(336012)(36860700001)(7696005)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 14:59:26.7120 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c32eabb4-3ab9-4596-4c1e-08db669e9f5f X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6184 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230606_075930_483901_3BCC27A7 X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. 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 This capability indicates if the system supports the TCR2_ELx system register. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: Catalin Marinas Reviewed-by: Mark Brown --- arch/arm64/kernel/cpufeature.c | 6 ++++++ arch/arm64/tools/cpucaps | 1 + 2 files changed, 7 insertions(+) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 416c794207c1..12107c07fb77 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -2674,6 +2674,12 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .cpu_enable = cpu_enable_mops, ARM64_CPUID_FIELDS(ID_AA64ISAR2_EL1, MOPS, IMP) }, + { + .capability = ARM64_HAS_TCR2, + .type = ARM64_CPUCAP_SYSTEM_FEATURE, + .matches = has_cpuid_feature, + ARM64_CPUID_FIELDS(ID_AA64MMFR3_EL1, TCRX, IMP) + }, {}, }; diff --git a/arch/arm64/tools/cpucaps b/arch/arm64/tools/cpucaps index debc4609f129..ebf5d4407b64 100644 --- a/arch/arm64/tools/cpucaps +++ b/arch/arm64/tools/cpucaps @@ -44,6 +44,7 @@ HAS_RAS_EXTN HAS_RNG HAS_SB HAS_STAGE2_FWB +HAS_TCR2 HAS_TIDCP1 HAS_TLB_RANGE HAS_VIRT_HOST_EXTN