RFR: 8352673: RISC-V: Vector can't be turned on with -XX:+UseRVV [v2]

Dingli Zhang dzhang at openjdk.org
Mon Mar 24 14:00:34 UTC 2025


> Hi all,
> After [JDK-8348384](https://bugs.openjdk.org/browse/JDK-8348384), Vector can't be turned on with -XX:+UseRVV when Linux kernels before 6.8.5, which does not match the printed log:
> 
> log.info("Linux kernels before 6.8.5 (current %ld.%ld.%ld) have a known bug when using Vector and signals.", major, minor, patch);
> log.info("Vector not enabled automatically via hwprobe, but can be turned on with -XX:+UseRVV.");
> 
> 
> Testing on QEMU before this PR:
> 
> $ uname -a
> Linux ubuntu 6.8.0-52-generic #53.1-Ubuntu SMP PREEMPT_DYNAMIC Sun Jan 26 04:38:25 UTC 2025 riscv64 riscv64 riscv64 GNU/Linux
> 
> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -version | grep UseRVV
>      bool UseRVV                                   = false                             {ARCH diagnostic} {default}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
> 
> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -version | grep UseRVV
> OpenJDK 64-Bit Server VM warning: RVV is not supported on this CPU
>      bool UseRVV                                   = false                             {ARCH diagnostic} {command line}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
> 
> $ ./java -XX:+PrintFlagsFinal -XX:+UnlockDiagnosticVMOptions -XX:-UseRVV -version | grep UseRVV
>      bool UseRVV                                   = false                             {ARCH diagnostic} {command line}
> openjdk version "25-internal" 2025-09-16
> OpenJDK Runtime Environment (build 25-internal-adhoc.zhangdingli.jdk)
> OpenJDK 64-Bit Server VM (build 25-internal-adhoc.zhangdingli.jdk, mixed mode)
> 
> $ ./java -XX:+UnlockDiagnosticVMOptions -XX:+UseRVV -Xlog:os=info -version
> [0.021s][info][os] Use of CLOCK_MONOTONIC is supported
> [0.022s][info][os] Use of pthread_condattr_setclock is supported
> [0.022s][info][os] Relative timed-wait using pthread_cond_timedwait is associated with CLOCK_MONOTONIC
> [0.022s][info][os] HotSpot is running with glibc 2.39, NPTL 2.39
> [0.022s][info][os] Glibc stack size guard page adjustment is not needed
> [0.024s][info][os] SafePoint Polling address, bad (protected) page:0x00007fff7fe66000, good (unprotected) page:0x00007fff7fe67000
> [0.040s][info][os] attempting shared library load of /home/ubuntu/jdk-rvv...

Dingli Zhang has updated the pull request incrementally with one additional commit since the last revision:

  Fix the issue in vm_version_riscv.cpp

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24182/files
  - new: https://git.openjdk.org/jdk/pull/24182/files/c8b1739c..5c01052c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24182&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24182&range=00-01

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/24182.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24182/head:pull/24182

PR: https://git.openjdk.org/jdk/pull/24182


More information about the hotspot-runtime-dev mailing list