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 4014BC7EE25 for ; Thu, 8 Jun 2023 16:04:40 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NFt9JfmL8JY2htqUleeNNTZJ6uQ3Q4ka8cRfuTWSqhs=; b=NVFFYz+Qn/SBFJhuxO6uPpzf8k L6SrUPkNxxVIyJ8Uc6pgDWvXfudS1zs7Ujueiqwo4CpxMjchgGd0J5GFuRML0OJ0w2EPdP7cExpYM 7dOr2QdzOcOVXgUEKXpyjmL8dP/A9X92Tb9C2YHNDerVFR8w9UwHRuXdiLFJpDbd97iJJv7puqqFl 08dosC5rIE+o0ESLfj42jVYxLGf5BEtG/mOVGZge6xjHyk1hPjg3HdTEN1binvjKyDHXX8Qdgycrv 7rct5im/pjuUNsGNInIKum2/D+Fy34oJy9rLzX1NngVm3BjAN5jZygb6aIdCYvNoc0c3aD8GqXsEP ZGxkPn9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7I7R-009pJc-2I; Thu, 08 Jun 2023 16:04:13 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7I7O-009pId-1x for linux-arm-kernel@lists.infradead.org; Thu, 08 Jun 2023 16:04:11 +0000 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 D2FCD64EC9; Thu, 8 Jun 2023 16:04:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 951DFC433EF; Thu, 8 Jun 2023 16:04:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686240249; bh=f9H+3yXxvwSmJGxKQ/DBjTp81E44oQegFdzLk3uPs8Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YvxH00djkue9YGQvcVXdHTN7IjeZGU+vJ7p7BpnHdFKDRQ66oGKvdmFDhu11LotFl nz0olf0E4qyVQo/9Ro6hHrR3osNuU1meTlOPfNOsmWxDpEUFuozOOcNWWrmYF+8J3y 4b96H3SVLLEgoNKHdG4F+QyGf3TntC+pWXsuVqE1SsexjwY6/YIWGeRCcBzSAkfl71 lwIAorkWSHiwAcQlgExoH3nbSUY2afqpEEZ3CDB3RBuIpkUkL9xWUBmQRiISVrKjFr nEiIZIY8D1StbmgjTtoKOSSWT+B5lY7Tnl5h9fubzZLO5RMpykn30ivmva1TG9BAVi GCgY2G6SLUsdQ== Date: Thu, 8 Jun 2023 17:04:04 +0100 From: Mark Brown To: Mark Rutland Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell , Naresh Kamboju Subject: Re: [PATCH] arm64/fpsimd: Exit streaming mode when flushing tasks Message-ID: References: <20230607-arm64-flush-svcr-v1-1-7821a6199e0a@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Cookie: Disk crisis, please clean up! X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230608_090410_688082_F825CF26 X-CRM114-Status: GOOD ( 21.74 ) 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: multipart/mixed; boundary="===============8900772688507109894==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8900772688507109894== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+qV82rKrOrzP4fh4" Content-Disposition: inline --+qV82rKrOrzP4fh4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 08, 2023 at 04:51:26PM +0100, Mark Rutland wrote: > On Wed, Jun 07, 2023 at 09:30:51PM +0100, Mark Brown wrote: > > fpsimd_flush_thread_vl(ARM64_VEC_SME); > > current->thread.svcr = 0; > > + sme_smstop_sm(); > I don't think we should blindly do this if we never expect to get here in that > state; this is just going to mask bugs and make them harder to debug going > forwards. > If we need this, it'd be better to have something like: > if (WARN_ON_ONCE(sme_is_in_streaming_mode())) > sme_smstop_sm(); > ... so that we can identify this case and fix it. No, being here in streaming mode is valid so that check would be wrong - if there is an issue the issue would be that we're expecting that any further use of the register state would involve reloading from memory but there would be some path where we end up doing something that uses the in register state again rather than reloading. The change ensures that the saved and register states are in sync so that can't go wrong, meaning we don't need to go confirm if there's such a path. Though now I look again we should do a full SMSTOP since a similar concern applies to ZA. --+qV82rKrOrzP4fh4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmSB+/MACgkQJNaLcl1U h9D30Qf9HNaYiNl8I7Jcf99d1m8KO85jAobhM+72SBTN8edbhJglkTc2mRy9i9gC e7DwDnjgOvmYLziVhkhuDm+CnAserbwhmvpWWUS42+SKNL3Hl4MRKxvh5T+kYRk2 bblrSpGEA6S763mejnHcG2LkvYZvSuUhh59TdE2aRjqLuxykZhbrphFZK7N8NMYx 2kIf2eZGn1C/y8DqssVBkj9a6rFyTI2oDSqFkLBvcuapRlqUbQLQHpqPPl3FhWu3 kFRd0Xp91uzxc9OosBtRsCM6eqGy/1wF7TiL5UxabwOiEjSL71F6J+LMRtj+77HH LeiuDhu2wzXKYMeN5mxXwl/K51X15Q== =2Lv0 -----END PGP SIGNATURE----- --+qV82rKrOrzP4fh4-- --===============8900772688507109894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8900772688507109894==--