From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by sourceware.org (Postfix) with ESMTPS id 6B8D73858D35 for ; Wed, 4 Jan 2023 16:34:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B8D73858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-4b718cab0e4so32646217b3.9 for ; Wed, 04 Jan 2023 08:34:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LqdqQlesspNDXGGnijlTI3oVDhi9FDWDU+bglzO3AE8=; b=eoMKaO5cljcPF4UPuHN+cPVIEBEnCFD6LXiE26/nR8baZdQ1u2th/lBRpZ34uC1XK0 bb/azslGjCwJgQIX0WX0uKLX9tzbt9OfEa8alFy6QXZrHrBPrTujiQFVpax//bEwyV8a Gej9nh6UIgkDOvwkFoye/eAmkY/SPMBL5tD3tIoMw1pyp/6KqcoPpvYiaIiRVinqPmAw GaSkETXzcNdJMaxhkvs7Ef5wcC5mG7iGbzpWKOeme0pWcyaRxjxhVdElxNucVZCmRtsa R/XrcvctHHv0iAdQpEhTuaXikU8oXrKySQf+6ASW8W12xorLBvU14RMziIuHyZbg2XUs /kdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LqdqQlesspNDXGGnijlTI3oVDhi9FDWDU+bglzO3AE8=; b=hzZ/aBEXTOKltjkzAhnH8N44XK2yZxT0pj7jiedQH9CX1b03u9ptXSgRk6zb72tN6X 7MidjTrB6WI16q7218H8WAOIAx0b7WITU6KXxfDSrtnld7W6vvSwFcqKtez5andouIZ5 +H/nmtLeA0bMqPEVU+JkUUaVlXAzFAfv/5GL+5hs/PfLPjP/AR9kw8Dmgg7UG8KrVC6K EDwp1x0JYp5i8LQNORspWPym36T5nj6a5FNRNCqZrVUv93tDO17Jmxnwgu6yfNPQdEt5 ay5I72d4E/jVMoRhU1Zyb8L4cI5pLeew2w7/1CeLQ7+9ZgYWaufR4xooWgdoz59QfpJX 4lLQ== X-Gm-Message-State: AFqh2kombZaq5gHUH6gg944nelxHUTYDrlCey+xS/DLCtTS3QE5OmUf6 K4ebJiZupZCDk19E2Ae5ln1r6VB1sikjtTAtGfBM8A== X-Google-Smtp-Source: AMrXdXu5Hut/VnWhTG0E3fIf/ZB19TwzTMVbJSeVN4gYVuVK9YYO9pF+KMFU8O4jlcDTjiB+jjCOgsQcmG3E+r56cxI= X-Received: by 2002:a81:7343:0:b0:484:a94f:210 with SMTP id o64-20020a817343000000b00484a94f0210mr3516351ywc.129.1672850055789; Wed, 04 Jan 2023 08:34:15 -0800 (PST) MIME-Version: 1.0 References: <1631497278-29829-1-git-send-email-vincent.chen@sifive.com> <1631497278-29829-3-git-send-email-vincent.chen@sifive.com> <871r5sd1zq.fsf@oldenburg.str.redhat.com> <20210913135247.GL13220@brightrain.aerifal.cx> <87sfy5ndid.fsf@oldenburg.str.redhat.com> <73c0124c-4794-6e40-460c-b26df407f322@rivosinc.com> <50c598a6-e3b3-3062-abe7-23a406067533@rivosinc.com> <7430f494-9b43-5e03-c1e9-6b83e2611a11@rivosinc.com> <91ef3c45-165f-d2b3-7c77-322c01802c41@rivosinc.com> <18465ca3-934f-5b3e-170c-1ff0edea3a89@rivosinc.com> In-Reply-To: <18465ca3-934f-5b3e-170c-1ff0edea3a89@rivosinc.com> From: Andy Chiu Date: Thu, 5 Jan 2023 00:34:04 +0800 Message-ID: Subject: Re: Adding V-ext regs to signal context w/o expanding kernel struct sigcontext to avoid glibc ABI break To: Vineet Gupta Cc: Richard Henderson , Vincent Chen , Florian Weimer , Rich Felker , Andrew Waterman , Palmer Dabbelt , Kito Cheng , =?UTF-8?Q?Christoph_M=C3=BCllner?= , davidlt@rivosinc.com, Arnd Bergmann , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Philipp Tomsich , Szabolcs Nagy , Greentime Hu , Aaron Durbin , Andrew de los Reyes , linux-riscv , GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Vineet, On Wed, Jan 4, 2023 at 3:17 AM Vineet Gupta wrote: > The prctl support in there is really rudimentary and incomplete. There's > more work needed to use the dynamic state of enablement - for say signal > frame etc. Yes, I agree that signal and ptrace need special handling if we'd turn off Vector with prctl. For example, we may not need to save/restore vector context on context switches and signal handlings. And we may have to prevent ptrace from setting/getting vector context in such case. I can implement this into the series if this is what you're looking for. Or you could share the code somewhere so that I could merge it. > The new Kconfig CONFIG_RISCV_VSTATE_INIT_ALL seems like a > hack bolted on top. IIUC, most opinions suggested that we should keep the default Vector state to ON in thread: https://lore.kernel.org/all/20220921214439.1491510-17-stillson@rivosinc.com/T/#u So IMHO adding a build option to those who prefer not to unconditionally enable V should be sufficient. > I would also suggesting dropping the 2 patches for in-kernel enablement > for your submission as it might require some more thinking/design and > builds naturally on top of the baseline patches. Yes, I agree. Those patches were heavily copied from arm neon, which will not benefit from hardware feature on riscv-V. I will refine those patches and submit independently, on top of the baseline patch. Thanks, Andy