From patchwork Fri Dec 10 16:54:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 12695615 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 92ECDC433F5 for ; Fri, 10 Dec 2021 16:57:15 +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: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:In-Reply-To:References: List-Owner; bh=f8VuXCP6Cj0TTIrMBKXjdj2puCZ9Ii+ef7eL4WuTtbc=; b=4ylNQp/ljJ2aJV zlJbO3gHKfk6sPkYHhVX7qBhKR+c8K9wr2oci/r2UrbzdRFZFPwWUP529TdroFJvKvoPekTsbFno/ /aiBn6pDKjV+dZiZpiYAYwUzAvyBpUR/2Cx3dpMvOKmAgrjxLyOsngt7XchYiPyVV2zO9Oruiv12T Mp9hLt9+/fwa6EEmWeNAiCgRoWzbWk7keQWH8rgdfA3mZQFKQtPzmwcNx2fF+4dZpwFLRm++MUQ4B +pxF+Gb0vcwhMDxlv2tiszi3vneMzBSk0wysS2cLepsVyvIoHXJBtTkH24kTats7TfApNkkgvkOBG MKZOwyOhez5aj8xRqzaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvjAi-002eqt-DX; Fri, 10 Dec 2021 16:55:00 +0000 Received: from mail-eopbgr140078.outbound.protection.outlook.com ([40.107.14.78] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mvjAb-002eoU-4F for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 16:54:55 +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=3O5BX9Lfs8QXFYKhGgLhVEqW6bP9TVo11yZ91FY7QyA=; b=UaFQeh+r7p8YudtvU5srCV/FYOef5kddKUP6AAKVSCnup9S1Nd4W1bHHjY0OhfSfr35BEZzkzHJh1QkyICuerc4a5/UagTaImvACYM6uRbOkoWwAVdSyCZw2eRM+5XEZnF1wIUCR6xLxvDSojXy8/YNTe127VKQihKXu5nxooD8= Received: from DU2PR04CA0037.eurprd04.prod.outlook.com (2603:10a6:10:234::12) by AS8PR08MB6963.eurprd08.prod.outlook.com (2603:10a6:20b:348::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Fri, 10 Dec 2021 16:54:47 +0000 Received: from DB5EUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:234:cafe::c4) by DU2PR04CA0037.outlook.office365.com (2603:10a6:10:234::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.14 via Frontend Transport; Fri, 10 Dec 2021 16:54:47 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT016.mail.protection.outlook.com (10.152.20.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Fri, 10 Dec 2021 16:54:47 +0000 Received: ("Tessian outbound 9a8c656e7c94:v110"); Fri, 10 Dec 2021 16:54:47 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: cd88347eafd61d09 X-CR-MTA-TID: 64aa7808 Received: from caf996de582f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D2B0CF6D-E230-43FE-9210-CE1D0EA6CF08.1; Fri, 10 Dec 2021 16:54:40 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id caf996de582f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 10 Dec 2021 16:54:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E0B3by/Nq5kiQbq2WVB+saS/jQW8evpu19qpOGUKRT147J63p5WglqVVd5HxAp2eIW6vsnQWOua6YsGr7cWS12S0g6aMJ5zl5aWGHQyC15MErhpmsVs0npoAhGKg0bITCNYI5+wHKtkqiE2+dIEd4mJEuD1ZvQfiKjwKjq6NfTf6TIupAh4YpBq/gu6p/zpBXB3gyiBij7/ANgfh1GReXYRHJ8Eh2J+GmGs7j1acPoS5fmWAdL5P3NQHrOZ1DBGXNS0+H5wJLtFMKVXyDrNFR0BotRw7RCNQhX15zx6u7JDHh3Xcjlr2btL+xuSh8CH6nB43R8pjCjEOg+PM/CSOlw== 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=3O5BX9Lfs8QXFYKhGgLhVEqW6bP9TVo11yZ91FY7QyA=; b=NzKLeBA+JPFHxYSo/jLD7NPOggAPIJ05TXdsrnujaGyvgKyHm+f5JYcUUZSa/+bVl7D1i+4kbPqa+7mcdNsnBxjOkrhAjcfOxhq6NX6zFvLWlRFLnDBUvtsiRTfEV9mKuVDk9Qej3Fh1N9Cib3CktkppZFRMhFuwhEba+njw+ee6fG2V4OF2VSB78z74dlvzvxjbdkCP8wXUT3TZlxrybvugKGxwcORmb6f/zakTEFpGslb/X+0hy3+qxpJWxmIJX7TeBeSKOVwtk6zNZdQwhkTabiwQw7ATx8XedFP5f4bryg+MerFTMZ1DNyHIe/GLtzhIsMLEsOOw27PqHLJHwQ== 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=3O5BX9Lfs8QXFYKhGgLhVEqW6bP9TVo11yZ91FY7QyA=; b=UaFQeh+r7p8YudtvU5srCV/FYOef5kddKUP6AAKVSCnup9S1Nd4W1bHHjY0OhfSfr35BEZzkzHJh1QkyICuerc4a5/UagTaImvACYM6uRbOkoWwAVdSyCZw2eRM+5XEZnF1wIUCR6xLxvDSojXy8/YNTe127VKQihKXu5nxooD8= Received: from AM7PR03CA0029.eurprd03.prod.outlook.com (2603:10a6:20b:130::39) by DB9PR08MB7024.eurprd08.prod.outlook.com (2603:10a6:10:2cc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.20; Fri, 10 Dec 2021 16:54:39 +0000 Received: from VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:130:cafe::4b) by AM7PR03CA0029.outlook.office365.com (2603:10a6:20b:130::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Fri, 10 Dec 2021 16:54:39 +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; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT014.mail.protection.outlook.com (10.152.19.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4778.12 via Frontend Transport; Fri, 10 Dec 2021 16:54:38 +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.2308.20; Fri, 10 Dec 2021 16:54:37 +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.2308.20 via Frontend Transport; Fri, 10 Dec 2021 16:54:37 +0000 From: Joey Gouly To: CC: , , , , , , , , , Subject: [PATCH v3 0/3] arm64: Add two HWCAPs for Arm v8.7 FP behaviour Date: Fri, 10 Dec 2021 16:54:29 +0000 Message-ID: <20211210165432.8106-1-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 8bfc8cc3-6a3b-4cfc-f677-08d9bbfdc5f1 X-MS-TrafficTypeDiagnostic: DB9PR08MB7024:EE_|DB5EUR03FT016:EE_|AS8PR08MB6963:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: DtnE7eu2ELA1Bvn5zobgeTnMGpMQ3NCihwU67lurkHwa66wilYH5jFpul4A/dXVqnrofekk/i4GTOG5C4gqoYmYQLFhlm+2WSuFcGGrmwCeQ8q/qTz7HI/03oa4cIVQiYzie2gRxklQ1sRySkoKl9WQaf3clDWHSiH875rXHv7swDk+1ohkAqs3PZoN0GXSSnCXCPCf4AWuRn7YWQ0S2xygECaCG89YQwfFljggiEUnvPUXFhKfcqchlyFLpnZKBiPhFL5hL566H3JvTf4IZ2qjoXEI8eQC2uWdFkXHIoyegAiG2BJfktOiQ1RpbKXA+ccp+5PjIRYd+LOnp11yzrD+2yQjqiR8OXYHITpBuv+WWomI2elc2HtF/Hggl68LtKmV80GBiKHYYMtZGOVSJSQEXtwoHxtV/HA9LADwePxPjIESWh/I67YmIyDVdR2mEkOkGtZ1KWQ+zbTJYFSyEKKRsWs7gzWd5amvXeTxxALGa1GdM1YmeEJY6G0kTvXRU6N+2LzLPh4+K3yaZ1DvacIgmqxIdj+8YpPpIPI6KKzbl0gzHgGiptP1qw4PMR9T8VdcZOWV+mgtHlVq5C8SZeH6NBmaKVg6Fq9FsCAYrrNFpEDg446IwQttQshiifVeT6DDcBnZQej9deNnI6rvNwZ8vQcLdfaO0c2xnI4HRGSWwUbn3RxuQ9cpiAf4zVdiI8bhTSRLI+KZnkB/pUWPVvaDpbRTjdov2+r9p8gNhaBLh8fDWOqzdCrmv4WbjHMGQx4/Z9byywjCuqlKe6bW5mi0d+XJsjHMfiEKgjSCGK6b/CaAi9ijRTfTjbxl1f7DVWp+FZVGJ0/hIoKZk8wpPT20oEY2Cra5O1cLfUpPFJ7Gtm2VKdpLzdxOSJatVVrz4 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:(4636009)(46966006)(36840700001)(40470700001)(36860700001)(8936002)(186003)(86362001)(2616005)(36756003)(81166007)(83380400001)(966005)(40460700001)(82310400004)(316002)(356005)(4326008)(6916009)(7696005)(336012)(8676002)(426003)(2906002)(26005)(70586007)(5660300002)(6666004)(70206006)(508600001)(1076003)(47076005)(54906003)(44832011)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7024 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a6b5d6f6-accf-4591-3cfb-08d9bbfdc11a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hRkx5Bvlbsu1G/XDfG9OAyaqK3MzMxwWy7DgYWYpCjMQ5z0SAzdtSTs0NP36cOvXA8gV7WnzqUmhbWC/b5Hgr6qSYFZgYzc+hNpHXPzzfhsW9UTnJwWa5U8ZnT3cGfvc4vuT3n807b4l91cnaD5G0PE+RK9QhzPJINEKdU3zx6VKJNJ87NCyX/0+eNyj3Qp8g91qAYvflf34YE4kliJ9BK8n8i3AE8UIgu7mhNI/fp5/IAiJTN+0VhRtHW/uVJL7nDh10aw/EVKXCyo831J/y5CmFXzdSuoZZ1um/YquMHdTeJvmV1M7UBbHcyxExqN0+wAlyur37VQ0mcxi+Wz5GDw9/Jci4bd29q6Ci76SrVwQFy6q633Nth6ct1FKwcTjSJdgfMviIMyIdGyhFJ85MnbvqN7txxtF1LHagW3j/LM8pwrakgrdUQ0wBQ8pXJYojwdK0nCMb8VPTdNKQsfi77LMDyKtxbQSimuoHffDXkAAnV5E8i6J4NQqkL1YSnoqiht4gqh97YrMKw3Tht17/pE6s6cdIikveqLRajMB2x9wqzWpsb8W2C98IDsbOH2iBr3Y4qeNsGm5aM4SHEpf4NCJCo0Jj2ChtuueAfE+Ye1wRHQtzuLwWeHNfC6cGx/foRcylPtKT7gSqTgWjlATjC+owj1+08oJi1s71PUZHLOYZYqGUMyyW+bgosXgg40pfxZOYPRv8TBNdWCxAEN3JFBAwmaMkWE32KVAeIxBcY4ujN/Es5J3o1KvudoGlxTrt18mDsNXhp6UGqATxtEVx75kmLoCmBXotCDSjg+jRnk= 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:(4636009)(46966006)(36840700001)(8936002)(336012)(70586007)(6916009)(81166007)(186003)(82310400004)(316002)(36860700001)(426003)(8676002)(26005)(508600001)(966005)(5660300002)(70206006)(6666004)(1076003)(2906002)(7696005)(36756003)(44832011)(4326008)(86362001)(54906003)(107886003)(2616005)(83380400001)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2021 16:54:47.1568 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bfc8cc3-6a3b-4cfc-f677-08d9bbfdc5f1 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: DB5EUR03FT016.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6963 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_085453_221642_C662A5EC X-CRM114-Status: GOOD ( 10.63 ) 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 series adds new HWCAPs for two Arm v8.7 features: - FEAT_AFP: Alternate floating-point behavior for specific floating point instructions. - FEAT_RPRES: Increased precision of Reciprocal Estimate and Reciprocal Square Root Estimate from an 8-bit mantissa to a 12-bit mantissa. These features can be enabled by userspace by setting some new bits in FPCR. These new bits are FPCR.{NEP, AH, FIZ}. Since these must be explicitly enabled by userspace, this should not affect existing applications. This has been tested with: - FVP: combinations of both features, including mismatched CPUs - qemu: regression test, neither feature is supported - juno: regression test, neither feature is supported Changes since v2 [1]: - Add comment explaining the missing 0x1 value Thanks, Joey [1] https://lore.kernel.org/linux-arm-kernel/20211207124226.50095-1-joey.gouly@arm.com/ Joey Gouly (3): arm64: cpufeature: add HWCAP for FEAT_AFP arm64: add ID_AA64ISAR2_EL1 sys register arm64: cpufeature: add HWCAP for FEAT_RPRES Documentation/arm64/cpu-feature-registers.rst | 17 +++++++++++++++++ Documentation/arm64/elf_hwcaps.rst | 8 ++++++++ arch/arm64/include/asm/cpu.h | 1 + arch/arm64/include/asm/hwcap.h | 2 ++ arch/arm64/include/asm/sysreg.h | 16 ++++++++++++++++ arch/arm64/include/uapi/asm/hwcap.h | 2 ++ arch/arm64/kernel/cpufeature.c | 13 +++++++++++++ arch/arm64/kernel/cpuinfo.c | 3 +++ arch/arm64/kvm/sys_regs.c | 2 +- 9 files changed, 63 insertions(+), 1 deletion(-) Acked-by: Marc Zyngier