RFR: 8333245: RISC-V: UseRVV option can't be enabled after JDK-8316859
Gui Cao
gcao at openjdk.org
Thu May 30 09:23:17 UTC 2024
Because some dev boards only support RVV version 0.7, In [JDK-8316859](https://bugs.openjdk.org/browse/JDK-8316859) we masked the use of HWCAP to probe for RVV extensions, and in the meantime, we can use hwprobe to probe for V extensions in Linux kernel 6.5 and above. But recently we got Banana Pi BPI-F3 board (has RVV1.0), but his kernel is 6.1.15, so the V extensions detected by HWCAP are masked. And we get the warning: `RVV is not supported on this CPU` when we enable UseRVV with the command, and we can't enable UseRVV correctly.
Without Patch:
zifeihan at bananapif3:~/jre/jdk/bin$ ./java -XX:+PrintFlagsFinal -XX:+UseRVV -version | grep UseRVV
OpenJDK 64-Bit Server VM warning: RVV is not supported on this CPU
bool UseRVV = false {ARCH product} {command line}
bool UseRVVForBigIntegerShiftIntrinsics = false {ARCH product} {default}
openjdk version "23-internal" 2024-09-17
OpenJDK Runtime Environment (build 23-internal-adhoc.zifeihan.jdk)
OpenJDK 64-Bit Server VM (build 23-internal-adhoc.zifeihan.jdk, mixed mode)
With Patch:
zifeihan at bananapif3:~/jre/jdk/bin$ ./java -XX:+PrintFlagsFinal -XX:+UseRVV -version | grep UseRVV
bool UseRVV = true {ARCH product} {command line}
bool UseRVVForBigIntegerShiftIntrinsics = true {ARCH product} {default}
openjdk version "23-internal" 2024-09-17
OpenJDK Runtime Environment (build 23-internal-adhoc.zifeihan.jdk)
OpenJDK 64-Bit Server VM (build 23-internal-adhoc.zifeihan.jdk, mixed mode)
-------------
Commit messages:
- 8333245: RISC-V: UseRVV option can't be enabled after JDK-8316859
Changes: https://git.openjdk.org/jdk/pull/19472/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19472&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8333245
Stats: 8 lines in 2 files changed: 0 ins; 6 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/19472.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19472/head:pull/19472
PR: https://git.openjdk.org/jdk/pull/19472
More information about the hotspot-dev
mailing list