From patchwork Wed Sep 27 14:01:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joey Gouly X-Patchwork-Id: 13400856 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A925E80AAD for ; Wed, 27 Sep 2023 14:03:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 061A28D007B; Wed, 27 Sep 2023 10:03:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 037B58D0002; Wed, 27 Sep 2023 10:03:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DCC308D007B; Wed, 27 Sep 2023 10:03:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id CC0818D0002 for ; Wed, 27 Sep 2023 10:03:03 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 02F451CAA1E for ; Wed, 27 Sep 2023 14:03:02 +0000 (UTC) X-FDA: 81282543846.01.D6D547A Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2052.outbound.protection.outlook.com [40.107.22.52]) by imf30.hostedemail.com (Postfix) with ESMTP id 44E4D80067 for ; Wed, 27 Sep 2023 14:02:58 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="5b9JoG/4"; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="5b9JoG/4"; spf=pass (imf30.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.22.52 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695823378; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=D+hbZSgGHRByh5D4CmkeYpIKsNyQ3KdCY1O6oqp43XI=; b=1ruBTFRKEHYXKnYQIekeVFHT/MKJ9jrGDMa7addIZVihhIFU5u42abWxlLhr8vR15QO/rK 8Rs9JfWWGi+LMpf9aYnI716LYRYRJl9juKy/G7JvVv8nwO78mHv8EigE5CF7SZFAF1/yn4 SpJ57mF+X+DSLrbSRTwnE6ZgirryL28= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695823378; a=rsa-sha256; cv=pass; b=6pyKEB4/wq3eStklRFwBgQlgsUgiGRo6rC+IxcAKb4o38TaT/7jZw9++p2QSVb1QN3dh6i krtt7HXTnd0NClM2g76pbRSTPwtRercFSotITPTQZrFbuCzfjyUruKa667Mm/OkbhcdzwW rSoQhjtGesKCeIYQ0LLJDFFmlXZaNHM= ARC-Authentication-Results: i=2; imf30.hostedemail.com; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="5b9JoG/4"; dkim=pass header.d=armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b="5b9JoG/4"; spf=pass (imf30.hostedemail.com: domain of Joey.Gouly@arm.com designates 40.107.22.52 as permitted sender) smtp.mailfrom=Joey.Gouly@arm.com; dmarc=pass (policy=none) header.from=arm.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") 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=D+hbZSgGHRByh5D4CmkeYpIKsNyQ3KdCY1O6oqp43XI=; b=5b9JoG/4HzMQ2+E+aeIMJPHrNlngT+i6Du3lUkRCYZ1wS/5/OknNgPy7VIYjyzajTNpZm8UWu8Iy7EfmLtJ0OqwPr6rH9y6e2fip1MLK+MiOGAOm7qmKiAHJ/f1zQWTDzeMqTriphiPP+X67bZhrCB4daFt12KxNGxPZSPU2BpA= Received: from AS8P189CA0045.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:458::14) by AM9PR08MB6642.eurprd08.prod.outlook.com (2603:10a6:20b:2ff::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21; Wed, 27 Sep 2023 14:02:54 +0000 Received: from AM7EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:458:cafe::e0) by AS8P189CA0045.outlook.office365.com (2603:10a6:20b:458::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:02:54 +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 AM7EUR03FT009.mail.protection.outlook.com (100.127.140.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:02:53 +0000 Received: ("Tessian outbound ee9c7f88acf7:v211"); Wed, 27 Sep 2023 14:02:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: afe11708d26285a4 X-CR-MTA-TID: 64aa7808 Received: from f9b540775bef.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 72E03827-71FC-44F6-8C41-12197CE46C00.1; Wed, 27 Sep 2023 14:01:49 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f9b540775bef.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 27 Sep 2023 14:01:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RvBdRzv0bTPcnGqa91J2rOsB3dJDVm0FwYNFcwfRdpNsOdHu+hxbi5Vg+hPA5CNVMFXuaGmcozVr0FAmw4qbEBTmsu93nHD3ibcsCfq5dte/TN1AsbFsDCBxp2XuvFd2bX0DNxFfeI5l9lisbve/8mlRv3CNmS6hWPaOJ0BNXydQHN1nDE3w5l5OEn0bHKJHTPbLPXMD4CxrfcAw94O+SGqEBKNK0Z7YRE3MStIG6vuBeY1vS+ax2Znas+DUMGB0EhNpoNTdnuJfM6l3moX4VTG0szOSPme+GbPzhJ8xmXYZfEoddMIG/lRIFGgdb5vyzo+l6f8HjzKFYEqOwAf2iA== 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=D+hbZSgGHRByh5D4CmkeYpIKsNyQ3KdCY1O6oqp43XI=; b=PYf2bNPLVl/bGvQQyQ63Lr6RHNNEKrFnXfsBK85fGep3KjDC9RW5P9y79IhYD3gIoqjo/oIhQG8wevXxzrKqXwvqxKZfgrRrS2z6+QpztGtJ/1A1Tk3Y2bFD7FdcFyl5h4GBztEq7U0hcKZnIwuavQlvW9FWLH351+GoFG5Hy9i6rZM0tecs0Lm/vDA3kl0St+6nXtoenkG6WO+E33NQon7AfnO9fSftfK28GT80fN7K6oX0gxfrcXc4oAkqo/35V/Wve4X+XVqU3SInNNhw3JyFoRb3GWFHxC6oqOEvOlLLGpr7Dvs1hiappzIuuuwVAj9dybWVTjAKQPsX7yJwNw== 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=D+hbZSgGHRByh5D4CmkeYpIKsNyQ3KdCY1O6oqp43XI=; b=5b9JoG/4HzMQ2+E+aeIMJPHrNlngT+i6Du3lUkRCYZ1wS/5/OknNgPy7VIYjyzajTNpZm8UWu8Iy7EfmLtJ0OqwPr6rH9y6e2fip1MLK+MiOGAOm7qmKiAHJ/f1zQWTDzeMqTriphiPP+X67bZhrCB4daFt12KxNGxPZSPU2BpA= Received: from AM7PR02CA0025.eurprd02.prod.outlook.com (2603:10a6:20b:100::35) by DB3PR08MB8841.eurprd08.prod.outlook.com (2603:10a6:10:43c::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.22; Wed, 27 Sep 2023 14:01:47 +0000 Received: from AM7EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:100:cafe::89) by AM7PR02CA0025.outlook.office365.com (2603:10a6:20b:100::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.21 via Frontend Transport; Wed, 27 Sep 2023 14:01:47 +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 AM7EUR03FT030.mail.protection.outlook.com (100.127.140.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.19 via Frontend Transport; Wed, 27 Sep 2023 14:01:46 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 14:01:38 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 27 Sep 2023 14:01: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.2507.27 via Frontend Transport; Wed, 27 Sep 2023 14:01:37 +0000 From: Joey Gouly To: CC: , , , , , , , , , , , , , Subject: [PATCH v1 07/20] arm64: enable the Permission Overlay Extension for EL0 Date: Wed, 27 Sep 2023 15:01:10 +0100 Message-ID: <20230927140123.5283-8-joey.gouly@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230927140123.5283-1-joey.gouly@arm.com> References: <20230927140123.5283-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT030:EE_|DB3PR08MB8841:EE_|AM7EUR03FT009:EE_|AM9PR08MB6642:EE_ X-MS-Office365-Filtering-Correlation-Id: df17ebc0-04f7-423c-19fe-08dbbf62715a 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: di3SMZtegmCx2TvUJPRIM7KmphLWNEHLmCl/stFEvahVwdpkAh0d5gho5Boit0UEnqGMf8vmaoVZ1unC+G4sYGoqsUch5hos2cPMGJkb4V3c5jM7IjqOiFBDde1Gqm9bDO1Xq4GB3/XOkrjZcehdoTfW28Qf+qXnmvj66ENWqv0VRcH+Ck+JwM5fUINYrB1G34pXx80Il3VwgQsm8u6YkwYCm6iTAuykY466BMZexUKwf9bCqxD1jvEbfE7s0EIrHzaJmegn4p30ghz2WWRNdwsOcJAHojld2WsQt2L0biGC1ZhFTpUtOpTxlcGY0zXoylPgH/+RpSRvS1oPPjIiNupjH5+iGozNeu6mww94IYxd006Qcxe8d5OUPu5bLgOKp8cqB70Ryd6qmAlv9wOGktyjZqdnGA5T6xErOddN39xgxl7gg1MZEXBLWTXjQJOfN+k1Zs6t85r7kfSVoDfOxXsrpPOy30HsDPQkvzohUY5AF/7elNKa29RDn4TCkBqSRge/XGGxYfb0sCOSJjZ40yKa3xHGveLtQVAXlKMfNcb7wr+hpJAeMyzHIhrBKZEgddHpretJlz/R9tAbFE3s7jkHfPFtaAO6ZpO9EJogTDsLrvtUFHUCxQ0eLD3GHh4odlrXfHjM7+3uRAVMpK5uhGyqKY9YDzoZ8QOgbRTlX7oP0zanKB9dGaCpFH0sGRbX7v99Elx7zk9EP1iuG1Oj7aaMA9fGSFc9gbd9YB86XE4F4x5BYQ0tam7l39ZDRtSX 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:(13230031)(4636009)(376002)(346002)(396003)(39860400002)(136003)(230922051799003)(451199024)(82310400011)(1800799009)(186009)(36840700001)(46966006)(82740400003)(81166007)(356005)(36756003)(86362001)(7696005)(2906002)(478600001)(5660300002)(4326008)(44832011)(6666004)(8676002)(41300700001)(8936002)(40480700001)(70586007)(426003)(2616005)(1076003)(36860700001)(47076005)(316002)(7416002)(6916009)(54906003)(336012)(26005)(70206006)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB8841 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9373f7f5-9eb8-4313-1ae7-08dbbf6249e3 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Z/4sH+q+kCMja51SAAcTjHLxiQlF45Xy3DuqPT0SWvwRPP4vfFwgxXFf0AqU0LVdXLsYlnsxb+kZ9EMQbe9OSeSiOhen6dYSSeynrrS5tJNGGMhFsROUtm/cyteAuYc9qt5eQ1TDtksAWCqx1OQVe68myK+blv+F01dOQXk6AQlIyYvdTngdnTMXTmczxr9+FzccqyCqiihNayTxXELk/fMm18Ls5fYLd3gZ4ZDTrOKUrduk2Gunyj8syHT5ZoBWTgGJYRkwFv+z5ITHhY9utCZu/NkPDh7JVXWbRY68W8cNOfk6xN8p7KPVV+d5VX7nCGeMJtDgCc4R13ph5nH8PoBEolzY+yAv2CNxejCMHRq5raTUko1wBpmBkfjQMCgSJfpxzEfTsztklcoVd7FhZNmxS5u0IYtb+4XyqiIlxTrid5+z4YOgxakaWQOS3I0KYCbqRywtvaTultq4EQuy6MazaYeslwYwD9O9xy9n04gXZLVrrccgJOVXGJ83jv4aDBf0/Ubl0Y0vhyEPMTAUDYo1IQCIbKQ7gqIMAiZqIqbnphifoIcBblNz/pCbHyr7siSty782ejbqWSS5o2QSomPWhdfR3xSRMNmzd1T0eiHVzNOL1KJwExsk2U5JkPK8/1XA3W45aOwaj52v47bogghIQKcADsz5oE1nnaHmjYgz4a7jezvpGADsU298aO4jIxh2Qk0d0NnhT3vSEGVFX4seFDinnKAvYTbfKUeSs8avanufIr8OynCFsf0V72G4 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:(13230031)(4636009)(376002)(346002)(39860400002)(396003)(136003)(230922051799003)(186009)(451199024)(82310400011)(1800799009)(46966006)(40470700004)(36840700001)(426003)(336012)(26005)(107886003)(1076003)(2616005)(44832011)(8936002)(36860700001)(4326008)(6862004)(5660300002)(8676002)(7696005)(81166007)(82740400003)(47076005)(478600001)(6666004)(41300700001)(316002)(54906003)(40480700001)(70586007)(70206006)(36756003)(86362001)(2906002)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 14:02:53.2018 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: df17ebc0-04f7-423c-19fe-08dbbf62715a 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: AM7EUR03FT009.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6642 X-Rspamd-Queue-Id: 44E4D80067 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: 8kyebre4zir9j4q9ocd4gdq931nze7eb X-HE-Tag: 1695823377-98155 X-HE-Meta: U2FsdGVkX19D/uRb3kTIM0vObUKnO38TpTEn1SOEKUAwxHQrSSigU96ZbpyxAbG+qGy9o1XfyuWlC90B17YpCEuFb/Q7QzMTlaJJJSu/gqTsTh3yXy/eMsN3JmxEhTmosTnnrGOBncN8QxYwckY2Q2c4BNhhcJRkVxpzPu++bczJo009/dCBIfLueQrGnZEF5YamnPRbdewp0cnHYWGM6l6ppNN4iae4PdJYgC2XxhLMy/F0uX6I6BYpnFhm/Pwqw5gi/WXlqeaKsTz/xvKvwI4jr4YY1SCvewUlYspECIrv/UEi1e8asiGjqJ0G6D4zeOW+lu9P937xw+H5W+H6LuHwM1ajor09U7/oy3fILPi8jtqy2t4tX3Oeer+/9SfF96YPAvPzj397U5IvcIFdQBJKZScI1oaNZCK0hu+M3qGjhx3OnTHXB5m44JIIrPiZZLZoNdvULtDXoGd6fI6XqyLdPAIDgQecmelQibmla3qnEa3iiACwMQZeSg9OQkh4uSH+ElAdz0hnPCkmIgXevcKJb3jXXtP5uFmaXBDqMLaHk7qyfhu5qNPTD4lksUJf53BfNcMOiN3KbBtsEV1O1GF+pREEXanZgy0yyQWdF/N4qx947GRNvtn2NFFJBN/Yk86wumfal2xX2byVdX4HzkPb4HQsO/r61Yld6XVaVawB7rew3QDrQRXI67F+hI54nAw0su42Ts95JC9AbsmLe64UUkKZdG6TvORJ+Kocil51xiMHYnBT2hSBGhXVeDJTuYHYNScnbbGqdLPOcWh9bQTHMQ1JQA+OSInXEnioLpsQyB3ggTpNKqlCbcRHJUWGpfpbf+PVfqjm/SpqDi8QxcOx16QGCgd9G+RB0iUeCDmZheK2BTpIYHFOIMzjC/aggXf8VyGnRTe5rmpt413PxtaLUz+DhauqdZben8jSIEfIkZSMB14YYX1uXq35WWFm8axvQnlAVBpvfGjQ9uz mKFmdqyt 3fPNmu1hvxpLNPYnErQMQco7/RQdazcofu5kLWgGlpGcaPbdUjP6iUP67X+nR9pmyzmpG8kpPTnLsDR33Yz/4bMjYYTMX0xVAoeebiA5Pgo5bktQkgAl2rP+Wu0eg19USZgmCskuj/6TqwFCxGD0JdMDzzeNljO6omboErsxVr0xgqrH52DrGmx9znusV314Wytwnmemd8fYK/SxhBjevEMBXu65X6Vj1pCNh0nnYN3WC1wUnNFnvSazElKD1MQm4Lh0exjbIU3KsEgpFirxkAdgL3XxzkKYfXjnl3MkxbLhePY+dN5RgCkgpBYD+QbrSTV77x6IQMEImojpNH/MtW/oMN6jmCFSfY19BD9lJvpzGImLslzCYEn4xSciT5tCDxf8FPh2UWn/4jJRYScPXauykddNroRzZkyOetiKpYbxOP6bQJETQibJAb5FERF8pm960g3GM26QV4lCi0u91MsjLFBlaELJM4AzOaJs1BX/+GCWTH8iphRA4rUvbrCYkC14OErvzjHRtB97jvkLIyd+c0jHKhy5ExBOupbT9e11jfPN/SmFOXU7Foous5/Oab4tf X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Expose a HWCAP and ID_AA64MMFR3_EL1_S1POE to userspace, so they can be used to check if the CPU supports the feature. Signed-off-by: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon --- Documentation/arch/arm64/elf_hwcaps.rst | 3 +++ arch/arm64/include/asm/hwcap.h | 1 + arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 8 ++++++++ arch/arm64/kernel/cpuinfo.c | 1 + 5 files changed, 14 insertions(+) diff --git a/Documentation/arch/arm64/elf_hwcaps.rst b/Documentation/arch/arm64/elf_hwcaps.rst index 76ff9d7398fd..85f6e9babc7f 100644 --- a/Documentation/arch/arm64/elf_hwcaps.rst +++ b/Documentation/arch/arm64/elf_hwcaps.rst @@ -308,6 +308,9 @@ HWCAP2_MOPS HWCAP2_HBC Functionality implied by ID_AA64ISAR2_EL1.BC == 0b0001. +HWCAP2_POE + Functionality implied by ID_AA64MMFR3_EL1.S1POE == 0b0001. + 4. Unused AT_HWCAP bits ----------------------- diff --git a/arch/arm64/include/asm/hwcap.h b/arch/arm64/include/asm/hwcap.h index 521267478d18..196f21b7d11b 100644 --- a/arch/arm64/include/asm/hwcap.h +++ b/arch/arm64/include/asm/hwcap.h @@ -139,6 +139,7 @@ #define KERNEL_HWCAP_SME_F16F16 __khwcap2_feature(SME_F16F16) #define KERNEL_HWCAP_MOPS __khwcap2_feature(MOPS) #define KERNEL_HWCAP_HBC __khwcap2_feature(HBC) +#define KERNEL_HWCAP_POE __khwcap2_feature(POE) /* * This yields a mask that user programs can use to figure out what diff --git a/arch/arm64/include/uapi/asm/hwcap.h b/arch/arm64/include/uapi/asm/hwcap.h index 53026f45a509..8809ff35d6e4 100644 --- a/arch/arm64/include/uapi/asm/hwcap.h +++ b/arch/arm64/include/uapi/asm/hwcap.h @@ -104,5 +104,6 @@ #define HWCAP2_SME_F16F16 (1UL << 42) #define HWCAP2_MOPS (1UL << 43) #define HWCAP2_HBC (1UL << 44) +#define HWCAP2_POE (1UL << 46) #endif /* _UAPI__ASM_HWCAP_H */ diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 902885f59396..9b9145fdb208 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -400,6 +400,7 @@ static const struct arm64_ftr_bits ftr_id_aa64mmfr2[] = { }; static const struct arm64_ftr_bits ftr_id_aa64mmfr3[] = { + ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64MMFR3_EL1_S1POE_SHIFT, 4, 0), ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64MMFR3_EL1_S1PIE_SHIFT, 4, 0), ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64MMFR3_EL1_TCRX_SHIFT, 4, 0), ARM64_FTR_END, @@ -2220,6 +2221,12 @@ static void cpu_enable_mops(const struct arm64_cpu_capabilities *__unused) sysreg_clear_set(sctlr_el1, 0, SCTLR_EL1_MSCEn); } +static void cpu_enable_poe(const struct arm64_cpu_capabilities *__unused) +{ + sysreg_clear_set(REG_TCR2_EL1, 0, TCR2_EL1x_E0POE); + sysreg_clear_set(CPACR_EL1, 0, CPACR_ELx_E0POE); +} + /* Internal helper functions to match cpu capability type */ static bool cpucap_late_cpu_optional(const struct arm64_cpu_capabilities *cap) @@ -2724,6 +2731,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { .capability = ARM64_HAS_S1POE, .type = ARM64_CPUCAP_BOOT_CPU_FEATURE, .matches = has_cpuid_feature, + .cpu_enable = cpu_enable_poe, ARM64_CPUID_FIELDS(ID_AA64MMFR3_EL1, S1POE, IMP) }, {}, diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 98fda8500535..5b44e8ab9ab8 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -127,6 +127,7 @@ static const char *const hwcap_str[] = { [KERNEL_HWCAP_SME_F16F16] = "smef16f16", [KERNEL_HWCAP_MOPS] = "mops", [KERNEL_HWCAP_HBC] = "hbc", + [KERNEL_HWCAP_POE] = "poe", }; #ifdef CONFIG_COMPAT