RFR: 8334135: RISC-V: check vector support in VM_Version::os_aux_features

Fei Yang fyang at openjdk.org
Wed Jun 12 23:39:11 UTC 2024


On Wed, 12 Jun 2024 14:46:49 GMT, Hamlin Li <mli at openjdk.org> wrote:

> Hi,
> Can you help to review this patch?
> 
> Previously, VM_Version::os_aux_features skips vector check, even if it knows vector is supported via HWCAP, because it can not tell if the rvv0.7 or rvv1.0 is supported, and jdk only supports rvv 1.0.
> But this brings another issue in some situation where borad itself supports rvv1.0, but kernel does not support hw probe, then jdk can not enable UseRVV, but it should be.
> The solution is to delete the skipping rvv check code, and does not care about if it supports 0.7 or 1.0. The result is, when rvv 1.0 is supported then user can get the feature from jdk; when rvv 0.7 is supported then user needs to pass "-XX:-UseRVV" to disable it explicitly.
> Although the solution is not perfect, but I hope it will support both situations anyway.
> 
> And I suppose more and more board will support rvv 1.0 rather than 0.7.
> 
> Thanks!

Hi, a similar issue was once discussed in PR: https://github.com/openjdk/jdk/pull/19472, where the author's intention is to keep UseRVV disabled by default when running on kernels without hwprobe and only enable this option on the command line. But I agree with @robehn in that we would also need the context switch support for RVV in kernel 6.5+ for this to work.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/19679#issuecomment-2164068306


More information about the hotspot-runtime-dev mailing list