[PATCH 1/2] riscv: hwprobe: export the availability of vector to user
Florian Weimer
fweimer at redhat.com
Tue Aug 18 00:29:26 PDT 2026
* 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
More information about the linux-riscv
mailing list