Re: [PATCH 1/2] riscv: hwprobe: export the availability of vector to user
Florian Weimer <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,org.kernel.vger.linux-api,org.kernel.vger.linux-doc |
|---|---|
| Message-ID | <[email protected]> |
* Peter Bergner: > On 8/6/26 1:31 AM, Florian Weimer wrote: >> >> And if RISCV_HWPROBE_KEY_IMA_EXT_0 comes back at -1, we'd turn on V >> unconditionally? > > No. The unknown key (RISCV_HWPROBE_KEY_IMA_EXT_0 in this case) field would > be reset to -1, but the value field (which is what we test for the presence > of V and other extensions in the resolver) is set to 0, so we would not enable > any ifuncs in that case. I assumed, but didn't write, that there would be a separate probe for the V extension. > For kernels that know about RISCV_HWPROBE_KEY_IMA_EXT_0, but not the > new key RISCV_HWPROBE_KEY_EXT_ENABLED, the key field holding > RISCV_HWPROBE_KEY_EXT_ENABLED will be reset to -1 and its value field > set to 0, while the value field associated with > RISCV_HWPROBE_KEY_IMA_EXT_0 will be set to the "extension is present" > value. This still suffers from the (already existing) we'll enable V > ifuncs issue you mentioned if prctl was used to disable V, but as you > say, it will be fixed with a kernel upgrade. Okay, that's fair. I'm happy if there's no difficult-to-test prctl path that we need to maintain indefinitely. Thanks, Florian _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv