[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1dae947-d52a-d28e-5ddc-c1ad6d29828c@rivosinc.com>
Date: Thu, 8 Dec 2022 21:16:06 -0800
From: Vineet Gupta <vineetg@...osinc.com>
To: Chris Stillson <stillson@...osinc.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Anup Patel <anup@...infault.org>,
Atish Patra <atishp@...shpatra.org>,
Guo Ren <guoren@...nel.org>,
Conor Dooley <conor.dooley@...rochip.com>,
Greentime Hu <greentime.hu@...ive.com>,
Vincent Chen <vincent.chen@...ive.com>,
Andy Chiu <andy.chiu@...ive.com>,
Andrew Waterman <andrew@...ive.com>,
Darius Rad <darius@...espec.com>,
Arnd Bergmann <arnd@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
linux-riscv <linux-riscv@...ts.infradead.org>,
Björn Töpel <bjorn@...nel.org>,
Florian Weimer <fweimer@...hat.com>,
GNU C Library <libc-alpha@...rceware.org>,
Conor Dooley <Conor.Dooley@...rochip.com>,
Christoph Müllner <christoph.muellner@...ll.eu>,
Aaron Durbin <adurbin@...osinc.com>, linux@...osinc.com
Subject: RISCV Vector unit disabled by default for new task (was Re: [PATCH
v12 17/17] riscv: prctl to enable vector commands)
Hi Darius, Andrew, Palmer
On 9/21/22 14:43, Chris Stillson wrote:
> diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
>
> @@ -134,7 +135,6 @@ void start_thread(struct pt_regs *regs, unsigned long pc,
> if (WARN_ON(!vstate->datap))
> return;
> }
> - regs->status |= SR_VS_INITIAL;
>
Perhaps not obvious from the patch, but this is a major user experience
change: As in V unit would be turned off for a new task and we will rely
on a userspace prctl (also introduced in this patch) to enable V.
I know some of you had different opinion on this in the past [1], so
this is to make sure everyone's on same page.
And if we agree this is the way to go, how exactly will this be done in
userspace.
glibc dynamic loader will invoke the prctl() ? How will it decide
whether to do this (or not) - will it be unconditional or will it use
the hwcap - does latter plumbing exist already ? If so is it AT_HWCAP /
HWCAP2.
Also for static linked executables, where will the prctl be called from ?
[1] https://sourceware.org/pipermail/libc-alpha/2021-November/132883.html
Powered by blists - more mailing lists