[PATCH v1 1/1] riscv: Add RVV memset via multiarch/IFUNC

Peter Bergner bergner@tenstorrent.com
Fri Nov 7 20:32:12 GMT 2025


On 11/7/25 4:38 AM, Yao Zihong wrote:
> For now, this could be addressed by checking both hwcaps and hwprobe
> (treating the extension as enabled only if both report it as
> available):
>     $ ./v_off ./rvv_probe --mode=hwprobe
>     rvv enabled
>     $ ./v_off ./rvv_probe --mode=both
>     rvv disabled

I think checking both hwprobe and hwcap is a terrible interface.
I agree with Jeff, the problematic scenario with prctl is a niche
scenario and shouldn't hold up the current patch that uses hwprobe
only.  That is the agreed upon usage.


> However, since we now generally agree that this should ultimately be
> handled through hwprobe, I'd be glad to work with the kernel side to
> help implement the corresponding change so we can eventually avoid
> relying on hwcaps.

That would be great!  As I mentioned in another reply in this thread,
if the kernel people say they don't want to change the current behavior
because some code might depend on that, we can always add another
RISCV_HWPROBE_KEY_* key to tell the kernel we want the new behavior.
That would be usable even on old kernels, because old kernels just
ignore keys they don't know about.

Peter



More information about the Libc-alpha mailing list