[FFmpeg-devel] [PATCH] RISC-V:update ff_get_cpu_flags_riscv for RVV

Rémi Denis-Courmont remi at remlab.net
Fri Mar 21 06:11:30 EET 2025


Hi,

Le 21 mars 2025 04:12:14 GMT+02:00, daichengrong <daichengrong at iscas.ac.cn> a écrit :
>
>在 2025/3/20 19:17:21, Rémi Denis-Courmont :
>> Hi,
>> 
>> Le 20 mars 2025 11:27:39 GMT+02:00, daichengrong <daichengrong at iscas.ac.cn> a écrit :
>>>>> Availability of RVV and ZVBB should be determined with dl_hwcap.
>>>> No. That's completely superfluous since we already check for kernel support with hwprobe().
>>> No. If the operating system does not enable dl_hwcap support for rvv, an illegal instruction exception will be reported , even if the hardware and kernel support RVV.
>> And so what?
>
>When running tests/checkasm, if the operating system has RVV support disabled, the program reports illegal instructions and the test crashes.

No, it does not. We even test this multiple times a day in FATE.

>
>Linux localhost.localdomain 6.13.0 #1 SMP Tue Mar  4 09:23:35 CST 2025 riscv64 riscv64 riscv64 GNU/Linux
>
>[root at localhost checkasm]# echo 0 > /proc/sys/abi/riscv_v_default_allow

If you use that option, you are responsible for ensuring that libc will re-enable vectors using prctl() before running any programme or library with vector code. You just shot yourself in the foot.


More information about the ffmpeg-devel mailing list