Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16401854rwd; Mon, 26 Jun 2023 09:29:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7K7jqpSbn4YJNp9Y2ij33EApD3MZmK047wcOLkDWtImrOPt3iKI0QcQcpy+PCcSDtn+lcM X-Received: by 2002:a17:907:1c96:b0:96f:8439:6143 with SMTP id nb22-20020a1709071c9600b0096f84396143mr27623419ejc.40.1687796954060; Mon, 26 Jun 2023 09:29:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687796954; cv=none; d=google.com; s=arc-20160816; b=OsOQxK8JyRjlPlhJ5S4I8q/hQii3E0Y7d3eNQCtb3tOowfVGPmrlAwz88CeEBAXwxg OjHypASS1X5QINpZ/XmeQM645PX4j7JmGwHjK9cZ3c2/POSiIWbhsz6Nkre9PscRSYcy 2i0QLuMx3scehc414xpz+6QA5dSrQ2B0P95TwWzKn8bgEd06gRWbF8oaZOSGA4k7QaVq kjNYBheEa0Ha0pG4LulKAn5pXbtsa3tASVEBswf6CD6MYKLeoLuIX12g7rpZwGQj7WZ8 gV3spNRqgcFiAOYq+RO7sM4NgCbRU9P+Ct7QW5dOf3GmG4XknXITxNlHTMOTdk1lDKhh uiKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=aVJwCB3TLjzs0YWhgjaeMVHcwrtqiKN0UaCd6FzlEwU=; fh=Y/tnKo0U5WkxJ96cm/LNWV3TWqCGCX1worSUwXNVkdw=; b=XbolFb1usvUcVq38L/R8+AfTf0gMpmaiDlzzPAkjbBInT2aeD841OC6gOy7HDSTVDa bXVDHioZZKzcXh5oOeb+FYQ/na+lbTMdyYsSdU6uQl3OyO+99zx9Xgn1WdAcs5+n8hsK hbi++ieyX1q+l2gl/MVMkRqP5ylRFWo4gIMHu3oWvg247QqK9KxciTF/UqZOO5smUgkL 1HUqksbRhubF+c2SUXnxphVtAXScUlMpC2a3XZW2jT8F3zuq0dx5ZotchTeyeGTX6fJ3 IQYIQBw3RtGCjdv4K1POcSyn9mHQ3jVZAIgB+sPKLuvH/ayqgJgoMJJBjAg3tQkft7R8 EoDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJYpTvPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dx16-20020a170906a85000b00987522042e7si2753664ejb.245.2023.06.26.09.28.48; Mon, 26 Jun 2023 09:29:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJYpTvPo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbjFZPrE (ORCPT + 99 others); Mon, 26 Jun 2023 11:47:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbjFZPrD (ORCPT ); Mon, 26 Jun 2023 11:47:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA93F12C for ; Mon, 26 Jun 2023 08:47:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 705AE60EDD for ; Mon, 26 Jun 2023 15:47:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 597B4C433C0; Mon, 26 Jun 2023 15:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687794420; bh=Q60Kt5vlLtP8NFJ/7bDseV+2BBSppFzAzKnhgFt9Has=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nJYpTvPowv2grZcTH4v+Ljy1s52QpDQy2kgsioY81I9mMXSjRYFgq1B8KFPIjAYhm OvJcY+Q/9H8De5I/om0K+nUkh6J81V3JbNhJnD0aj1TjQjgD+tKwgTq/Z41Rh4J3WI Dt7S7GnJzpKELkmKmpXFRaS/VwFw5xygR8N0+0KFXtl5wSlOgReWRTcLAsMDU6sPWh 7QFEYDjvlK1bX0yYzlzaBRzgxY/PPMI271wTJawZ2kASTzdQ6ikQ8vht/spYKv7rez RwJ5OL4Ji7bjOo4xsFTEnrkMI1tFgUuvOG8ylAHm5ZE0SJqclD9LLty7NS1uu8fK8E cp62z+Nvkw8jw== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: Vineet Gupta , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Cc: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, linux@rivosinc.com, Palmer Dabbelt , =?utf-8?Q?R?= =?utf-8?Q?=C3=A9mi?= Denis-Courmont , Darius Rad , Andy Chiu Subject: Re: [PATCH] riscv: Discard vector state on syscalls In-Reply-To: References: <20230622173613.30722-1-bjorn@kernel.org> Date: Mon, 26 Jun 2023 17:46:57 +0200 Message-ID: <874jmuns3y.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vineet Gupta writes: > On 6/22/23 10:36, Bj=C3=B6rn T=C3=B6pel wrote: >> From: Bj=C3=B6rn T=C3=B6pel >> >> The RISC-V vector specification states: >> Executing a system call causes all caller-saved vector registers >> (v0-v31, vl, vtype) and vstart to become unspecified. > > So the only use case of saving/restoring V regs in __switch_to is an=20 > interrupt induced task switch ? Yes!