Skip to content

Commit

Permalink
No V <6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Jan 22, 2025
1 parent fb43849 commit 832720f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/

#include "logging/log.hpp"
#include "os_linux.hpp"
#include "riscv_hwprobe.hpp"
#include "runtime/os.hpp"
#include "runtime/vm_version.hpp"
Expand Down Expand Up @@ -163,7 +164,15 @@ void RiscvHwprobe::add_features_from_query_result() {
VM_Version::ext_C.enable_feature();
}
if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_IMA_V)) {
VM_Version::ext_V.enable_feature();
// Linux signal return bug when using vector with vlen > 128b in pre 6.9.
long major, minor;
os::Linux::kernel_version(&major, &minor);
if (!(major > 6 || (major == 6 && minor >= 9))) {
log_info(os)("Linux kernel %ld.%ld have a known bug when using Vector and signals.\n"
"Not enabled automatically via hwprobe. Use -XX:+UseRVV to force.", major, minor);
} else {
VM_Version::ext_V.enable_feature();
}
}
if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZBA)) {
VM_Version::ext_Zba.enable_feature();
Expand Down

0 comments on commit 832720f

Please sign in to comment.