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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC11AC433EF for ; Fri, 11 Mar 2022 18:43:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236217AbiCKSoJ (ORCPT ); Fri, 11 Mar 2022 13:44:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbiCKSoJ (ORCPT ); Fri, 11 Mar 2022 13:44:09 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3271FA229 for ; Fri, 11 Mar 2022 10:43:05 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 7AB8661ECA for ; Fri, 11 Mar 2022 18:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C86FC340E9; Fri, 11 Mar 2022 18:43:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647024184; bh=RrVVysxT2emlyWxm/g1Qt6qpkNRxKkUnB1UtTlEBZDk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V0hx8kaQOvPo5d+JsID8DCUcRVYA/9JKlWUTHoBde4H5v1q075qdsyCzzqxNWI9K6 Uipf6JGi2OaK696PkyT15/gNPYEc2ka3zdPQXuxlsgPsgdZ6FTq2QpFTFbbyln/jqg gLjfMUDNwHSuDnoqIETI4CG0Eq+fngWjrel1N+vYwJACTw96c9D93J9EDfvDnMSHB+ bwWKB+pFMbkFxLzztwVrBASUK+GUuuObfWH5orW1KuQfgOVtrkJrIxb0Sq1Fjl6WKd jVswPChCJQnoob9dOVcAvSAvcRMXwEZZ3qhXFwrkZ/T87uadesCom/b6a/0bMBzpTw gSFDCxmTM15bQ== Date: Fri, 11 Mar 2022 18:42:57 +0000 From: Mark Brown To: Szabolcs Nagy 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="P5FpQBAMTKNjQe4J" Content-Disposition: inline In-Reply-To: <20220311172051.GA257833@arm.com> X-Cookie: A fool and his money are soon popular. Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org --P5FpQBAMTKNjQe4J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Mar 11, 2022 at 05:21:21PM +0000, Szabolcs Nagy wrote: > The 02/25/2022 16:58, Mark Brown wrote: > i would s/SVE vector/streaming mode SVE vector/ Done. > > +* 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. --P5FpQBAMTKNjQe4J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIrmDEACgkQJNaLcl1U h9CtVgf/emgab4posEBW5QNnCwbr98z+484BhiatXjbXYG6tH0E7iQUHCY53CcUB 6JHVU8laUrdAOY8Uya/zJp0U0ImMViJSoOuOlmXRQbJwarTl8N41LEYcGRA1fN1G PH9dIgTiIH7450skNgveMIyowlOYNRTbx5VorbMMjpI2W1KVNXiIkv5ceZeuJCB5 Vt8tpy5w0fZIBf7E3MvvuX/dCRmLIt9HYjm89c8R2khh08EOTybNnCW1N6qVha/4 uryFjdSIVmtHtY8JdOuYtoPVjSBeQSNETHTVEJBEAw9TtEy5CegR637koRZcX9dk dmCp0qt6sIrDte8ZT3efTMlXQTUQYQ== =Yz0U -----END PGP SIGNATURE----- --P5FpQBAMTKNjQe4J--