From mboxrd@z Thu Jan 1 00:00:00 1970 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 23896C433F5 for ; Thu, 31 Mar 2022 16:07:56 +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:In-Reply-To:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kuM9iu26rsHiQSZg6tZVbg9UxIonU/ekhABbqB4lH1w=; b=o4xLXJ9Rj/6NRp GrRO7MmW8bHSU+b/ZIAfotpVnxLnueeqJs/vUc2om9J2f8R2et+sDoI70iArNnLK3R8AT5iDM2guB wCQotzXUxzg0RiRG2KZHJmcqxZt8m/oQVXmlNTaSY/ItFM7UNvsgepChS22k09199P3pmOmF7rWNE 4e/ZJN3hUzjjKsEmiDioBVDyKZ8WmgUxFASiGJ/Yzs/uZz8P8JIEQSkhZKfC9FpRO+IRehZo9NguT sGheZjtkngCItHgS3F3rWmrLqcukpQ8SFcTGgUlcgoQq3MhJQrSjtUKbziuqqqBT+nlMx309HyEIP 1CVrKhPfj6Ytv5CWVseg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZxJe-002tQ3-LO; Thu, 31 Mar 2022 16:06:30 +0000 Received: from mail-db8eur05on20604.outbound.protection.outlook.com ([2a01:111:f400:7e1a::604] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZxJa-002tPF-M5 for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 16:06:29 +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=e47JLb4kfultrgpDC/XyWPyxOnLl59POSPiq4zw707Y=; b=lLQBeJysn4OAt69NQDqfgxPPBkUhFUX0ncp1NyCXcPN2DYR53CaZzAV7AMBgWePOB0ig38UBJ/+kopHCj2NbPC1mSWLI5phqiMqpEv/lZVmOi8FomHbpTRP03Rk/nFm7DnmW+hv6L8zmedp5i2d6x3C2UPtDC91dQ+iYeQ2yErw= Received: from AS9PR06CA0379.eurprd06.prod.outlook.com (2603:10a6:20b:460::12) by DB6PR0801MB1989.eurprd08.prod.outlook.com (2603:10a6:4:75::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.17; Thu, 31 Mar 2022 16:06:16 +0000 Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:460:cafe::ef) by AS9PR06CA0379.outlook.office365.com (2603:10a6:20b:460::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5081.26 via Frontend Transport; Thu, 31 Mar 2022 16:06:16 +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 AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19 via Frontend Transport; Thu, 31 Mar 2022 16:06:16 +0000 Received: ("Tessian outbound facaf1373bbd:v118"); Thu, 31 Mar 2022 16:06:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a3bb062844f73ebf X-CR-MTA-TID: 64aa7808 Received: from 6e11f4d42098.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7C4BE570-191F-43B1-B37F-463E7A164836.1; Thu, 31 Mar 2022 16:06:10 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6e11f4d42098.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 31 Mar 2022 16:06:10 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gI8uzOSepFiVh8MFjCT0KmAedleOgwI7tdoCnf6ko0rWU0VVuWY8/pStuJSQVgc71R+gWgm2RlKjfIuS3ZOQTRK6Z9dvmShYge87dNlUMXTwxibPuSzrDwg4QM932ZgPFAKC7xhfLBhMv+w02FE9teaPCElQENCtxsGbbEKFKkJ0UKIwJV8ildl9JXxDH1RQXOnBRPr8WsxJnIPqlEl26dkuXCcYDW+sKlyApz+l7U2flU4fIehveSp+Z6AV50ynX/kk4F//CrGv5gzX2W5xjBsn0+3Vp0+q3qSLnQQ9lBd17bdooRKw6ahYUEhI1+c8i9ZYQ/oTb9WXrf6Rhh7+nQ== 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=e47JLb4kfultrgpDC/XyWPyxOnLl59POSPiq4zw707Y=; b=K7VaasQY5TkBsGt0qO+xr9x49Tn2UkFiDYEhFyZQ6uUrnCz6iUdZXgFlYSdg67ESKxRdH+IbFheP7LsMYybtV+sOoP3iNXG6v5en04q4RxctbjssR6afzJblPL/GhFu/cmkUZcl3jox4J1TekD+6/rOr0kxIzxsFhD2zcWYa8683JDe03sz8k4rcZWwE4P1z8zBFaTT/KdDgqq3jyZu3Ce9mVYGiT4MU1BIBWJwhwDi5HH2Z0plM5MDbjirnVczmhpvvb85M0O9PmFywmLHRNHS+JKZUe6FGJ4JwD96P+hgTFbt6KWBGR+vHjkEbQTOfZHNt7no9Nns6cLOaXadbsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=e47JLb4kfultrgpDC/XyWPyxOnLl59POSPiq4zw707Y=; b=lLQBeJysn4OAt69NQDqfgxPPBkUhFUX0ncp1NyCXcPN2DYR53CaZzAV7AMBgWePOB0ig38UBJ/+kopHCj2NbPC1mSWLI5phqiMqpEv/lZVmOi8FomHbpTRP03Rk/nFm7DnmW+hv6L8zmedp5i2d6x3C2UPtDC91dQ+iYeQ2yErw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) by DB7PR08MB3801.eurprd08.prod.outlook.com (2603:10a6:10:79::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19; Thu, 31 Mar 2022 16:06:01 +0000 Received: from DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::7d6e:f858:129f:f240]) by DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::7d6e:f858:129f:f240%3]) with mapi id 15.20.5123.021; Thu, 31 Mar 2022 16:06:01 +0000 Date: Thu, 31 Mar 2022 16:05:38 +0000 From: Szabolcs Nagy To: Mark Brown Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Shuah Khan , Shuah Khan , Alan Hayward , Luis Machado , Salil Akerkar , Basant KumarDwivedi , James Morse , Alexandru Elisei , Suzuki Poulose , "linux-arm-kernel@lists.infradead.org" , "linux-kselftest@vger.kernel.org" , "kvmarm@lists.cs.columbia.edu" Subject: Re: [PATCH v12 06/40] arm64/sme: Provide ABI documentation for SME Message-ID: References: <20220225165923.1474372-1-broonie@kernel.org> <20220225165923.1474372-7-broonie@kernel.org> <20220311172051.GA257833@arm.com> Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DM6PR13CA0018.namprd13.prod.outlook.com (2603:10b6:5:bc::31) To DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 3958b28b-a2f1-4ed4-f262-08da133062da X-MS-TrafficTypeDiagnostic: DB7PR08MB3801:EE_|AM5EUR03FT037:EE_|DB6PR0801MB1989:EE_ X-Microsoft-Antispam-PRVS: 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: EIj44gwabxbR5ITA5r8Mrk51k8iMmJfAaaJIrLyDOVDfBMP/srEctfN+xQ9H80PhsIt8wBaDAj6fHykt1ElriIhilI4wWr+8feqNmgaBGLq/kkHqv+3Fyn5babPd8XMb+9ygl+EYN0b30y9+zf9HoAO6XUcgTy82GBCdIpzkfeVrfQn2UZMDi9VYWujV+UTSOd9zRP0N5SQ1YlXr1UwTjCJET6JUcgyPQVYLbfMQZypIxeIKhYx0xcN7MCPwmKYz/9RopIg8b4KjGoxVk53sW0y80YZvhFaBzJr6wjMY7jI7NGqnyz82NtR32Pxd4Deg7y1Iaiv3JYZ+mlHgYl0ayvxrrr8TIGZ4sJpzV1gu6Sg1airzYvJPSOLYv/CDCHKoT8r2MCgklBiw2wLoKaY9Nwt0BAOtKPPUhdNTxU98NmXH6qKhTNUuB5rU1qayWl2l8EPzzevG7NIU9MlkJ6A4KOQ9j0bJvIZe4Q2y/iKmBzAqE3JwDW98/EMONGQ14AgclWfycOxJVOSNA/5Q1+UUk/Sa82eAM/vbkIoch0Ch0qWA6l7tnEHxXPzfqafFibsYXQ7om8Huv1iv9k6wkgexBrw+OMOkatc0i4Pc+vDDy3MW/thxr+8BzWt8lFO0PdCHVJgpbjvG6ylWa6sa4I9jxw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB7179.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(2906002)(66476007)(186003)(6506007)(2616005)(6512007)(66556008)(8676002)(4326008)(26005)(38100700002)(6666004)(66946007)(6916009)(54906003)(5660300002)(316002)(36756003)(8936002)(6486002)(86362001)(508600001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3801 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ecadc2b-5442-4976-05c9-08da13305967 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zoZQXX6eJN8f18I8/ECd6ki/toqIzzuc4igJp47RH536sTxywpEvHbChfvZ1UyVkv+t1IwmWPoT6Vl0/Yeg/In9IzC2bKiv6ktMVyaZLFDNR4Um/fNHBdwNRirEujH91/oMvD9HHPsOiJfMxkKnvHf3p42PsnmqrzhATwYZyhWb2TxIoW8aC0DY63VIm7yZIcsor5ABsXyjOtcSGhok7cT/Ohuw8JUGvj0BE/jgiNTK56eW5VCfB3oNBAWlC5K8k55A1NGpMAyyUPfJc7ehrELcfVjoApDG+G/VKAqjS8uzD43txeG96d7H9MvZ20J5ZsYZl/rxrXZq8z0ujreMLcAl4hJkXLqvmGrqbRCRw88gT9uAdiafz29ibNMqZ5gwhxI9S9JO/LKPO1b4n15HtZNVrvruPQ3q5OOSGLO1yt96aKMpzEB/Zll3rmoyclkvfb/8eWMIoi2VM0JUqt9gyEvklEVWIKbkv2RSuH2qvoMxSUC3i3xOh1x812i688VVbC8GbbTjbX6srKntW3tCY8PzC/jM8yQvZUmMPSSaMlAyOZfUjoj/Sn//G2X0XVfVDN8uevMcUrdVcapCXl/4VMzVpX0xKjo00Z55dReQCx6rTQOt7WrPjZUWY5SQtfILxXfe9GiS67X9q7q5qDa0LFNX6yjy+UfQmuGADabwNJB3sF7yLVCZSe3ceWCvOaJrl 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:(13230001)(4636009)(40470700004)(36840700001)(46966006)(26005)(5660300002)(86362001)(40460700003)(2906002)(47076005)(2616005)(36756003)(107886003)(8936002)(6506007)(356005)(70586007)(36860700001)(8676002)(336012)(54906003)(81166007)(4326008)(6666004)(70206006)(316002)(186003)(6862004)(508600001)(6512007)(82310400004)(6486002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2022 16:06:16.3595 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3958b28b-a2f1-4ed4-f262-08da133062da 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: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1989 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_090626_763643_C6F2958B X-CRM114-Status: GOOD ( 20.91 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The 03/11/2022 18:42, Mark Brown wrote: > On Fri, Mar 11, 2022 at 05:21:21PM +0000, Szabolcs Nagy wrote: > > The 02/25/2022 16:58, Mark Brown wrote: > > > +* On creation fork() or clone() the newly created process will have PSTATE.SM > > > + and PSTATE.ZA cleared. > > > is there a reason why fork() clears ZA? > > > i think this is a minor issue, but the usual expectation is that > > on thread creation thread local state is reset in the child, but > > in a forked child the state is the same as in the parent (where > > ZA is preserved according to the first rule). > > It was partly consistency with SM and the SVE state (though that is also > covered by just being in a system call unlike ZA) and partly concerns > about what happens if the fork() happens in library code which isn't SME > aware - it would end up carrying around a copy of ZA with associated > power and performance impacts if it doesn't exec(). Overall it seemed > like there would to be less potential for unpleasant surprises if we > consistently discard the data. > > That's not a *super* strongly held opinion though, we could switch to > preserving whenever we preserve TPIDR2. i think it's slightly better to treat ZA like TPIDR2, so only clear if CLONE_SETTLS is set. otherwise in principle the child can return to the frame where ZA was used and expect it to work (it's hard to come up with a reason why would some code do that, but this is valid in a single-threaded fork child). sorry for not deciding this earlier. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel